- Resolves: CVE-2024-45779 CVE-2024-45778 CVE-2025-1118 - Resolves: CVE-2025-0677 CVE-2024-45782 CVE-2025-0690 - Resolves: CVE-2024-45783 CVE-2025-0624 CVE-2024-45776 - Resolves: CVE-2025-0622 CVE-2024-45774 CVE-2024-45775 - Resolves: CVE-2024-45781 CVE-2024-45780 - Resolves: #RHEL-79700 - Resolves: #RHEL-79341 - Resolves: #RHEL-79875 - Resolves: #RHEL-79849 - Resolves: #RHEL-79707 - Resolves: #RHEL-79857 - Resolves: #RHEL-79709 - Resolves: #RHEL-79846 - Resolves: #RHEL-75737 - Resolves: #RHEL-79713 - Resolves: #RHEL-73785 - Resolves: #RHEL-73787 - Resolves: #RHEL-79704 - Resolves: #RHEL-79702 Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: B Horn <b@horn.uk>
|
|
Date: Tue, 11 Feb 2025 17:01:26 -0600
|
|
Subject: [PATCH] kern/dl: Check for the SHF_INFO_LINK flag in
|
|
grub_dl_relocate_symbols()
|
|
|
|
The grub_dl_relocate_symbols() iterates through the sections in
|
|
an ELF looking for relocation sections. According to the spec [1]
|
|
the SHF_INFO_LINK flag should be set if the sh_info field is meant
|
|
to be a section index.
|
|
|
|
[1] https://refspecs.linuxbase.org/elf/gabi4+/ch4.sheader.html
|
|
|
|
Reported-by: B Horn <b@horn.uk>
|
|
Signed-off-by: B Horn <b@horn.uk>
|
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
---
|
|
grub-core/kern/dl.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
|
index 944e5600a..f2806f8cf 100644
|
|
--- a/grub-core/kern/dl.c
|
|
+++ b/grub-core/kern/dl.c
|
|
@@ -672,6 +672,9 @@ grub_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
|
|
grub_dl_segment_t seg;
|
|
grub_err_t err;
|
|
|
|
+ if (!(s->sh_flags & SHF_INFO_LINK))
|
|
+ continue;
|
|
+
|
|
seg = grub_dl_find_segment(mod, s->sh_info);
|
|
if (!seg)
|
|
continue;
|