Junglewise Threat Intelligence

CVE-2025-7545: GNU Binutils heap overflow in objcopy copy_section

CVE-2025-7545 · Severity: medium · CVSS 5.3 · Published 2025-07-13

Technologies: Gnu Binutils. Vendors: Gnu.

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

Related threats