{"id":"CVE-2026-139432","aliases":["CVE-2026-139432"],"related":[],"kind":"vulnerability","state":"published","title":"btrfs: refactor read_key_bytes() to remove the dest_folio parameter","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: refactor read_key_bytes() to remove the dest_folio parameter\n\nThe function read_key_bytes() have 3 call sites:\n\n- For BTRFS_VERITY_DESC_ITEM_KEY offset 0 inside btrfs_get_verity_descriptor()\n- For BTRFS_VERITY_DESC_ITEM_KEY offset 1 inside btrfs_get_verity_descriptor()\n  Those are to read the description items, which are pretty small with\n  fixed item size.\n\n  Those call sites do not utilize the @dest_folio parameter.\n\n- For btrfs_read_merkle_tree_page()\n  This is to read the BTRFS_VERITY_MERKLE_ITEM_KEY, which can be pretty\n  large and split into multiple items.\n\n  This is the only call site utilizing the @dest_folio parameter.\n\nJust for the only btrfs_read_merkle_tree_page() call site, we have a\ncomplex scheme for @dest and @dest_folio parameters.\nSince @dest can be NULL, it means if we pass @dest as NULL, then no\nmatter if @dest_folio is provided, the merkle data will not be loaded\ninto that @dest_folio.\n\nThis can lead to a bug where a highmem folio is not mapped, then we pass\nfolio_address(folio), which is NULL, into read_key_bytes(), causing no\ndata to be written into @dest_folio.\n\nTo address the complex scheme between @dest and @dest_folio, remove the\n@dest_folio parameter completely, and let the only caller to map the\nfolio and pass the mapped kernel address into read_key_bytes() instead.\n\nThis not only reduces the parameter list, but also make it much clear on\nthe @dest parameter handling.\nThe only downside is a longer duration of locally mapped page, but this\nshould still be fine, as kmap_local_folio() can survive context switch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: refactor read_key_bytes() to remove the dest_folio parameter\n\nThe function read_key_bytes() have 3 call sites:\n\n- For BTRFS_VERITY_DESC_ITEM_KEY offset 0 inside btrfs_get_verity_descriptor()\n- For BTRFS_VERITY_DESC_ITEM_KEY offset 1 inside btrfs_get_verity_descriptor()\n  Those are to read the description items, which are pretty small with\n  fixed item size.\n\n  Those call sites do not utilize the @dest_folio parameter.\n\n- For btrfs_read_merkle_tree_page()\n  This is to read the BTRFS_VERITY_MERKLE_ITEM_KEY, which can be pretty\n  large and split into multiple items.\n\n  This is the only call site utilizing the @dest_folio parameter.\n\nJust for the only btrfs_read_merkle_tree_page() call site, we have a\ncomplex scheme for @dest and @dest_folio parameters.\nSince @dest can be NULL, it means if we pass @dest as NULL, then no\nmatter if @dest_folio is provided, the merkle data will not be loaded\ninto that @dest_folio.\n\nThis can lead to a bug where a highmem folio is not mapped, then we pass\nfolio_address(folio), which is NULL, into read_key_bytes(), causing no\ndata to be written into @dest_folio.\n\nTo address the complex scheme between @dest and @dest_folio, remove the\n@dest_folio parameter completely, and let the only caller to map the\nfolio and pass the mapped kernel address into read_key_bytes() instead.\n\nThis not only reduces the parameter list, but also make it much clear on\nthe @dest parameter handling.\nThe only downside is a longer duration of locally mapped page, but this\nshould still be fine, as kmap_local_folio() can survive context switch.","source":"cvelist"}],"published":"2026-11-30T13:34:42.215Z","modified":"2026-11-30T14:19:13.293Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"146054090b0859b28fc39015c7704ccc3c3a347f","fixed":"d8372ed5b688435ade4c5628d1125e6086feb1cc","status":"affected"},{"type":"git","introduced":"146054090b0859b28fc39015c7704ccc3c3a347f","fixed":"4bd53a335becc3b0738eb879e550d8a15e0e2d47","status":"affected"},{"type":"git","introduced":"146054090b0859b28fc39015c7704ccc3c3a347f","fixed":"e7e14a217844385a2954a7b008e021c177c735a5","status":"affected"},{"type":"git","introduced":"146054090b0859b28fc39015c7704ccc3c3a347f","fixed":"8de0d7c6bb7fb7867a5b2f2d4bb94826e9e98e24","status":"affected"},{"type":"git","introduced":"146054090b0859b28fc39015c7704ccc3c3a347f","fixed":"474361b0ee085e206e3fccaca2b6463571c43891","status":"affected"},{"type":"git","introduced":"146054090b0859b28fc39015c7704ccc3c3a347f","fixed":"fdf56b9d03d475881d73b75afbdbe4058db04ffc","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/d8372ed5b688435ade4c5628d1125e6086feb1cc","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4bd53a335becc3b0738eb879e550d8a15e0e2d47","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e7e14a217844385a2954a7b008e021c177c735a5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8de0d7c6bb7fb7867a5b2f2d4bb94826e9e98e24","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/474361b0ee085e206e3fccaca2b6463571c43891","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fdf56b9d03d475881d73b75afbdbe4058db04ffc","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139432","url":"https://www.cve.org/CVERecord?id=CVE-2026-139432","licence":"CVE Terms of Use","modified":"2026-11-30T13:34:42.215Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139432","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139432","licence":"Public domain","modified":"2026-11-30T14:19:13.293Z"}],"updatedAt":"2026-11-30T14:33:10.618Z","epss":{"score":0.00216,"percentile":0.1273,"date":"2026-12-01T12:00:22.000Z"}}