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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mark at klomp dot org
         Resolution|---                         |FIXED

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
Yeah that is a mysterious typo apparently been there since 2009 when
__libdw_read_offset got a size argument and check. Clearly that should have
been 4, not 3. Pushed fix as:

commit c4bfb99c0a9e7736b4ac2f5effb3c9c56fcfd7e6
Author: Mark Wielaard <[email protected]>
Date:   Sun Jul 12 14:07:05 2026 +0200

    libdw: Fix __libdw_read_offset size in dwarf_getpubnames.c get_offsets

    There was a typo in the __libdw_read_offset call that meant it only
    checked there were 3 bytes available in .debug_info at the given
    offset instead of 4. This could result in a 1 byte overread.

            * libdw/dwarf_getpubnames.c (get_offsets): Call
            __libdw_read_offset with size 4.

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

    Reported-by: Karan Kurani <[email protected]>
    Signed-off-by: Mark Wielaard <[email protected]>

P.S. Thanks a lot for the reproducers. But you can just build elfutils with
configure --enable-sanitize-address if you want asan support. That also adjusts
the ALLOWED_UNALIGN macro.

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

Reply via email to