CVE-2026-12235: Unvalidated Elf Rela Offset

An ELF RELA relocation entry offset `r_offset` is added to a memory address without checking if `r_offset` falls within the bounds of the target section (`sh_size`). An attacker supplying a crafted ELF file with a large `r_offset` can cause out-of-bounds memory writes during ELF linking.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2026-12235-unvalidated-elf-rela-offset --engine opengrep

Description

An ELF RELA relocation entry offset `r_offset` is added to a memory address without checking if `r_offset` falls within the bounds of the target section (`sh_size`). An attacker supplying a crafted ELF file with a large `r_offset` can cause out-of-bounds memory writes during ELF linking.