binutils Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
bfd

PR 34327 Fix out-of-bounds accesses in relocations

Binutils BFD library improves relocation bounds-checking, fixing crashes.

This commit addresses out-of-bounds accesses in BFD’s relocation handling, as reported in PR 34327. It corrects issues where relocation fields were not properly contained within their sections across various architectures like D30V, S12Z, and SPU. The mmix relocation entry for R_MMIX_BASE_PLUS_OFFSET has also been fixed to correctly reflect its size and overflow handling.

In Details

This commit continues the effort to harden BFD's relocation handling against out-of-bounds accesses. It specifically updates relocation functions for several architectures to use bfd_reloc_offset_in_range and rectifies an incorrect definition for R_MMIX_BASE_PLUS_OFFSET in the mmix backend, which had an incorrect size and overflow reporting mechanism.

For Context
Relocation
A process performed by the linker to fix up symbolic references between object files. It involves adjusting memory addresses and other constant values in the code and data segments based on the final memory layout of the executable.
BFD
The Binary File Descriptor library, a part of GNU Binutils. It provides an abstraction layer to manage different object file formats, enabling tools like the linker and assembler to work with various executable and symbolic formats.
out-of-bounds access
An operation that attempts to read or write memory outside the allocated boundaries of a buffer or data structure. This can lead to data corruption, crashes, or security vulnerabilities.
mmix
A hypothetical computer architecture designed by Donald Knuth for educational purposes, used in his book 'The Art of Computer Programming'. Binutils includes support for its object file format.
Filed Under: bugfixsecurityrelocation