In the Linux kernel, the following vulnerability has been resolved:
btrfs: subpage: keep TOWRITE tag until folio is cleaned
btrfs_subpage_set_writeback() calls folio_start_writeback() the first time a folio is written back, and it also clears the PAGECACHE_TAG_TOWRITE tag even if there are still dirty blocks in the folio. This can break ordering guarantees, such as those required by btrfs_wait_ordered_extents().
That ordering breakage leads to a real failure. For example, running generic/464 on a zoned setup will hit the following ASSERT. This happens because the broken ordering fails to flush existing dirty pages before the file size is truncated.
assertion failed: !list_empty(&ordered->list) :: 0, in fs/btrfs/zoned.c:1899 ------------[ cut here ]------------ kernel BUG at fs/btrfs/zoned.c:1899! Oops: invalid opcode: 0000 [#1] SMP NOPTI CPU: 2 UID: 0 PID: 1906169 Comm: kworker/u130:2 Kdump: loaded Not tainted 6.16.0-rc6-BTRFS-ZNS+ #554 PREEMPT(voluntary) Hardware name: Supermicro Super Server/H12SSL-NT, BIOS 2.0 02/22/2021 Workqueue: btrfs-endio-write btrfs_work_helper [btrfs] RIP: 0010:btrfs_finish_ordered_zoned.cold+0x50/0x52 [btrfs] RSP: 0018:ffffc9002efdbd60 EFLAGS: 00010246 RAX: 000000000000004c RBX: ffff88811923c4e0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff827e38b1 RDI: 00000000ffffffff RBP: ffff88810005d000 R08: 00000000ffffdfff R09: ffffffff831051c8 R10: ffffffff83055220 R11: 0000000000000000 R12: ffff8881c2458c00 R13: ffff88811923c540 R14: ffff88811923c5e8 R15: ffff8881c1bd9680 FS: 0000000000000000(0000) GS:ffff88a04acd0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f907c7a918c CR3: 0000000004024000 CR4: 0000000000350ef0 Call Trace: <TASK> ? srso_return_thunk+0x5/0x5f btrfs_finish_ordered_io+0x4a/0x60 [btrfs] btrfs_work_helper+0xf9/0x490 [btrfs] process_one_work+0x204/0x590 ? srso_return_thunk+0x5/0x5f worker_thread+0x1d6/0x3d0 ? __pfx_worker_thread+0x10/0x10 kthread+0x118/0x230 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x205/0x260 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK>
Consider process A calling writepages() with WB_SYNC_NONE. In zoned mode or for compressed writes, it locks several folios for delalloc and starts writing them out. Let's call the last locked folio folio X. Suppose the write range only partially covers folio X, leaving some pages dirty. Process A calls btrfs_subpage_set_writeback() when building a bio. This function call clears the TOWRITE tag of folio X, whose size = 8K and the block size = 4K. It is following state.
0 4K 8K |/////|/////| (flag: DIRTY, tag: DIRTY) <-----> Process A will write this range.
Now suppose process B concurrently calls writepages() with WB_SYNC_ALL. It calls tag_pages_for_writeback() to tag dirty folios with PAGECACHE_TAG_TOWRITE. Since folio X is still dirty, it gets tagged. Then, B collects tagged folios using filemap_get_folios_tag() and must wait for folio X to be written before returning from writepages().
0 4K 8K |/////|/////| (flag: DIRTY, tag: DIRTY|TOWRITE)
However, between tagging and collecting, process A may call btrfs_subpage_set_writeback() and clear folio X's TOWRITE tag. 0 4K 8K | |/////| (flag: DIRTY|WRITEBACK, tag: DIRTY)
As a result, process B won't see folio X in its batch, and returns without waiting for it. This breaks the WB_SYNC_ALL ordering requirement.
Fix this by using btrfs_subpage_set_writeback_keepwrite(), which retains the TOWRITE tag. We now manually clear the tag only after the folio becomes clean, via the xas operation.
CVSS Details
- CVSS 3.1 Base Score: 7.8
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon_linux_2023 | — | Upgrade kernel6.12Upgrade kernel6.12-libbpf-debuginfoUpgrade perf6.12-debuginfoUpgrade kernel6.12-libbpf-develUpgrade kernel-livepatch-6.12.46-66.121Upgrade bpftool6.12-debuginfoUpgrade kernel6.12-debuginfo-common-x86_64Upgrade kernel6.12-develUpgrade python3-perf6.12Upgrade kernel6.12-debuginfoUpgrade kernel6.12-debuginfo-common-aarch64Upgrade kernel6.12-libbpf-staticUpgrade perf6.12Upgrade kernel6.12-headersUpgrade kernel6.12-libbpfUpgrade bpftool6.12Upgrade kernel6.12-modules-extraUpgrade kernel6.12-tools-debuginfoUpgrade kernel6.12-modules-extra-commonUpgrade python3-perf6.12-debuginfoUpgrade kernel6.12-toolsUpgrade kernel6.12-tools-devel | Sep 30, 2025 | Sep 11, 2025 |
| Debian | — | Upgrade linux | Jul 23, 2026 | Jul 23, 2026 |
| Oracle_linux | — | Upgrade kernel-uek | Nov 11, 2025 | Sep 11, 2025 |
| Ubuntu | — | Upgrade linux-image-gke-64kUpgrade linux-image-awsUpgrade linux-image-gcp-fipsUpgrade linux-image-realtimeUpgrade linux-image-gke-64k-6.8Upgrade linux-image-nvidia-6.8Upgrade linux-image-raspiUpgrade linux-image-6.8.0-1047-gcp-64kUpgrade linux-image-6.8.0-100-lowlatencyUpgrade linux-image-virtual-hwe-22.04Upgrade linux-image-lowlatency-6.8Upgrade linux-image-nvidia-64kUpgrade linux-image-gcp-64kUpgrade linux-image-aws-fipsUpgrade linux-image-6.8.0-1047-gcpUpgrade linux-image-oracle-6.8Upgrade linux-image-gcp-64k-6.8Upgrade linux-image-lowlatency-64k-6.8Upgrade linux-image-6.8.0-1043-oracleUpgrade linux-image-aws-lts-24.04Upgrade linux-image-nvidia-lowlatency-64k-6.8Upgrade linux-image-6.8.0-1043-gkeUpgrade linux-image-6.8.1-1041-realtimeUpgrade linux-image-gcp-fips-6.8Upgrade linux-image-6.8.0-1046-awsUpgrade linux-image-xilinx-zynqmpUpgrade linux-image-realtime-6.8.1Upgrade linux-image-virtual-6.8Upgrade linux-image-6.8.0-1043-gke-64kUpgrade linux-image-raspi-6.8Upgrade linux-image-aws-6.8Upgrade linux-image-aws-64k-lts-24.04Upgrade linux-image-gcp-lts-24.04Upgrade linux-image-generic-64kUpgrade linux-image-xilinx-6.8Upgrade linux-image-6.8.0-1046-nvidia-lowlatencyUpgrade linux-image-gkeUpgrade linux-image-oem-22.04dUpgrade linux-image-gke-6.8Upgrade linux-image-kvmUpgrade linux-image-nvidia-hwe-22.04Upgrade linux-image-6.8.0-1044-ibmUpgrade linux-image-6.8.0-1047-raspiUpgrade linux-image-6.8.0-1046-nvidia-lowlatency-64kUpgrade linux-image-azureUpgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-oem-22.04cUpgrade linux-image-aws-fips-6.8Upgrade linux-image-nvidia-lowlatencyUpgrade linux-image-6.8.0-1023-xilinxUpgrade linux-image-nvidia-64k-hwe-22.04Upgrade linux-image-raspi-realtimeUpgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-nvidia-lowlatency-64kUpgrade linux-image-lowlatency-64k-hwe-22.04Upgrade linux-image-xilinxUpgrade linux-image-oem-22.04bUpgrade linux-image-oem-22.04aUpgrade linux-image-lowlatency-64kUpgrade linux-image-realtime-hwe-22.04Upgrade linux-image-azure-lts-24.04Upgrade linux-image-raspi-realtime-6.8Upgrade linux-image-generic-hwe-22.04Upgrade linux-image-6.8.0-100-genericUpgrade linux-image-intel-iotgUpgrade linux-image-intel-iot-realtimeUpgrade linux-image-ibmUpgrade linux-image-gkeopUpgrade linux-image-genericUpgrade linux-image-6.8.0-100-generic-64kUpgrade linux-image-azure-6.8Upgrade linux-image-gcpUpgrade linux-image-6.8.0-1051-azureUpgrade linux-image-oracleUpgrade linux-image-6.8.0-1047-gcp-fipsUpgrade linux-image-6.8.0-1043-oracle-64kUpgrade linux-image-fipsUpgrade linux-image-azure-fipsUpgrade linux-image-6.8.0-1046-nvidia-64kUpgrade linux-image-virtualUpgrade linux-image-6.8.0-1046-aws-64kUpgrade linux-image-nvidiaUpgrade linux-image-lowlatencyUpgrade linux-image-gkeop-6.8Upgrade linux-image-generic-lpaeUpgrade linux-image-aws-64kUpgrade linux-image-6.8.0-1046-azureUpgrade linux-image-6.8.0-1046-aws-fipsUpgrade linux-image-oracle-64k-6.8Upgrade linux-image-6.8.0-1030-gkeopUpgrade linux-image-oracle-lts-24.04Upgrade linux-image-6.8.0-100-fipsUpgrade linux-image-6.8.0-100-lowlatency-64kUpgrade linux-image-oem-22.04Upgrade linux-image-gcp-6.8Upgrade linux-image-fips-6.8Upgrade linux-image-oracle-64kUpgrade linux-image-nvidia-lowlatency-6.8Upgrade linux-image-nvidia-64k-6.8Upgrade linux-image-lowlatency-hwe-22.04Upgrade linux-image-ibm-lts-24.04Upgrade linux-image-ibm-classicUpgrade linux-image-ibm-6.8Upgrade linux-image-generic-64k-hwe-22.04Upgrade linux-image-generic-6.8Upgrade linux-image-generic-64k-6.8Upgrade linux-image-6.8.0-2037-raspi-realtimeUpgrade linux-image-6.8.0-1046-azure-fipsUpgrade linux-image-aws-64k-6.8Upgrade linux-image-azure-fips-6.8Upgrade linux-image-6.8.0-1046-nvidia | Feb 12, 2026 | Sep 11, 2025 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub