aarch64 core: use of uninitialised value

Project / Subsystem

binutils / binutils

Date

2026-05-26

Proposer

Alan Modra <amodra@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • By ignoring rawsize in bfd_core, the tool relies solely on the 'size' field, which might be insufficient in some edge cases (though none are mentioned).
  • The fix avoids excessive memory allocation, improving performance and stability when dealing with core files.

All attributes

project
binutils
subsystem
binutils
patch_id
discussion_id
ahVq6shyddPt4gaM@squeak.grove.modra.org
source_type
public_inbox
title
aarch64 core: use of uninitialised value
headline
BFD: Fixes potential uninitialized value use in aarch64 core dumps
tldr
Avoids allocating excessive memory for aarch64 core sections by ignoring `rawsize` in bfd_core, preventing potential uninitialized value usage and OOM errors.
proposer
Alan Modra <amodra@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • By ignoring rawsize in bfd_core, the tool relies solely on the 'size' field, which might be insufficient in some edge cases (though none are mentioned).
  • The fix avoids excessive memory allocation, improving performance and stability when dealing with core files.
series_id
series_role
standalone
series_parts
[]
tags
  • bfd
  • aarch64
  • core dump
  • memory allocation
  • bugfix
bugzilla_url
date
2026-05-26T00:00:00.000Z

aarch64 core: use of uninitialised value

A recent commit added support for PT_AARCH64_MEMTAG_MTE, which stores p_memsz (memory range) in rawsize and p_filesz in size within a section. When reading core files, bfd allocates memory based on the larger of rawsize and size. Since p_memsz can be much larger than p_filesz, this leads to excessive memory allocation, potentially using uninitialized values or causing OOM errors with fuzzed inputs. This patch avoids these issues by ignoring rawsize in bfd_core to calculate memory allocation.