https://sourceware.org/bugzilla/show_bug.cgi?id=34038

--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alan Modra <[email protected]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c34038bc79db96395d3ebd4f231e9a98ba0e24df

commit c34038bc79db96395d3ebd4f231e9a98ba0e24df
Author: Joel Holdsworth <[email protected]>
Date:   Thu Apr 2 10:23:14 2026 -0700

    PR 34038 null pointer dereference in elf_link_output_extsym

    When linking an ELF object file containing an STT_GNU_IFUNC symbol,
    elf_link_output_extsym() unconditionally calls the backend's
    elf_backend_finish_dynamic_symbol callback.  On targets that do not
    support dynamic linking (and therefore do not define this callback),
    the function pointer is NULL, causing a segmentation fault.

    Add a NULL check for bed->elf_backend_finish_dynamic_symbol before
    the indirect call.  This is consistent with the definition in
    elfxx-target.h which defaults this callback to 0 (NULL) for targets
    that do not override it.

    Found by AFL++ fuzzing of the ELF linker with mutated object files.

    Signed-off-by: Joel Holdsworth <[email protected]>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to