# CVE-2026-139432: btrfs: refactor read_key_bytes() to remove the dest_folio parameter


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 30 Nov 2026
- **Updated:** 30 Nov 2026
- **Also known as:** BELL-CVE-2026-139432, DEBIAN-CVE-2026-139432, GHSA-ww59-784p-q7x9, UBUNTU-CVE-2026-139432

## What is CVE-2026-139432?

CVE-2026-139432 is a vulnerability in Linux, published on 30 Nov 2026. 

### Official description

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

btrfs: refactor read_key_bytes() to remove the dest_folio parameter

The function read_key_bytes() have 3 call sites:

- For BTRFS_VERITY_DESC_ITEM_KEY offset 0 inside btrfs_get_verity_descriptor()
- For BTRFS_VERITY_DESC_ITEM_KEY offset 1 inside btrfs_get_verity_descriptor()
  Those are to read the description items, which are pretty small with
  fixed item size.

  Those call sites do not utilize the @dest_folio parameter.

- For btrfs_read_merkle_tree_page()
  This is to read the BTRFS_VERITY_MERKLE_ITEM_KEY, which can be pretty
  large and split into multiple items.

  This is the only call site utilizing the @dest_folio parameter.

Just for the only btrfs_read_merkle_tree_page() call site, we have a
complex scheme for @dest and @dest_folio parameters.
Since @dest can be NULL, it means if we pass @dest as NULL, then no
matter if @dest_folio is provided, the merkle data will not be loaded
into that @dest_folio.

This can lead to a bug where a highmem folio is not mapped, then we pass
folio_address(folio), which is NULL, into read_key_bytes(), causing no
data to be written into @dest_folio.

To address the complex scheme between @dest and @dest_folio, remove the
@dest_folio parameter completely, and let the only caller to map the
folio and pass the mapped kernel address into read_key_bytes() instead.

This not only reduces the parameter list, but also make it much clear on
the @dest parameter handling.
The only downside is a longer duration of locally mapped page, but this
should still be fine, as kmap_local_folio() can survive context switch.

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


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

Upgrade to a fixed version.

## Is CVE-2026-139432 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-139432 is a vulnerability in Linux, published on 30 Nov 2026. 
Exploitation: There is no known exploitation of CVE-2026-139432 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-139432/ (Markdown: https://insights.sbomify.com/CVE-2026-139432/index.md)
```

## Sources

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

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