From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-cve-announce@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@kernel.org>
Subject: CVE-2026-139432: btrfs: refactor read_key_bytes() to remove the dest_folio parameter
Date: Mon, 30 Nov 2026 14:37:21 +0100 [thread overview]
Message-ID: <2026113034-CVE-2026-139432-e305@gregkh> (raw)
From: Greg Kroah-Hartman <gregkh@kernel.org>
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.
The Linux kernel CVE team has assigned CVE-2026-139432 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 6.1.193 with commit d8372ed5b688435ade4c5628d1125e6086feb1cc
Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 6.6.163 with commit 4bd53a335becc3b0738eb879e550d8a15e0e2d47
Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 6.12.119 with commit e7e14a217844385a2954a7b008e021c177c735a5
Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 6.18.65 with commit 8de0d7c6bb7fb7867a5b2f2d4bb94826e9e98e24
Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 7.3.6 with commit 474361b0ee085e206e3fccaca2b6463571c43891
Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 7.4-rc1 with commit fdf56b9d03d475881d73b75afbdbe4058db04ffc
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-139432
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/btrfs/verity.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
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
reply other threads:[~2026-11-30 14:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026113034-CVE-2026-139432-e305@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=cve@kernel.org \
--cc=gregkh@kernel.org \
--cc=linux-cve-announce@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.