binutils Newspaper
NOVEMBER 30, 2026
arc — Needs Revision

ARC: Fix out-of-bounds reads in .arcextmap validation

Reviewer identifies that the proposed patch for validating .arcextmap records in binutils does not fully address out-of-bounds reads because checks occur after…

A reviewer analyzed a patch intended to validate .arcextmap records in binutils’ ARC target support. While the patch correctly identifies and attempts to fix some out-of-bounds read issues, the reviewer points out that two validation guards are ineffective because they are placed after the data they are meant to protect has already been read. This allows malformed records to trigger memory accesses beyond buffer limits.

In the Thread 1 participant
  1. Claudiu Zissulescu <claziss@gmail.com> reviewer

    Identifies that the proposed patch's validation checks occur too late, allowing out-of-bounds reads on EXT_CORE_REGISTER and EXT_LONG_CORE_REGISTER records.

    “The declaration initialiser reads p[2] before the p[0] < 4 test runs. For a record with p[0] == 2 placed at the very end of the section, p[2] is one byte past the end of the buffer allocated in build_ARC_extmap, so the over-read survives your patch.”

In Details

This discussion pertains to the binutils ARC target support, specifically the parsing and validation of the .arcextmap section. The reported issue involves out-of-bounds reads when processing malformed records, particularly affecting EXT_CORE_REGISTER and EXT_LONG_CORE_REGISTER types. The validation logic in the proposed patch is found to be insufficient as it doesn't reorder checks to precede sensitive memory accesses.

For Context
.arcextmap
A section in binaries for ARC (Argonaut RISC Core) processors used to store extended mapping information.
out-of-bounds read
An operation that attempts to access memory at an address that is outside the allocated buffer boundaries, potentially leading to data corruption or program crashes.
Filed Under: binutilsarcvalidationsecuritymemory safety