Stack-based Memory Corruption in musl libc Affects Large Array Sorting
CVE-2026-40200
8.1HIGH
What is CVE-2026-40200?
A vulnerability has been identified in musl libc that causes stack-based memory corruption during the qsort operation on very large arrays. This issue arises from improperly implemented double-word primitives. If the number of elements in an array exceeds approximately seven million on 32-bit platforms or the 64th Leonardo number on 64-bit platforms, it can trigger this vulnerability. Such conditions could potentially lead to unpredictable behavior or crashes, making it crucial for developers using musl libc to assess their applications for this issue.
Affected Version(s)
musl 0.7.10 <= 1.2.6
