Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E0FC3C9EFC for ; Fri, 1 May 2026 14:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777645322; cv=none; b=pAnXbpeoQK4WeBpuM/Sr+p0lr70taQZbqJ52JSeymEC/4FVtbw2X+TW2i52PAiu0um3FGvT1oZ6iNFo6O1vHmt54f0eCDr3v914iuguv5ZdTkw08jZP1Mz1Ip4S2Wg9QLIT/6Y07tuENgIQ1kE8BFlvSFc3g5htFmiwLkFp30Ic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777645322; c=relaxed/simple; bh=DJaNt0BmI7lQ6ktCD+u8N/lJPH8+aeqPWcqE6Cvvs3Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=P6XddFBpzqDoJbZsAIeZ5oVAZz7RRbL4vqv8VbdnEa+EM+KvuLTGxgnzK3yIfpoaqJFlvj2DtFUNr3ap01YYuYkoirwqkxuMy6m/beOM0dd8riOc2BrN0966asPtoIzpVEiVOoo+HRNTZO96HA//4kf0ZV0b61GWogcAKF+Esi4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UO9GzUMH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UO9GzUMH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E750FC2BCB4; Fri, 1 May 2026 14:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777645322; bh=DJaNt0BmI7lQ6ktCD+u8N/lJPH8+aeqPWcqE6Cvvs3Q=; h=From:To:Cc:Subject:Date:Reply-To:From; b=UO9GzUMHW/dyF1InxzTkC+uoilS3t8p/8lz3gfrblZudmHIzYaj7XubbJvgkw90+E JERcRKjxwsDlMJ0jYCWd08qq5WxDxJFYknVRok3lBWGEaUNIZ7tHIvGI5y/i4fT62c 8qdVvXcP0N2SPDuQz49J8Yu0f9R8/92+JLDzj4oM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-43046: btrfs: reject root items with drop_progress and zero drop_level Date: Fri, 1 May 2026 16:16:19 +0200 Message-ID: <2026050105-CVE-2026-43046-0fa9@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5327; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AClro2JcIISIPArdMdFwGYgJTdHxE4Li/HCAvgom7NI=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlftmY6HLCadurh3zyvuO1CE0I4Vl5a37tbNdJpnTeff KGX8kGnjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIQSrDPOPg9U9XbmrKaPS1 q8/y+/b0ruN3Xoa5Eg9XPOHkevDM51jGvY6jXZveqprpAgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: btrfs: reject root items with drop_progress and zero drop_level [BUG] When recovering relocation at mount time, merge_reloc_root() and btrfs_drop_snapshot() both use BUG_ON(level == 0) to guard against an impossible state: a non-zero drop_progress combined with a zero drop_level in a root_item, which can be triggered: ------------[ cut here ]------------ kernel BUG at fs/btrfs/relocation.c:1545! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 1 UID: 0 PID: 283 ... Tainted: 6.18.0+ #16 PREEMPT(voluntary) Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE Hardware name: QEMU Ubuntu 24.04 PC v2, BIOS 1.16.3-debian-1.16.3-2 RIP: 0010:merge_reloc_root+0x1266/0x1650 fs/btrfs/relocation.c:1545 Code: ffff0000 00004589 d7e9acfa ffffe8a1 79bafebe 02000000 Call Trace: merge_reloc_roots+0x295/0x890 fs/btrfs/relocation.c:1861 btrfs_recover_relocation+0xd6e/0x11d0 fs/btrfs/relocation.c:4195 btrfs_start_pre_rw_mount+0xa4d/0x1810 fs/btrfs/disk-io.c:3130 open_ctree+0x5824/0x5fe0 fs/btrfs/disk-io.c:3640 btrfs_fill_super fs/btrfs/super.c:987 [inline] btrfs_get_tree_super fs/btrfs/super.c:1951 [inline] btrfs_get_tree_subvol fs/btrfs/super.c:2094 [inline] btrfs_get_tree+0x111c/0x2190 fs/btrfs/super.c:2128 vfs_get_tree+0x9a/0x370 fs/super.c:1758 fc_mount fs/namespace.c:1199 [inline] do_new_mount_fc fs/namespace.c:3642 [inline] do_new_mount fs/namespace.c:3718 [inline] path_mount+0x5b8/0x1ea0 fs/namespace.c:4028 do_mount fs/namespace.c:4041 [inline] __do_sys_mount fs/namespace.c:4229 [inline] __se_sys_mount fs/namespace.c:4206 [inline] __x64_sys_mount+0x282/0x320 fs/namespace.c:4206 ... RIP: 0033:0x7f969c9a8fde Code: 0f1f4000 48c7c2b0 fffffff7 d8648902 b8ffffff ffc3660f ---[ end trace 0000000000000000 ]--- The bug is reproducible on 7.0.0-rc2-next-20260310 with our dynamic metadata fuzzing tool that corrupts btrfs metadata at runtime. [CAUSE] A non-zero drop_progress.objectid means an interrupted btrfs_drop_snapshot() left a resume point on disk, and in that case drop_level must be greater than 0 because the checkpoint is only saved at internal node levels. Although this invariant is enforced when the kernel writes the root item, it is not validated when the root item is read back from disk. That allows on-disk corruption to provide an invalid state with drop_progress.objectid != 0 and drop_level == 0. When relocation recovery later processes such a root item, merge_reloc_root() reads drop_level and hits BUG_ON(level == 0). The same invalid metadata can also trigger the corresponding BUG_ON() in btrfs_drop_snapshot(). [FIX] Fix this by validating the root_item invariant in tree-checker when reading root items from disk: if drop_progress.objectid is non-zero, drop_level must also be non-zero. Reject such malformed metadata with -EUCLEAN before it reaches merge_reloc_root() or btrfs_drop_snapshot() and triggers the BUG_ON. After the fix, the same corruption is correctly rejected by tree-checker and the BUG_ON is no longer triggered. The Linux kernel CVE team has assigned CVE-2026-43046 to this issue. Affected and fixed versions =========================== Fixed in 5.15.203 with commit bedaf7d0b9d793e116f16b4d9a7dbc94bcc80443 Fixed in 6.1.168 with commit ac68a9a8e481ab1becaed29d6d23087dac3de15d Fixed in 6.6.134 with commit 295f8075d00442d71dc9ccae421ace1c0d2d9224 Fixed in 6.12.81 with commit 53ceedd1eb6280ca8359664e0226983eded2ed73 Fixed in 6.18.22 with commit 850de3d87f4720b71ccdcd44f4aa57e46b53a3f3 Fixed in 6.19.12 with commit de585ee18dd5601745f65a60fef7b7ceebd78c83 Fixed in 7.0 with commit b17b79ff896305fd74980a5f72afec370ee88ca4 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-43046 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/tree-checker.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/bedaf7d0b9d793e116f16b4d9a7dbc94bcc80443 https://git.kernel.org/stable/c/ac68a9a8e481ab1becaed29d6d23087dac3de15d https://git.kernel.org/stable/c/295f8075d00442d71dc9ccae421ace1c0d2d9224 https://git.kernel.org/stable/c/53ceedd1eb6280ca8359664e0226983eded2ed73 https://git.kernel.org/stable/c/850de3d87f4720b71ccdcd44f4aa57e46b53a3f3 https://git.kernel.org/stable/c/de585ee18dd5601745f65a60fef7b7ceebd78c83 https://git.kernel.org/stable/c/b17b79ff896305fd74980a5f72afec370ee88ca4