Deprecate _GLIBCXX_PARALLEL (was [PATCH] libstdc++: Fix buffer overrun in __gnu_parallel search (CVE-2026-114690))
Jonathan Wakely
jwakely@redhat.com
Thu Oct 29 09:56:37 GMT 2026
On Thu, 29 Oct 2026 at 09:45, Jonathan Wakely wrote:
>
> The libstdc++ Parallel Mode (enabled by _GLIBCXX_PARALLEL or by
> including the relevant headers and calling the functionss explicitly)
> uses the Knuth-Morris-Pratt search algorithm. A VLA is declared for the
> borders, but it uses N elements not N+1, leading to an out-of-bounds
> write in the parallel std::search.
>
> libstdc++-v3/ChangeLog:
>
> * include/parallel/search.h (__search_template): Increase array
> size.
> ---
>
> No new test because the bug only causes problems with ASan which we
> can't use in the testsuite. I verified it manually though.
>
> Tested x86_64-linux.
>
> Needed on trunk and all active branches.
Related to this, as soon as the C++17 parallel algos can use OpenMP
(which I'm working on) we should deprecated the old Parallel Mode.
That old code only implements C++98 (no move semantics, no new algos
such as std::copy_if, std::copy_n, etc.) and is unmaintained. I don't
want to have to keep fixing CVEs like this in code that is
unmaintained and will soon be unnecessary.
More information about the Libstdc++
mailing list