Executive brief
GNU Binutils, a collection of binary programming tools, is affected by a memory handling vulnerability in its 'objcopy' utility. An attacker with local access could use a specially crafted binary file to cause a system crash or potentially execute unauthorized code. This could disrupt development workflows or be used as part of a larger attack to gain further control over a system.
Technical details
A heap-based buffer overflow exists in the copy_section function of binutils/objcopy.c in GNU Binutils 2.45. The vulnerability is triggered when using the --interleave and --byte options on a crafted binary input, causing the output section size to be extended beyond the input section size. This results in an out-of-bounds read/write during the fwrite operation in cache_bwrite. An attacker with local access can exploit this to cause a crash (DoS) or potentially achieve arbitrary code execution. A patch has been developed (commit 08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944) to ensure output section sizes do not exceed input section sizes.
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: NVD/VulDB publication date
References
- https://sourceware.org/bugzilla/attachment.cgi?id=16117
- https://sourceware.org/bugzilla/show_bug.cgi?id=33049
- https://sourceware.org/bugzilla/show_bug.cgi?id=33049
- https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944
- https://vuldb.com/?ctiid.316243
- https://vuldb.com/?id.316243
- https://vuldb.com/?submit.614355