Linux btrfs: read_key_bytes() dest_folio parameter removed
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from CNA.
Summary
In the Linux kernel btrfs code, read_key_bytes() could leave a highmem Merkle tree folio unmapped. The only caller then passed folio_address(folio), which is NULL in that case, so no data was written into the destination folio. The fix removes the dest_folio parameter, and the caller now maps the folio and passes the mapped kernel address.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Affected versions start at Linux 5.15. Upgrade to 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6, or 7.4-rc1 or later.
Written with Claude Haiku 5.5 from the sources below · 2026-11-30
- Fix · CNA Linux (Linux) Fixed in 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6, 7.4-rc1
Timeline
- 2026-11-30 Threatist record created from CVE-2026-139432
- 2026-11-30 Alias added: GHSA-ww59-784p-q7x9
References
Other 6
- https://git.kernel.org/stable/c/d8372ed5b688435ade4c5628d1125e6086feb1cc
- https://git.kernel.org/stable/c/4bd53a335becc3b0738eb879e550d8a15e0e2d47
- https://git.kernel.org/stable/c/e7e14a217844385a2954a7b008e021c177c735a5
- https://git.kernel.org/stable/c/8de0d7c6bb7fb7867a5b2f2d4bb94826e9e98e24
- https://git.kernel.org/stable/c/474361b0ee085e206e3fccaca2b6463571c43891
- https://git.kernel.org/stable/c/fdf56b9d03d475881d73b75afbdbe4058db04ffc
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-139432 · CVE Program
- CVE-2026-139432 · NVD
- GHSA-ww59-784p-q7x9 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences