CVE-2026-139432: btrfs: refactor read_key_bytes() to remove the dest_folio parameter
btrfs: refactor readkeybytes() to remove the destfolio parameter
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In the Linux kernel Btrfs code, remove the @dest_folio parameter from read_key_bytes(); have the btrfs_read_merkle_tree_page() caller map the folio and pass the mapped kernel address to read_key_bytes().
Event History
Frequently Asked Questions
What condition is needed to trigger the faulty read path?
The affected path is btrfs_read_merkle_tree_page() reading BTRFS_VERITY_MERKLE_ITEM_KEY data. It occurs when a highmem folio is not mapped, so folio_address(folio) returns NULL and is passed as the destination.
What happens when the condition is reached?
A NULL destination causes read_key_bytes() not to load Merkle data into the supplied destination folio, even when a destination folio was provided. The Merkle data may therefore remain unwritten in that folio.
Are fs-verity descriptor reads affected in the same way?
The two read_key_bytes() call sites used by btrfs_get_verity_descriptor() do not use the destination-folio parameter. They read small, fixed-size description items rather than the potentially multi-item Merkle data.
What is the available remediation?
The vulnerability is described as resolved by refactoring read_key_bytes() to remove the destination-folio parameter and the problematic destination handling. The provided references identify stable-kernel commits containing the resolution.