libiberty d_compact_number signed integer overflow
Project / Subsystem
binutils / binutils
Date
2026-07-01
Proposer
Alan Modra <amodra@gmail.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Fixes a security vulnerability.
- • Ensures correct behavior in the C++ demangler.
All attributes
- project
- binutils
- subsystem
- binutils
- patch_id
- —
- discussion_id
- akRw-8BLQ-FkUM9O@squeak.grove.modra.org
- source_type
- public_inbox
- title
- libiberty d_compact_number signed integer overflow
- headline
- libiberty d_compact_number signed integer overflow
- tldr
- Fixes signed integer overflow in `libiberty`'s C++ demangler.
- proposer
- Alan Modra <amodra@gmail.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Fixes a security vulnerability.
- • Ensures correct behavior in the C++ demangler.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • security
- • bugfix
- • libiberty
- • c++
- • demangler
- bugzilla_url
- —
- date
- 2026-07-01T00:00:00.000Z
libiberty d_compact_number signed integer overflow
This patch addresses a signed integer overflow vulnerability in the d_compact_number function within libiberty/cp-demangle.c. The overflow occurs during the addition of 1 to a number obtained from d_number. The fix converts this addition to use unsigned arithmetic (+ 1u), preventing the overflow and ensuring correct behavior for the C++ demangler.