PR 34159, buffer overflow in fr30_elf_i32_reloc

Project / Subsystem

binutils / binutils

Date

2026-05-24

Proposer

Alan Modra <amodra@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Using bfd_elf_generic_reloc may have performance implications compared to the original code.
  • The reloc offset sanity check adds a layer of safety against malformed object files.

All attributes

project
binutils
subsystem
binutils
patch_id
discussion_id
ahLey0Z28PKBcUca@squeak.grove.modra.org
source_type
public_inbox
title
PR 34159, buffer overflow in fr30_elf_i32_reloc
headline
PR 34159, buffer overflow in fr30_elf_i32_reloc
tldr
This patch fixes a buffer overflow in fr30_elf_i32_reloc and removes a FIXME.
proposer
Alan Modra <amodra@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Using bfd_elf_generic_reloc may have performance implications compared to the original code.
  • The reloc offset sanity check adds a layer of safety against malformed object files.
series_id
series_role
standalone
series_parts
[]
tags
  • binutils
  • buffer overflow
  • security
  • FR30
  • ELF
bugzilla_url
date
2026-05-24T00:00:00.000Z

PR 34159, buffer overflow in fr30_elf_i32_reloc

This patch addresses a buffer overflow vulnerability in the fr30_elf_i32_reloc function within the binutils library, as reported in PR 34159. It modifies the function to use bfd_elf_generic_reloc when linking relocatable objects (ld -r) and adds a sanity check for the relocation offset. The patch also removes a related FIXME comment.