# RUSTSEC-2026-0411: Out-of-bounds read in `Log2Cache::nlog2n()`, `nlog2n_difference()` and `plog2p()`


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 22 Oct 2026

## What is RUSTSEC-2026-0411?

RUSTSEC-2026-0411 is a vulnerability in dahl-salso, published on 22 Oct 2026. 

### Official description

`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.

## Which versions are affected by RUSTSEC-2026-0411?

1 open source package ship an affected version, including dahl-salso.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `dahl-salso` | crates.io | From 0.0.0-0 | 0.7.0 |

## How do I fix RUSTSEC-2026-0411?

Upgrade dahl-salso to 0.7.0 or later.

## Is RUSTSEC-2026-0411 being exploited?

There is no known exploitation of RUSTSEC-2026-0411 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for RUSTSEC-2026-0411 and fix it if it is affected.

What it is: RUSTSEC-2026-0411 is a vulnerability in dahl-salso, published on 22 Oct 2026. 
Exploitation: There is no known exploitation of RUSTSEC-2026-0411 in the wild and no public exploit code.

Affected packages and fixed versions:
- dahl-salso (crates.io): affected from 0.0.0-0; fixed in 0.7.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/RUSTSEC-2026-0411/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0411/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/RUSTSEC-2026-0411

---
From sbomify Insights: https://insights.sbomify.com/RUSTSEC-2026-0411/
Summaries are generated and may contain mistakes; the official description above is the record.
