# CVE-2026-74318: btrfs: fix deadlock cloning inline extent when using flushoncommit

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.18% (percentile 8, 2026-12-01)
- **Published:** 2026-08-15T05:58:15.499Z
- **Modified:** 2026-10-30T13:19:55.070Z

## Who should check

- Anyone running Linux \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 18694c1ca40c8d7a6a3e593ed3d764b0e18d33cd; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 50d1a47fb3c4f3ee6c581e6bc4f1fb8d7051c5d1; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 06283034cec0fa357cbd85784ef7d3f5b2ce0790; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 2aa37c8ef1092c6f088e23a90bffefc672831c09; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< ea3452726ccb6bcaa732f43cc57bb928eca3dd59; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 532085d00eb54c074bdeae648b194765239f4d11
- Anyone running Linux 5.7

## Description

In the Linux kernel, the following vulnerability has been resolved:

btrfs: fix deadlock cloning inline extent when using flushoncommit

In commit b48c980b6a7e ("btrfs: fix deadlock between reflink and
transaction commit when using flushoncommit") a deadlock was fixed
between reflinks and transaction commits when the fs is mounted with the
flushoncommit option. This happened when we had to copy an inline extent's
data to the destination file. However the issue was fixed only for the
case where the destination offset is 0, it missed the case when the offset
is greater than zero.

Fix this by ensuring we get i\_size update whenever we copied an inline
extent's data into the destination file.

Syzbot reported this with the following trace:

   INFO: task kworker/u8:3:57 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:3    state:D stack:21600 pid:57    tgid:57    ppid:2      task\_flags:0x4208160 flags:0x00080000
   Workqueue: writeback wb\_workfn (flush-btrfs-129)
   Call Trace:
    \<TASK\>
    context\_switch kernel/sched/core.c:5402 \[inline\]
    \_\_schedule+0x16f9/0x5500 kernel/sched/core.c:7204
    \_\_schedule\_loop kernel/sched/core.c:7283 \[inline\]
    schedule+0x164/0x360 kernel/sched/core.c:7298
    wait\_extent\_bit fs/btrfs/extent-io-tree.c:905 \[inline\]
    btrfs\_lock\_extent\_bits+0x59c/0x700 fs/btrfs/extent-io-tree.c:2008
    btrfs\_lock\_extent fs/btrfs/extent-io-tree.h:152 \[inline\]
    btrfs\_invalidate\_folio+0x440/0xc00 fs/btrfs/inode.c:7718
    extent\_writepage fs/btrfs/extent\_io.c:1848 \[inline\]
    extent\_write\_cache\_pages fs/btrfs/extent\_io.c:2552 \[inline\]
    btrfs\_writepages+0x12f3/0x2410 fs/btrfs/extent\_io.c:2684
    do\_writepages+0x32e/0x550 mm/page-writeback.c:2571
    \_\_writeback\_single\_inode+0x133/0x10e0 fs/fs-writeback.c:1764
    writeback\_sb\_inodes+0x97f/0x1980 fs/fs-writeback.c:2056
    wb\_writeback+0x445/0xb00 fs/fs-writeback.c:2241
    wb\_do\_writeback fs/fs-writeback.c:2388 \[inline\]
    wb\_workfn+0x3fd/0xf20 fs/fs-writeback.c:2428
    process\_one\_work+0x98b/0x1630 kernel/workqueue.c:3318
    process\_scheduled\_works kernel/workqueue.c:3401 \[inline\]
    worker\_thread+0xb49/0x1140 kernel/workqueue.c:3482
    kthread+0x388/0x470 kernel/kthread.c:436
    ret\_from\_fork+0x514/0xb70 arch/x86/kernel/process.c:158
    ret\_from\_fork\_asm+0x1a/0x30 arch/x86/entry/entry\_64.S:245
    \</TASK\>
   INFO: task syz.0.145:8523 blocked for more than 143 seconds.
         Not tainted syzkaller \#0
   "echo 0 \> /proc/sys/kernel/hung\_task\_timeout\_secs" disables this message.
   task:syz.0.145       state:D stack:22752 pid:8523  tgid:8522  ppid:5850   task\_flags:0x400140 flags:0x00080002
   Call Trace:
    \<TASK\>
    context\_switch kernel/sched/core.c:5402 \[inline\]
    \_\_schedule+0x16f9/0x5500 kernel/sched/core.c:7204
    \_\_schedule\_loop kernel/sched/core.c:7283 \[inline\]
    schedule+0x164/0x360 kernel/sched/core.c:7298
    wb\_wait\_for\_completion+0x3e8/0x790 fs/fs-writeback.c:227
    \_\_writeback\_inodes\_sb\_nr+0x24c/0x2d0 fs/fs-writeback.c:2847
    try\_to\_writeback\_inodes\_sb+0x9a/0xc0 fs/fs-writeback.c:2895
    btrfs\_start\_delalloc\_flush fs/btrfs/transaction.c:2182 \[inline\]
    btrfs\_commit\_transaction+0x813/0x2fc0 fs/btrfs/transaction.c:2371
    btrfs\_sync\_file+0xdf4/0x1230 fs/btrfs/file.c:1822
    generic\_write\_sync include/linux/fs.h:2663 \[inline\]
    btrfs\_do\_write\_iter+0x6a9/0x840 fs/btrfs/file.c:1473
    new\_sync\_write fs/read\_write.c:595 \[inline\]
    vfs\_write+0x629/0xba0 fs/read\_write.c:688
    ksys\_write+0x156/0x270 fs/read\_write.c:740
    do\_syscall\_x64 arch/x86/entry/syscall\_64.c:63 \[inline\]
    do\_syscall\_64+0x15f/0x560 arch/x86/entry/syscall\_64.c:94
    entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
   RIP: 0033:0x7f5a0bdece59
   RSP: 002b:00007f5a0b446028 EFLAGS: 00000246 ORIG\_RAX: 0000000000000001
   RAX: ffffffffffffffda RBX: 00007f5a0c065fa0 RCX: 00007f5a0bdece59
   RDX: 000000000000029f RSI: 0000200000
---truncated---

## Affected and fixed versions

- Linux: \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 18694c1ca40c8d7a6a3e593ed3d764b0e18d33cd; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 50d1a47fb3c4f3ee6c581e6bc4f1fb8d7051c5d1; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 06283034cec0fa357cbd85784ef7d3f5b2ce0790; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 2aa37c8ef1092c6f088e23a90bffefc672831c09; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< ea3452726ccb6bcaa732f43cc57bb928eca3dd59; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 532085d00eb54c074bdeae648b194765239f4d11 (cvelist)
- Linux: 5.7 (cvelist)

## Mitigation

- Upgrade Linux to 532085d00eb54c074bdeae648b194765239f4d11 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-74318. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-74318.md
Affected: Linux >= 05a5a7621ce66c142e081ffc24dd6ade6e912061, < 18694c1ca40c8d7a6a3e593ed3d764b0e18d33cd; >= 05a5a7621ce66c142e081ffc24dd6ade6e912061, < 50d1a47fb3c4f3ee6c581e6bc4f1fb8d7051c5d1; >= 05a5a7621ce66c142e081ffc24dd6ade6e912061, < 06283034cec0fa357cbd85784ef7d3f5b2ce0790; >= 05a5a7621ce66c142e081ff…
Fixed in: Linux 18694c1ca40c8d7a6a3e593ed3d764b0e18d33cd, Linux 50d1a47fb3c4f3ee6c581e6bc4f1fb8d7051c5d1, Linux 06283034cec0fa357cbd85784ef7d3f5b2ce0790, Linux 2aa37c8ef1092c6f088e23a90bffefc672831c09, Linux 532085d00eb54c074bdeae648b194765239f4d11

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-74318 being exploited?

There is no confirmed exploitation: CVE-2026-74318 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-12-01).

