# CVE-2026-74722: btrfs: fix memory leak in btrfs\_do\_encoded\_write()

> 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.21% (percentile 7, 2026-11-28)
- **Published:** 2026-08-22T15:33:14.582Z
- **Modified:** 2026-11-06T17:19:54.860Z

## Who should check

- Anyone running Linux \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< e2c7e88815edd5ecfb88e7660ab9fd42bda6bc47; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 20c0eeb4313f9f89d47b80b672b5846f9827cb31; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 24a8f2c29aebb753ccb962fbb25bae18d7978f6e; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 60b50ceba6243802f8d2c0a9a7c2d549a93b1d64; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< d2a4e4e626b2f4670b69b430c357f03f53eb6632
- Anyone running Linux 5.18

## Description

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

btrfs: fix memory leak in btrfs\_do\_encoded\_write()

Local fuzzing of 6.12.94 has found the following memory leak:

Unreferenced object 0xffff888018050a80 (size 64):
  comm "syz.0.17", pid 10297, jiffies 4294953601
  hex dump (first 32 bytes):
    00 10 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
    10 0a 05 18 80 88 ff ff 10 0a 05 18 80 88 ff ff  ................
  backtrace (crc a8a6fc29):
    kmemleak\_alloc\_recursive include/linux/kmemleak.h:42 \[inline\]
    slab\_post\_alloc\_hook mm/slub.c:4152 \[inline\]
    slab\_alloc\_node mm/slub.c:4197 \[inline\]
    \_\_kmalloc\_cache\_noprof+0x168/0x2c0 mm/slub.c:4358
    kmalloc\_noprof include/linux/slab.h:878 \[inline\]
    extent\_changeset\_alloc fs/btrfs/extent\_io.h:207 \[inline\]
    qgroup\_reserve\_data+0x1c5/0x7d0 fs/btrfs/qgroup.c:4305
    btrfs\_qgroup\_reserve\_data+0x2e/0xb0 fs/btrfs/qgroup.c:4355
    btrfs\_do\_encoded\_write+0x92e/0x1040 fs/btrfs/inode.c:9746
    btrfs\_encoded\_write fs/btrfs/file.c:1482 \[inline\]
    btrfs\_do\_write\_iter+0x280/0x610 fs/btrfs/file.c:1507
    btrfs\_ioctl\_encoded\_write+0x3d6/0x490 fs/btrfs/ioctl.c:4738
    btrfs\_ioctl+0x6f9/0xc90 fs/btrfs/ioctl.c:-1
    vfs\_ioctl fs/ioctl.c:51 \[inline\]
    \_\_do\_sys\_ioctl fs/ioctl.c:906 \[inline\]
    \_\_se\_sys\_ioctl+0xf9/0x170 fs/ioctl.c:892
    do\_syscall\_x64 arch/x86/entry/common.c:47 \[inline\]
    do\_syscall\_64+0xbe/0x1a0 arch/x86/entry/common.c:78
    entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

