]> git.ipfire.org Git - thirdparty/grub.git/commit
kern/dl: Check for the SHF_INFO_LINK flag in grub_dl_relocate_symbols()
authorB Horn <b@horn.uk>
Thu, 7 Nov 2024 06:00:36 +0000 (06:00 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:55 +0000 (15:45 +0100)
commit98ad84328dcabfa603dcf5bd217570aa6b4bdd99
tree75e8b6557e639ef6396a2f8c17171980fd079dab
parentd72208423dcabf9eb4a3bcb17b6b31888396bd49
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