### How serious is CVE-2026-74318?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-74318?

Linux \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 18694c1ca40c8d7a6a3e593ed3d764b0e18d33cd; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 50d1a47fb3c4f3ee6c581e6bc4f1fb8d7051c5d1; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 06283034cec0fa357cbd85784ef7d3f5b2ce0790; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 2aa37c8ef1092c6f088e23a90bffefc672831c09; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< ea3452726ccb6bcaa732f43cc57bb928eca3dd59; \>= 05a5a7621ce66c142e081ffc24dd6ade6e912061, \< 532085d00eb54c074bdeae648b194765239f4d11; Linux 5.7.

### Is there a fix for CVE-2026-74318?

Yes. Fixed in Linux 18694c1ca40c8d7a6a3e593ed3d764b0e18d33cd, Linux 50d1a47fb3c4f3ee6c581e6bc4f1fb8d7051c5d1, Linux 06283034cec0fa357cbd85784ef7d3f5b2ce0790, Linux 2aa37c8ef1092c6f088e23a90bffefc672831c09, Linux 532085d00eb54c074bdeae648b194765239f4d11. Upgrade Linux to 532085d00eb54c074bdeae648b194765239f4d11 or later.

### How do I check if I'm affected by CVE-2026-74318?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/18694c1ca40c8d7a6a3e593ed3d764b0e18d33cd>
- other: <https://git.kernel.org/stable/c/50d1a47fb3c4f3ee6c581e6bc4f1fb8d7051c5d1>
- other: <https://git.kernel.org/stable/c/06283034cec0fa357cbd85784ef7d3f5b2ce0790>
- other: <https://git.kernel.org/stable/c/2aa37c8ef1092c6f088e23a90bffefc672831c09>
- other: <https://git.kernel.org/stable/c/ea3452726ccb6bcaa732f43cc57bb928eca3dd59>
- other: <https://git.kernel.org/stable/c/532085d00eb54c074bdeae648b194765239f4d11>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-74318>

HTML: <https://flawdb.com/CVE-2026-74318> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-74318>