Unreferenced object 0xffff888018050a00 (size 64):
  comm "syz.0.17", pid 10297, jiffies 4294953601
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 ff 0f 00 00 00 00 00 00  ................
    90 0a 05 18 80 88 ff ff 90 0a 05 18 80 88 ff ff  ................
  backtrace (crc cb5c9580):
    kmemleak\_alloc\_recursive include/linux/kmemleak.h:42 \[inline\]
    slab\_post\_alloc\_hook mm/slub.c:4152 \[inline\]
    slab\_alloc\_node mm/slub.c:4197 \[inline\]
    \_\_kmalloc\_cache\_noprof+0x168/0x2c0 mm/slub.c:4358
    kmalloc\_noprof include/linux/slab.h:878 \[inline\]
    kzalloc\_noprof include/linux/slab.h:1014 \[inline\]
    ulist\_prealloc+0x9c/0x110 fs/btrfs/ulist.c:114
    extent\_changeset\_prealloc fs/btrfs/extent\_io.h:217 \[inline\]
    \_\_set\_extent\_bit+0x16b/0x1a70 fs/btrfs/extent-io-tree.c:1086
    set\_record\_extent\_bits+0x50/0x90 fs/btrfs/extent-io-tree.c:1821
    qgroup\_reserve\_data+0x274/0x7d0 fs/btrfs/qgroup.c:4312
    btrfs\_qgroup\_reserve\_data+0x2e/0xb0 fs/btrfs/qgroup.c:4355
    btrfs\_do\_encoded\_write+0x92e/0x1040 fs/btrfs/inode.c:9746
    btrfs\_encoded\_write fs/btrfs/file.c:1482 \[inline\]
    btrfs\_do\_write\_iter+0x280/0x610 fs/btrfs/file.c:1507
    btrfs\_ioctl\_encoded\_write+0x3d6/0x490 fs/btrfs/ioctl.c:4738
    btrfs\_ioctl+0x6f9/0xc90 fs/btrfs/ioctl.c:-1
    vfs\_ioctl fs/ioctl.c:51 \[inline\]
    \_\_do\_sys\_ioctl fs/ioctl.c:906 \[inline\]
    \_\_se\_sys\_ioctl+0xf9/0x170 fs/ioctl.c:892
    do\_syscall\_x64 arch/x86/entry/common.c:47 \[inline\]
    do\_syscall\_64+0xbe/0x1a0 arch/x86/entry/common.c:78
    entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

Fix this by freeing an extent changeset before returning from
btrfs\_do\_encoded\_write().

## Affected and fixed versions

- Linux: \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< e2c7e88815edd5ecfb88e7660ab9fd42bda6bc47; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 20c0eeb4313f9f89d47b80b672b5846f9827cb31; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 24a8f2c29aebb753ccb962fbb25bae18d7978f6e; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 60b50ceba6243802f8d2c0a9a7c2d549a93b1d64; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< d2a4e4e626b2f4670b69b430c357f03f53eb6632 (cvelist)
- Linux: 5.18 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-74722.md
Affected: Linux >= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, < 0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0; >= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, < e2c7e88815edd5ecfb88e7660ab9fd42bda6bc47; >= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, < 20c0eeb4313f9f89d47b80b672b5846f9827cb31; >= 7c0c7269f7b508ba6e4b063…
Fixed in: Linux 0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0, Linux 20c0eeb4313f9f89d47b80b672b5846f9827cb31, Linux 24a8f2c29aebb753ccb962fbb25bae18d7978f6e, Linux 60b50ceba6243802f8d2c0a9a7c2d549a93b1d64

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-74722 being exploited?

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< e2c7e88815edd5ecfb88e7660ab9fd42bda6bc47; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 20c0eeb4313f9f89d47b80b672b5846f9827cb31; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 24a8f2c29aebb753ccb962fbb25bae18d7978f6e; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< 60b50ceba6243802f8d2c0a9a7c2d549a93b1d64; \>= 7c0c7269f7b508ba6e4b063a9314d6bd1fb6db22, \< d2a4e4e626b2f4670b69b430c357f03f53eb6632; Linux 5.18.

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

Yes. Fixed in Linux 0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0, Linux 20c0eeb4313f9f89d47b80b672b5846f9827cb31, Linux 24a8f2c29aebb753ccb962fbb25bae18d7978f6e, Linux 60b50ceba6243802f8d2c0a9a7c2d549a93b1d64. No fix listed yet: follow the vendor advisory.

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

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/0f0da96ccb1b9f35f4d3d4540dcaab0969d9d6b0>
- other: <https://git.kernel.org/stable/c/e2c7e88815edd5ecfb88e7660ab9fd42bda6bc47>
- other: <https://git.kernel.org/stable/c/20c0eeb4313f9f89d47b80b672b5846f9827cb31>
- other: <https://git.kernel.org/stable/c/24a8f2c29aebb753ccb962fbb25bae18d7978f6e>
- other: <https://git.kernel.org/stable/c/60b50ceba6243802f8d2c0a9a7c2d549a93b1d64>
- other: <https://git.kernel.org/stable/c/d2a4e4e626b2f4670b69b430c357f03f53eb6632>

## 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-74722>

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