# CVE-2026-99159: ring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 28 Oct 2026
- **Updated:** 28 Oct 2026
- **Also known as:** BELL-CVE-2026-99159, DEBIAN-CVE-2026-99159, GHSA-pqhv-wx6p-7gp4, UBUNTU-CVE-2026-99159

## What is CVE-2026-99159?

CVE-2026-99159 is a vulnerability in Linux, published on 28 Oct 2026. 

### Official description

In the Linux kernel, the following vulnerability has been resolved:

ring-buffer: Fix the sub-buffer array base in rb_meta_subbuf_idx()

On a persistent ring buffer, rb_meta_subbuf_idx() can return an index one
sub-buffer too high.  rb_setup_ids_meta_page() then fills subbuf_ids[]
shifted by one and leaves subbuf_ids[0] NULL, which __rb_map_vma()
dereferences when userspace maps trace_pipe_raw.  rb_update_meta_reader()
writes two such indices into meta->buffers[], which rb_cpu_meta_valid()
would reject on the next boot, discarding the previous boot's trace.

A CPU's sub-buffer array starts after its meta header and the nr_subbufs
integers that follow, aligned up to a sub-buffer.  rb_meta_subbuf_idx()
inverts that calculation but skips only the integers, not the header, so
its base is one sub-buffer low whenever the omitted header size crosses
the alignment boundary.

Invert the calculation with rb_subbufs_from_meta() rather than repeating
it.  rb_range_buffer() maps an index back to an address through the same
helper, so the two directions can no longer disagree.

## Which versions are affected by CVE-2026-99159?


## How do I fix CVE-2026-99159?

Upgrade to a fixed version.

## Is CVE-2026-99159 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-99159 and fix it if it is affected.

What it is: CVE-2026-99159 is a vulnerability in Linux, published on 28 Oct 2026. 
Exploitation: There is no known exploitation of CVE-2026-99159 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

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/CVE-2026-99159/ (Markdown: https://insights.sbomify.com/CVE-2026-99159/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-99159
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-99159
- OSV: https://osv.dev/vulnerability/CVE-2026-99159

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