CVE-2026-53122·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock between reflink and transaction commit when using flushoncommit When using the flushoncommit mount option, we can have a deadlock between a transaction commit and a reflink operation that copied an inline extent to an offset beyond the current i_size of the destination node. The deadlock happens like this: 1) Task A clones an inline extent from inode X to an offset of inode Y that is beyond Y's current i_size. This means we copied the inline extent's data to a folio of inode Y that is beyond its EOF, using a call to copy_inline_to_page(); 2) Task B starts a transaction commit and calls btrfs_start_delalloc_flush() to flush delalloc; 3) The delalloc flushing sees the new dirty folio of inode Y and when it attempts to flush it, it ends up at extent_writepage() and sees that the offset of the folio is beyond the i_size of inode Y, so it attempts to invalidate the folio by calling folio_invalidate(), which ends up at btrfs' folio invalidate callback - btrfs_invalidate_folio(). There it tries to lock the folio's range in inode Y's extent io tree, but it blocks since it's currently locked by task A - during a reflink we lock the inodes and the source and destination ranges after flushing all delalloc and waiting for ordered extent completion - after that we don't expect to have dirty folios in the ranges, the exception is if we have to copy an inline extent's data (because the destination offset is not zero); 4) Task A then attempts to start a transaction to update the inode item, and then it's blocked since the current transaction is in the TRANS_STATE_COMMIT_START state. Therefore task A has to wait for the current transaction to become unblocked (its state >= TRANS_STATE_UNBLOCKED). So task A is waiting for the transaction commit done by task B, and the later waiting on the extent lock of inode Y that is currently held by task A. Syzbot recently reported this with the following stack traces: INFO: task kworker/u8:7:1053 blocked for more than 143 seconds. Not tainted syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u8:7 state:D stack:23520 pid:1053 tgid:1053 ppid:2 task_flags:0x4208060 flags:0x00080000 Workqueue: writeback wb_workfn (flush-btrfs-46) Call Trace: <TASK> context_switch kernel/sched/core.c:5298 [inline] __schedule+0x1553/0x5240 kernel/sched/core.c:6911 __schedule_loop kernel/sched/core.c:6993 [inline] schedule+0x164/0x360 kernel/sched/core.c:7008 wait_extent_bit fs/btrfs/extent-io-tree.c:811 [inline] btrfs_lock_extent_bits+0x59c/0x700 fs/btrfs/extent-io-tree.c:1914 btrfs_lock_extent fs/btrfs/extent-io-tree.h:152 [inline] btrfs_invalidate_folio+0x43d/0xc40 fs/btrfs/inode.c:7704 extent_writepage fs/btrfs/extent_io.c:1852 [inline] extent_write_cache_pages fs/btrfs/extent_io.c:2580 [inline] btrfs_writepages+0x12ff/0x2440 fs/btrfs/extent_io.c:2713 do_writepages+0x32e/0x550 mm/page-writeback.c:2554 __writeback_single_inode+0x133/0x11a0 fs/fs-writeback.c:1750 writeback_sb_inodes+0x995/0x19d0 fs/fs-writeback.c:2042 wb_writeback+0x456/0xb70 fs/fs-writeback.c:2227 wb_do_writeback fs/fs-writeback.c:2374 [inline] wb_workfn+0x41a/0xf60 fs/fs-writeback.c:2414 process_one_work kernel/workqueue.c:3276 [inline] process_scheduled_works+0xb6e/0x18c0 kernel/workqueue.c:3359 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3440 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 </TASK> INFO: task syz.4.64:6910 blocked for more than 143 seconds. Not tainted syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz.4.64 state:D stack:22752 pid:6910 tgid: ---truncated---
- Severity
- medium
- Software
- Kernel
- Fixed in
- 7.0.10
- Published
Affected versions
From: 6.19
Until: 7.0.10
Fixed in: 7.0.10
How to fix this CVE
Update your Linux kernel to version 7.0.10 or later to resolve this deadlock vulnerability affecting systems using the btrfs filesystem with flushoncommit mount option. The fix prevents a race condition between reflink operations and transaction commits that can cause the system to hang. After updating the kernel, reboot your system to apply the changes.
sudo dnf update kernel kernel-devel && sudo rebootDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare against version 7.0.10
- Step 2: Verify if btrfs filesystem is in use with `mount | grep btrfs` and check if flushoncommit option is enabled with `mount | grep flushoncommit`
- Step 3: Monitor system logs for hung task warnings with `journalctl -xe | grep -i 'hung task'` or check dmesg for blocked workqueue processes
- Step 4: After patching, confirm kernel version with `uname -r` shows 7.0.10 or later, then test btrfs reflink operations with `cp --reflink=always source dest` on test files to ensure no hangs occur
FAQ
What is CVE-2026-53122?
This vulnerability is a deadlock condition in the Linux kernel's btrfs filesystem that occurs when using the flushoncommit mount option. The deadlock happens when a reflink operation (copying extents between files) conflicts with a transaction commit's delalloc flushing, causing the system to hang indefinitely.
Is CVE-2026-53122 being actively exploited?
No, this vulnerability is not actively exploited in the wild according to CISA KEV data. However, it can be triggered by normal filesystem operations on affected systems, making it a reliability rather than security issue.
What versions of Kernel are affected by CVE-2026-53122?
Linux kernel versions 6.19 through 7.0.9 are vulnerable. The fix is included in kernel 7.0.10 and later stable releases.
How do I check if my server is vulnerable to CVE-2026-53122?
Run `uname -r` to check your kernel version—if it's between 6.19 and 7.0.9, and `mount | grep btrfs` shows btrfs with flushoncommit enabled, your system is vulnerable.
Does Defensia detect CVE-2026-53122?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2026-53122 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1034251715a3474d8615232a032ed0e3451ae6ec
- https://git.kernel.org/stable/c/5446d3e7676d73737f8dca816a956ede8ac24921
- https://git.kernel.org/stable/c/6f0f9c0a368aa1fe078109091322d3b0632d9380
- https://git.kernel.org/stable/c/73be4a08306bb84f4d5d16f62cb80e1543109ffa
- https://git.kernel.org/stable/c/9a24f0000876b8755cf21972b41632f4d6f3dafb
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-53122. Free for 1 server.
Get started free