Landing: 59d235ffa5a6

Project / Subsystem

gcc / libstdc++

Date

2026-09-23

Author

Jonathan Wakely

Commit

59d235ffa5a69231eb42e5290d52dc8c90d28b7a

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
—
commit_hash
59d235ffa5a69231eb42e5290d52dc8c90d28b7a
source_type
github
headline
libstdc++ ensures aligned new detects size_t overflow (CVE-2026-95619)
tldr
Fixes a vulnerability in aligned memory allocation that could lead to returning memory of insufficient size.
author
Jonathan Wakely
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • libstdc++
  • • memory safety
  • • CVE
discussion_id_link
—
bugzilla_pr
—
date
2026-09-23T00:00:00.000Z

Aligned memory allocation functions in libstdc++ could return a pointer to memory smaller than requested due to size_t overflow during size rounding. This commit introduces checks for such overflows in various aligned allocation implementations, including fallback mechanisms and platform-specific functions like _aligned_malloc on Windows. This prevents the allocation of undersized buffers, enhancing memory safety.