PR 34342 SIGSEGV libctf/ctf-types.c:1603
Project / Subsystem
binutils / binutils
Date
2026-07-03
Proposer
Alan Modra <amodra@gmail.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Adds runtime checks for data integrity, potentially with a small performance overhead.
- • Improves robustness by preventing crashes due to malformed CTF data.
All attributes
- project
- binutils
- subsystem
- binutils
- patch_id
- —
- discussion_id
- akcLB6oWX_CHNrut@squeak.grove.modra.org
- source_type
- public_inbox
- title
- PR 34342 SIGSEGV libctf/ctf-types.c:1603
- headline
- PR 34342 SIGSEGV libctf/ctf-types.c:1603
- tldr
- Fixes a SIGSEGV in libctf by adding sanity checks for variable length record bytes against type section length.
- proposer
- Alan Modra <amodra@gmail.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Adds runtime checks for data integrity, potentially with a small performance overhead.
- • Improves robustness by preventing crashes due to malformed CTF data.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • binutils
- • libctf
- • crash
- • debugging
- • CTF
- bugzilla_url
- —
- date
- 2026-07-03T00:00:00.000Z
PR 34342 SIGSEGV libctf/ctf-types.c:1603
This patch addresses a SIGSEGV crash within libctf by adding stricter sanity checks in libctf/ctf-open.c. Specifically, it introduces checks to ensure that variable-length record bytes do not exceed the bounds of the type section length during type upgrades and initialization. The changes are applied to both upgrade_types_v1 and init_static_types_internal functions, preventing potential buffer overflows or out-of-bounds reads that could lead to the observed segmentation fault.