RUSTSEC-2026-0411
Out-of-bounds read in `Log2Cache::nlog2n()`, `nlog2n_difference()` and `plog2p()`
Log2Cache::new(n) fills its three tables with entries for 0..=n, but the
three accessor methods index those tables with get_unchecked on a value the
caller supplies. Nothing bounds the argument and nothing documents a bound, so
any value above the n the cache was built with reads past the end of the
vector. CountType is u32, so the read can land up to u32::MAX elements
away, and plog2p() returns the value it read, disclosing whatever lies there.
For example, Log2Cache::new(4) builds tables holding 5 entries (indices
0,1,2,3,4). Then cache.nlog2n(60000) reads index 60000, far outside the
allocation. Under AddressSanitizer this faults with SEGV; Miri reports it as
undefined behavior at src/log2cache.rs:42.
nlog2n_difference() is off by one further: in the affected versions new(n)
pushes n entries into that table rather than n + 1, so even
nlog2n_difference(n) is out of bounds.
This can be triggered through safe public APIs — Log2Cache::new() and any of
nlog2n(), nlog2n_difference() and plog2p() — with no unsafe required
from the caller.
What each source reports
OSV No score
Out-of-bounds read in `Log2Cache::nlog2n()`, `nlog2n_difference()` and `plog2p()`
Log2Cache::new(n) fills its three tables with entries for 0..=n, but the
three accessor methods index those tables with get_unchecked on a value the
caller supplies. Nothing bounds the argument and nothing documents a bound, so
any value above the n the cache was built with reads past the end of the
vector. CountType is u32, so the read can land up to u32::MAX elements
away, and plog2p() returns the value it read, disclosing whatever lies there.
For example, Log2Cache::new(4) builds tables holding 5 entries (indices
0,1,2,3,4). Then cache.nlog2n(60000) reads index 60000, far outside the
allocation. Under AddressSanitizer this faults with SEGV; Miri reports it as
undefined behavior at src/log2cache.rs:42.
nlog2n_difference() is off by one further: in the affected versions new(n)
pushes n entries into that table rather than n + 1, so even
nlog2n_difference(n) is out of bounds.
This can be triggered through safe public APIs — Log2Cache::new() and any of
nlog2n(), nlog2n_difference() and plog2p() — with no unsafe required
from the caller.
- Record
RUSTSEC-2026-0411- Updated
- 2026-11-02
Affected packages
| Package | Affected | Fixed |
|---|---|---|
dahl-salsocrates.io |
0.0.0-0 up to 0.7.0 | 0.7.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
RUSTSEC-2026-0411 is a vulnerability with no CVSS score yet in dahl-salso, published October 22, 2026. No source lists public exploit code. Fixed in dahl-salso 0.7.0.