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 E134A30F523 for ; Sat, 14 Feb 2026 16:29:00 +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=1771086541; cv=none; b=ZyUHlBXIrp54Uy4u/eYnCh4QM+ZCp+6xpWizepl6T+EWnu5VBOO/ld9b6ZYjmCG/TEG9XZLK4e2Llia5Q3a6JVLEctqDBF0WXJUaQq3LeVgbYtf6BrGwAzle+C9PhBk1GTx9n5TCTsAbUQQECqiFoX0ZwPuT1exl2pZDtRU/Q1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771086541; c=relaxed/simple; bh=31iuciLYQmjP6O0FRlBvFD4uhbCClHgVSonlMLB4/fA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gyHfCcmRtz+zKcOkD0iG1ejoou6BtotDzMD7dGpxjIIK8bspd1aiYYUCp2fMrarf9AtrNWvF8nRPRrW161UQUHtAsRIhBUyuXnpUtibzSPE+SVxyq8d5nulvRGb2w836FWLwkZYbT0fZuQtl8QxWyezlGmafos/5UJe1nbpLqk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Qqp1ArZR; 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="Qqp1ArZR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 017D8C16AAE; Sat, 14 Feb 2026 16:28:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1771086540; bh=31iuciLYQmjP6O0FRlBvFD4uhbCClHgVSonlMLB4/fA=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Qqp1ArZRYMMSD3oDie6n/7I+xGpldZv7JrJb5eo+9gYsP0KzIc0KgH3qvi2D+87S1 78AqEs3LSQU63xXfhMMAJnvNTeFtPs8qKl87ZesKk3hwHRSBqwskR1XTCu6k3k0XOl 4Rl6oNjw/gP7HVZXIKp0UymAeX6yftMk+/nS2vTs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-23181: btrfs: sync read disk super and set block size Date: Sat, 14 Feb 2026 17:28:38 +0100 Message-ID: <2026021429-CVE-2026-23181-7c82@gregkh> X-Mailer: git-send-email 2.53.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=3504; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/qC1TU3vNsegZHNoUM72/oWm8zSPOCcawnI2+fSEbwY=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkTFq1bGpibtj79uviaAyGRi+e9uuQwn+F/+tuln3RUn 8cZ1simdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEjiQxLOgvOr/bPHXpykyL GQVm7OY1iy7KdjEs2MnWWl4cxqnhnfHusu5GadnbAs3FAA== 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: sync read disk super and set block size When the user performs a btrfs mount, the block device is not set correctly. The user sets the block size of the block device to 0x4000 by executing the BLKBSZSET command. Since the block size change also changes the mapping->flags value, this further affects the result of the mapping_min_folio_order() calculation. Let's analyze the following two scenarios: Scenario 1: Without executing the BLKBSZSET command, the block size is 0x1000, and mapping_min_folio_order() returns 0; Scenario 2: After executing the BLKBSZSET command, the block size is 0x4000, and mapping_min_folio_order() returns 2. do_read_cache_folio() allocates a folio before the BLKBSZSET command is executed. This results in the allocated folio having an order value of 0. Later, after BLKBSZSET is executed, the block size increases to 0x4000, and the mapping_min_folio_order() calculation result becomes 2. This leads to two undesirable consequences: 1. filemap_add_folio() triggers a VM_BUG_ON_FOLIO(folio_order(folio) < mapping_min_folio_order(mapping)) assertion. 2. The syzbot report [1] shows a null pointer dereference in create_empty_buffers() due to a buffer head allocation failure. Synchronization should be established based on the inode between the BLKBSZSET command and read cache page to prevent inconsistencies in block size or mapping flags before and after folio allocation. [1] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:create_empty_buffers+0x4d/0x480 fs/buffer.c:1694 Call Trace: folio_create_buffers+0x109/0x150 fs/buffer.c:1802 block_read_full_folio+0x14c/0x850 fs/buffer.c:2403 filemap_read_folio+0xc8/0x2a0 mm/filemap.c:2496 do_read_cache_folio+0x266/0x5c0 mm/filemap.c:4096 do_read_cache_page mm/filemap.c:4162 [inline] read_cache_page_gfp+0x29/0x120 mm/filemap.c:4195 btrfs_read_disk_super+0x192/0x500 fs/btrfs/volumes.c:1367 The Linux kernel CVE team has assigned CVE-2026-23181 to this issue. Affected and fixed versions =========================== Fixed in 6.18.10 with commit ccb3c75d57039adb3170ae54a0d470e359705984 Fixed in 6.19 with commit 3f29d661e5686f3aa14e6f11537ff5c49846f2e2 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-23181 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/volumes.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/ccb3c75d57039adb3170ae54a0d470e359705984 https://git.kernel.org/stable/c/3f29d661e5686f3aa14e6f11537ff5c49846f2e2