[Bug tools/32672] eu-strip SEGV (illegal read access) in validate_str (libelf/elf_strptr.c:60)

mark at klomp dot org sourceware-bugzilla@sourceware.org
Fri Feb 14 08:04:01 GMT 2025


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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
commit b16f441cca0a4841050e3215a9f120a6d8aea918
Author: Mark Wielaard <mark@klomp.org>
Date:   Thu Feb 13 00:02:32 2025 +0100

    libelf: Handle elf_strptr on section without any data

    In the unlikely situation that elf_strptr was called on a section with
    sh_size already set, but that doesn't have any data yet we could crash
    trying to verify the string to return.

    This could happen for example when a new section was created with
    elf_newscn, but no data having been added yet.

            * libelf/elf_strptr.c (elf_strptr): Check strscn->rawdata_base
            is not NULL.

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

    Signed-off-by: Mark Wielaard <mark@klomp.org>

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


More information about the Elfutils-devel mailing list