Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 49235385D79 for ; Thu, 24 Sep 2026 15:52:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790265135; cv=none; b=s+zi1npODQOfwioIxPmeB+DU+XOF92aNXLbmQiKWJjerNTHtz661Wt49+q+U9zVXsLBm0DHrGXejiaT98TMUOa3glAff5WYmrCluXNjJZ7KLO9m1L4mreWUHNGGi3mlo6O6fiHQNa+C3EvcXZpcGD0DbSQGIXvDR3cKpCDVXqfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790265135; c=relaxed/simple; bh=qpzbnSuFi+/QSiVE1OCovO/J7w/wdkSFPzdrw+tu/eg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NEisgqnBO4EfujYz+wn8YZF/y1fpS8WrC6yTDoai7rnbzTSzzW5IR9VFqw3BPM3T8Q2Y7uorO08JyM1B5F6VhHQfV+I74fZuMZXTNWRRsrMKDfOOhOgRdwm+SURKqPZKDxQQqT26vCXtJOVNiT+OAFqrKGTFZUgqDEC78vT3S+c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=l3TX/gMW; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="l3TX/gMW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CAB61F000FF; Thu, 24 Sep 2026 15:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790265133; bh=WQN8Q+8OyHyr/lPmSlYMSl6HZqgcV27FoX8SLtzb+HY=; h=From:To:Cc:Subject:Date:Reply-To; b=l3TX/gMWvOnf1pYXBTTc/MWsIyspYcNlWoXZtbIxJ2UzpClWNCU3mzmqK6/VhcXgf tmT5IT4490dRf6vGukca6nsmjBnC6/oof5UW7izvvpKlvWAP3To5ZUkKKe6Soh2a// 5aQYKI82sLlvBfO9l90ARpTOcKm/Os5AwCS5qYCM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-93255: btrfs: make sure EXTENT_BUFFER_READING is cleared under refs_lock Date: Thu, 24 Sep 2026 17:51:15 +0200 Message-ID: <2026092408-CVE-2026-93255-24f4@gregkh> X-Mailer: git-send-email 2.55.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=5137; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nWVMY1kbvWmGig7UEcbHz9t1SoGtoe8wInwSNzCx5OQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlb3d6YvBNQqf8TelN77dorwV+DjL9nPpt8vqxD0cL+n uLuEq6XHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjAR3i8M811O/xT6rdnbfoJ7 wYao+Lb4WcLx2xnmu6nPZTsXerOjZaOGr/mxW+6HP2pwAAA= 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: make sure EXTENT_BUFFER_READING is cleared under refs_lock [FALSE ALERTS] There is a bug report that the warning inside invalidate_and_check_btree_folios() got triggered during btrfs/298: BTRFS info (device sdd): first mount of filesystem f9bf732a-a19b-44b9-99a7-614ddff168e2 BTRFS info (device sdd): using crc32c checksum algorithm BTRFS error (device sdd): failed to find fsid cb2fdb42-b638-4f2f-badd-4127467ba674 when attempting to open seed devices BTRFS error (device sdd): failed to read chunk tree: -2 ------------[ cut here ]------------ WARNING: disk-io.c:3342 at invalidate_and_check_btree_folios+0x260/0x3c0 [btrfs], CPU#4: mount/125993 CPU: 4 UID: 0 PID: 125993 Comm: mount Tainted: G W OE 7.1.0-rc7-custom+ #1 PREEMPT(full) Hardware name: QEMU KVM Virtual Machine, BIOS edk2-20250812-19.fc42 08/12/2025 Call trace: invalidate_and_check_btree_folios+0x260/0x3c0 [btrfs] (P) open_ctree+0x1f50/0x23b0 [btrfs] btrfs_get_tree+0x89c/0xc48 [btrfs] vfs_get_tree+0x30/0x110 vfs_cmd_create+0x58/0xe8 __arm64_sys_fsconfig+0x39c/0x518 invoke_syscall.constprop.0+0x48/0x120 el0_svc_common.constprop.0+0x40/0xe8 do_el0_svc+0x24/0x38 el0_svc+0x50/0x310 el0t_64_sync_handler+0xa0/0xe8 el0t_64_sync+0x198/0x1a0 ---[ end trace 0000000000000000 ]--- BTRFS warning (device sdd): unable to release extent buffer 365985792 owner 3 gen 17 refs 3 flags 0x5 [CAUSE] In that invalidate_and_check_btree_folios() we wait for the eb to finish its read, then check if it's only held by us and the btree inode. If not, then do a warning as it may be still held, and could cause problems. But there is a small window where the check can lead to false alerts: Thread A (Read endio) | Thread B (Unmount) ----------------------------------+------------------------------------- end_bbio_meta_read() | | The eb has one extra ref held | | by the reader, and has | | EXTENT_BUFFER_READING flag set | invalidate_and_check_btree_folios() | | | |- clear_extent_buffer_reading() | | | | |- wait_on_bit_io(); | | | The EXTENT_BUFFER_READING flag is | | | cleared | | |- if (refcount_read(eb->refs) > 2) | | The eb is held by the read, us | | and btree inode, thus it | | will trigger the warning |- free_extent_buffer() | [FIX] Introduce a helper, free_extent_buffer_clear_reading(). If the new parameter, @clear_reading, is set, we will hold the spinlock at the beginning of free_extent_buffer_clear_reading() to make sure the EXTENT_BUFFER_READING flag is cleared inside the same critical section of decreasing refs. Now free_extent_buffer() will just call free_extent_buffer_clear_reading() with @clear_reading set to false, so no behavior change. But for end_bbio_meta_read(), it will not clear_extent_buffer_reading() directly, but pass @clear_reading as true. Then inside invalidate_and_check_btree_folios(), hold the refs_lock before reading refs. So that we eliminate the race window completely. The Linux kernel CVE team has assigned CVE-2026-93255 to this issue. Affected and fixed versions =========================== Issue introduced in 7.2 with commit 83f7e52b7ed1c3e03b79123e20b6f6adf8d886bb and fixed in 7.2.6 with commit 2073f3d97b0c5d34fe64812d1237e37bd79c17ec Issue introduced in 7.2 with commit 83f7e52b7ed1c3e03b79123e20b6f6adf8d886bb and fixed in 7.3-rc1 with commit 690c2accacb1aca91ab8186d15dee56da8723f31 Issue introduced in 7.1.8 with commit b0c33c0628c5b0678fcae2e05e7b2764149248f8 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-93255 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/disk-io.c fs/btrfs/extent_io.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/2073f3d97b0c5d34fe64812d1237e37bd79c17ec https://git.kernel.org/stable/c/690c2accacb1aca91ab8186d15dee56da8723f31