diff options
| author | Rich Felker <dalias@aerifal.cx> | 2026-04-09 23:40:53 -0400 |
|---|---|---|
| committer | Rich Felker <dalias@aerifal.cx> | 2026-04-09 23:40:53 -0400 |
| commit | b3291b9a9f77f1f993d2b4f8c68a26cf09221ae7 (patch) | |
| tree | 6745eb390129128d684d64c5227c6724de9e7b60 /src/process/x86_64/git: | |
| parent | 228da39e38c1cae13cbe637e771412c1984dba5d (diff) | |
| download | musl-b3291b9a9f77f1f993d2b4f8c68a26cf09221ae7.tar.gz | |
qsort: hard-preclude oob array writes independent of any invariants
while the root cause of CVE-2026-40200 was a faulty ctz primitive, the
fallout of the bug would have been limited to erroneous sorting or
infinite loop if not for the stores to a stack-based array that
depended on trusting invariants in order not to go out of bounds.
increase the size of the array to a power of two so that we can mask
indices into it to force them into range. in the absence of any
further bug, the masking is a no-op, but it does not have any
measurable performance cost, and it makes spatial memory safety
trivial to prove (and for readers not familiar with the algorithms to
trust).
Diffstat (limited to 'src/process/x86_64/git:')
0 files changed, 0 insertions, 0 deletions
