Executive brief
GNU Binutils, a collection of programming tools for handling binary files, is affected by a memory corruption vulnerability. An attacker with local access to a system could use a specially crafted file to cause a crash or potentially execute unauthorized code when the system processes that file using tools like objcopy. This could lead to a disruption of development workflows or a compromise of the local environment.
Technical details
A vulnerability exists in GNU Binutils 2.45 within the Binary File Descriptor (BFD) library. Specifically, the function 'bfd_elf_set_group_contents' in 'bfd/elf.c' fails to properly validate group section sizes, leading to a negative-size parameter being passed to a memset operation. This results in an out-of-bounds write and heap corruption. The issue can be triggered locally by processing a malformed ELF file with utilities such as 'objcopy'. A patch (commit 41461010eb7c79fee7a9d5f6209accdaac66cc6b) has been released to report corrupted group sections instead of attempting to process them.
Affected products
- GNU Binutils 2.45
Timeline
- 2025-06-03: disclosed: Bug reported to Sourceware Bugzilla
- 2025-06-23: patched: Fix committed to master branch
- 2025-07-13: advisory: Initial advisory published
References
- https://sourceware.org/bugzilla/attachment.cgi?id=16118
- https://sourceware.org/bugzilla/show_bug.cgi?id=33050
- https://sourceware.org/bugzilla/show_bug.cgi?id=33050
- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41461010eb7c79fee7a9d5f6209accdaac66cc6b
- https://vuldb.com/?ctiid.316244
- https://vuldb.com/?id.316244
- https://vuldb.com/?submit.614375