CVE-2026-114690: Gcc: confirmed out-of-bounds read/write in libstdc++ parallel `std

Published May 18, 2026
·
Updated

A flaw was found in GCC. An out-of-bounds memory access vulnerability exists in the libstdc++ parallel search implementation due to an undersized internal buffer. A local attacker can exploit this flaw by providing crafted search data to an application compiled with parallel mode, causing the process to crash and leading to a Denial of Service (DoS).

Other sources

AIONLYREPORT package: gcc-toolset-15-gcc-15.2.1-7.el10 ------ Summary: Confirmed out-of-bounds read/write in libstdc++ parallel std::search (parallel/search.h): undersized KMP border-table storage allows calcborders() to write advances[patternlength], and the full-match path then reads the same out-of-bounds slot, causing a process crash or other in-process memory-safety failure when the parallel search implementation is used. Requirements to exploit: A consuming application must be built with libstdc++ parallel mode (GLIBCXXPARALLEL) and OpenMP, use random-access iterators, and reach the parallel std::search implementation. The attacker then needs control over the haystack and pattern so a full match occurs; the out-of-bounds write additionally requires patternlength > 1, and normal reachability may depend on the parallel-search threshold unless the application forces parallel mode. Component affected: gcc-toolset-15-gcc-15.2.1-7.el10, header-implemented libstdc++ parallel search in libstdc++-v3/include/parallel/search.h, primarily calcborders() and searchtemplate(). Version affected: gcc-toolset-15-gcc-15.2.1-7.el10 when applications are compiled with GLIBCXXPARALLEL and OpenMP and reach the parallel std::search implementation. Patch available: no released package fix established; proposed patch included below Version fixed: unknown Upstream coordination: Not notified. CVSS: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - 6.2 (MEDIUM) AV:L - The confirmed issue is in a local library code path reached by a process using the affected headers; the available evidence does not establish a network-reachable attack surface in the package itself. AC:L - Once the parallel search path is in use, a simple full-match input is sufficient to trigger the fault. PR:N - No privileges are required beyond the ability to supply data to the affected code path. UI:N - No separate user interaction is required after the vulnerable function is invoked. S:U - The impact remains within the calling process. C:N - No confidentiality impact has been demonstrated. I:N - No integrity impact has been demonstrated. A:H - The demonstrated outcome is an out-of-bounds access that can terminate the process. Impact: Moderate. Red Hat rates issues as Moderate when they can affect confidentiality, integrity, or availability under certain circumstances or when a more serious bug class depends on an unlikely configuration. This issue is a confirmed memory-safety flaw with reproducible process-crash impact, but it depends on the non-default libstdc++ parallel-mode extension being enabled in consuming code and the current evidence supports process-level availability impact rather than privilege escalation or code execution. Embargo: no Reason: The issue is not default-reachable, the currently demonstrated impact is process crash/DoS, and affected consumers can mitigate by avoiding the parallel-mode path until a fix is available. Acknowledgement: Aisle Research Vulnerability Details: The parallel Knuth-Morris-Pratt search implementation allocates the border table with patternlength elements, but calcborders() writes through index length. Later, when a full match is found, the post-match jump logic reads advances[patternlength]. This creates a confirmed out-of-bounds write/read pair on the same array. The previously suspected splitters / ompgetnumthreads() path was reviewed separately, but the available code shows allocation occurs after the actual team size is known in the single region, so this report is limited to the confirmed advances off-by-one. cpp template<typename RAIter, typename DifferenceTp> void calcborders(RAIter elements, DifferenceTp length, DifferenceTp off) { ... for (DifferenceType j = 2; j <= length; j++) { ... off[j] = ++k; } } ... DifferenceType advances[patternlength]; calcborders(begin2, patternlength, advances); ... if (posinpattern == patternlength) { ... foundpattern = true; break; } ... start += (posinpattern - advances[posinpattern]); posinpattern = (advances[posinpattern] < 0 ? 0 : advances[posinpattern]); For patternlength > 1, the border-table construction writes one element past the end of the stack array. Independently, after a full match, the jump logic reads advances[patternlength]. In testing, this is reproducible as a sanitizer-detected out-of-bounds access and can crash the process. Steps to reproduce: 1. Use the following PoC, which forces the parallel strategy and creates a full match: cpp #include <parallel/algorithm> #include <parallel/settings.h> #include <vector> #include <iostream> int main() { gnuparallel::Settings s = gnuparallel::Settings::get(); s.algorithmstrategy = gnuparallel::forceparallel; gnuparallel::Settings::set(s); std::vector<int> hay(5000, 1); // >= searchminimaln default std::vector<int> pat{1,1,1,1,1,1,1,1}; // len >= 2, full matches auto it = gnuparallel::search(hay.begin(), hay.end(), pat.begin(), pat.end()); std::cout << (it - hay.begin()) << "\n"; } 2. Build with GNU parallel mode, OpenMP, and AddressSanitizer: g++ -O1 -g -fsanitize=address -fopenmp -DGLIBCXXPARALLEL poc.cc -o poc 3. Run with multiple threads: OMPNUMTHREADS=4 ./poc 4. Observe an AddressSanitizer out-of-bounds report originating in or near parallel/search.h, specifically calcborders() and/or the post-match jump logic. Mitigation: Until a fixed package is available, avoid compiling untrusted-data paths with libstdc++ parallel mode (GLIBCXXPARALLEL) or avoid forcing the parallel std::search implementation in affected consumers. Because this logic is header-implemented, rebuilding affected applications without the parallel-mode extension removes the vulnerable code path. Proposed Fix: diff diff --git a/libstdc++-v3/include/parallel/search.h b/libstdc++-v3/include/parallel/search.h @@ DifferenceType advances[patternlength]; + DifferenceType advances[patternlength + 1]; calcborders(begin2, patternlength, advances);

This aligns the allocation with the algorithm's actual indexing range, which includes 0..patternlength. ------ This report was generated using AI technology. Always review AI-generated content prior to use

— Red Hat

Gcc: confirmed out-of-bounds read/write in libstdc++ parallel std

— Microsoft

Affected Software

167 affected components
ubuntu/gcc-3.3*
ubuntu/gcc-4.7*
ubuntu/gcc-4.8*
ubuntu/gcc-defaults*
ubuntu/gcc-mingw-w64*
ubuntu/gccgo-4.9*
ubuntu/gcc-5*
ubuntu/gcc-5-cross*
ubuntu/gcc-defaults*
ubuntu/gccgo-6*
ubuntu/gcc-3.3*
ubuntu/gcc-4.7*
ubuntu/gcc-4.7-armel-cross*
ubuntu/gcc-4.7-armhf-cross*
ubuntu/gcc-4.8*
ubuntu/gcc-4.8-arm64-cross*
ubuntu/gcc-4.8-armhf-cross*
ubuntu/gcc-4.8-powerpc-cross*
ubuntu/gcc-4.8-ppc64el-cross*
ubuntu/gcc-4.9-cross*
ubuntu/gcc-5-cross-ports*
ubuntu/gcc-arm-linux-androideabi*
ubuntu/gcc-arm-none-eabi*
ubuntu/gcc-avr*
ubuntu/gcc-h8300-hms*
ubuntu/gcc-i686-linux-android*
ubuntu/gcc-m68hc1x*
ubuntu/gcc-mingw-w64*
ubuntu/gcc-msp430*
ubuntu/gcc-snapshot*
ubuntu/gcc-7*
ubuntu/gcc-7-cross*
ubuntu/gcc-8*
ubuntu/gcc-8-cross*
ubuntu/gcc-defaults*
ubuntu/gcc-3.3*
ubuntu/gcc-4.8*
ubuntu/gcc-5*
ubuntu/gcc-5-cross*
ubuntu/gcc-5-cross-ports*
ubuntu/gcc-6-cross*
ubuntu/gcc-6-cross-ports*
ubuntu/gcc-7-cross-ports*
ubuntu/gcc-8-cross-ports*
ubuntu/gcc-arm-none-eabi*
ubuntu/gcc-avr*
ubuntu/gcc-h8300-hms*
ubuntu/gcc-m68hc1x*
ubuntu/gcc-mingw-w64*
ubuntu/gcc-msp430*
ubuntu/gcc-snapshot*
ubuntu/gcc-10*
ubuntu/gcc-10-cross*
ubuntu/gcc-9*
ubuntu/gcc-9-cross*
ubuntu/gcc-defaults*
ubuntu/gcc-10-cross-mipsen*
ubuntu/gcc-10-cross-ports*
ubuntu/gcc-3.3*
ubuntu/gcc-7*
ubuntu/gcc-8*
ubuntu/gcc-8-cross*
ubuntu/gcc-8-cross-ports*
ubuntu/gcc-9-cross-mipsen*
ubuntu/gcc-9-cross-ports*
ubuntu/gcc-arm-none-eabi*
ubuntu/gcc-avr*
ubuntu/gcc-h8300-hms*
ubuntu/gcc-m68hc1x*
ubuntu/gcc-mingw-w64*
ubuntu/gcc-msp430*
ubuntu/gcc-riscv64-unknown-elf*
ubuntu/gcc-snapshot*
ubuntu/gcc-xtensa-lx106*
ubuntu/gcc-10*
ubuntu/gcc-10-cross*
ubuntu/gcc-10-cross-mipsen*
ubuntu/gcc-10-cross-ports*
ubuntu/gcc-11*
ubuntu/gcc-11-cross*
ubuntu/gcc-11-cross-ports*
ubuntu/gcc-12-cross*
ubuntu/gcc-12-cross-ports*
ubuntu/gcc-3.3*
ubuntu/gcc-9*
ubuntu/gcc-9-cross*
ubuntu/gcc-9-cross-mipsen*
ubuntu/gcc-9-cross-ports*
ubuntu/gcc-arm-none-eabi*
ubuntu/gcc-avr*
ubuntu/gcc-defaults*
ubuntu/gcc-h8300-hms*
ubuntu/gcc-m68hc1x*
ubuntu/gcc-mingw-w64*
ubuntu/gcc-msp430*
ubuntu/gcc-or1k-elf*
ubuntu/gcc-riscv64-unknown-elf*
ubuntu/gcc-snapshot*
ubuntu/gcc-xtensa-lx106*
ubuntu/gcc-10*
ubuntu/gcc-10-cross*
ubuntu/gcc-10-cross-mipsen*
ubuntu/gcc-10-cross-ports*
ubuntu/gcc-11*
ubuntu/gcc-11-cross*
ubuntu/gcc-11-cross-mipsen*
ubuntu/gcc-11-cross-ports*
ubuntu/gcc-12-cross*
ubuntu/gcc-12-cross-mipsen*
ubuntu/gcc-12-cross-ports*
ubuntu/gcc-13-cross*
ubuntu/gcc-13-cross-ports*
ubuntu/gcc-3.3*
ubuntu/gcc-9*
ubuntu/gcc-9-cross*
ubuntu/gcc-9-cross-mipsen*
ubuntu/gcc-9-cross-ports*
ubuntu/gcc-arm-none-eabi*
ubuntu/gcc-avr*
ubuntu/gcc-defaults*
ubuntu/gcc-h8300-hms*
ubuntu/gcc-mingw-w64*
ubuntu/gcc-or1k-elf*
ubuntu/gcc-riscv64-unknown-elf*
ubuntu/gcc-snapshot*
ubuntu/gcc-11*
ubuntu/gcc-11-cross*
ubuntu/gcc-11-cross-ports*
ubuntu/gcc-12-cross*
ubuntu/gcc-12-cross-ports*
ubuntu/gcc-13*
ubuntu/gcc-13-cross*
ubuntu/gcc-13-cross-ports*
ubuntu/gcc-arm-none-eabi*
ubuntu/gcc-avr*
ubuntu/gcc-defaults*
ubuntu/gcc-h8300-hms*
ubuntu/gcc-mingw-w64*
ubuntu/gcc-or1k-elf*
ubuntu/gcc-riscv64-unknown-elf*
ubuntu/gcc-snapshot*
ubuntu/gcc-11*
ubuntu/gcc-11-cross*
ubuntu/gcc-11-cross-ports*
ubuntu/gcc-12-cross*
ubuntu/gcc-12-cross-ports*
ubuntu/gcc-13*
ubuntu/gcc-13-cross*
ubuntu/gcc-13-cross-ports*
ubuntu/gcc-arm-none-eabi*
ubuntu/gcc-avr*
ubuntu/gcc-defaults*
ubuntu/gcc-h8300-hms*
ubuntu/gcc-mingw-w64*
ubuntu/gcc-or1k-elf*
ubuntu/gcc-riscv64-unknown-elf*
ubuntu/gcc-snapshot*
debian/gcc-11*
debian/gcc-12*
debian/gcc-12*
debian/gcc-15*
debian/gcc-11<=11.3.0-12, <=11.5.0-13
debian/gcc-12<=12.2.0-14+deb12u1, <=12.4.0-5, <=12.5.0-11
debian/gcc-13<=13.3.0-16, <=13.5.0-3
debian/gcc-14<=14.2.0-19, <=14.4.0-3
debian/gcc-15<=15.3.0-4, <=15.3.0-5
debian/gcc-16<=16.2.0-3, <=16.2.0-4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Avoid compiling applications with _GLIBCXX_PARALLEL and avoid forcing the parallel std::search implementation, particularly on untrusted-data paths, until a fixed package is available.

    GCC libstdc++ parallel search _GLIBCXX_PARALLEL = disabled

Event History

May 18, 2026
Data Sourced
via Red Hat·03:41 AM
DescriptionSeverityAffected Software
Oct 30, 2026
CVE Published
via OSV·12:00 AM
Data Sourced
via OSV·12:00 AM
DescriptionSeverityAffected Software
CVE Published
via MITRE·07:13 AM
Data Sourced
via MITRE·07:13 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:16 AM
DescriptionSeverityWeakness
Nov 3, 2026
Data Sourced
via Microsoft·09:06 AM
DescriptionSeverityWeakness

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203