cve.bz

CVE-2025-39779 linux linux kernel

5.5 mediumEPSS 0.2%Fix available

Medium (5.5) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 5th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-39779 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-39779?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-39779?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-39779 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.13 and later

Fixed in

ProductRelease lineFixed in
Linux6.126.12.44
Linux6.166.16.4
Linuxlater releases6.17

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linuxno fix listedDEBIAN-CVE-2025-39779
Debian13linux6.12.48-1DEBIAN-CVE-2025-39779 DSA-6008-1
Debian14linux6.16.5-1DEBIAN-CVE-2025-39779
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-39779
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-39779
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-39779
Ubuntu22.04:LTSlinux, linux-riscv, linux-aws-6.2 and 32 moreno fix listedUBUNTU-CVE-2025-39779 USN-8961-1
Ubuntu22.04:LTSlinux-aws5.15.0-1119.126UBUNTU-CVE-2025-39779 USN-8961-1
Ubuntu22.04:LTSlinux-aws-6.8, linux-nvidia-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-39779 USN-8028-5
Ubuntu22.04:LTSlinux-azure5.15.0-1125.134UBUNTU-CVE-2025-39779 USN-8961-1
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-39779 USN-8126-1
Ubuntu22.04:LTSlinux-azure-fde5.15.0-1124.133UBUNTU-CVE-2025-39779 USN-8962-1
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1046.53~22.04.1UBUNTU-CVE-2025-39779
Ubuntu22.04:LTSlinux-gcp5.15.0-1120.130UBUNTU-CVE-2025-39779 USN-8961-1
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1047.50~22.04.2UBUNTU-CVE-2025-39779 USN-8031-1
60 more for Ubuntu in the JSON and on Ubuntu's page.
SUSELinux Enterprise High Availability Extension 16.0kernel-default6.12.0-160000.7.1SUSE-SU-2025:21180-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0kernel-64kb, kernel-docs, kernel-syms and 5 more6.12.0-160000.7.1SUSE-SU-2025:21147-1
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0kernel-default-base6.12.0-160000.6.1.160000.2.4SUSE-SU-2025:21147-1
SUSELinux Micro 6.2kernel-default-base6.12.0-160000.6.1.160000.2.4SUSE-SU-2025:21080-1
SUSELinux Micro 6.2kernel-rt, kernel-64kb, kernel-source and 1 more6.12.0-160000.7.1SUSE-SU-2025:21080-1
SUSELinux Micro Extras 6.2kernel-syms, kernel-obs-build6.12.0-160000.7.1SUSE-SU-2026:20561-1
openSUSELeap 16.0kernel-default-base6.12.0-160000.6.1.160000.2.4openSUSE-SU-2025:20091-1
openSUSELeap 16.0kernel-rt, dtb-aarch64, kernel-64kb and 8 more6.12.0-160000.7.1openSUSE-SU-2025:20091-1
Azure Linux2kernelno fix listedAZL-70831
Azure Linux3kernelno fix listedAZL-67169
Alpaquita23linux-ltsno fix listedBELL-CVE-2025-39779
Alpaquita25linux-lts6.12.44-r0BELL-CVE-2025-39779
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-39779

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Low.

Red Hat's statement

This vulnerability does not present an operational risk to Red Hat Enterprise Linux as the Btrfs filesystem is not supported and the vulnerable subpage writeback code is not present in shipping kernels. In upstream environments, this issue can trigger a kernel assertion failure during concurrent writeback operations on zoned or compressed Btrfs filesystems, leading to a denial of service. Because Red Hat Enterprise Linux kernels do not incorporate the affected subpage mechanisms, typical deployments are entirely unaffected.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-39779.

References

Check your stackJSON