CVE-2026-74722 in Linuxinfo

Summary

by MITRE • 08/22/2026

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().

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 08/22/2026

The Linux kernel's Btrfs filesystem implementation contained a memory leak vulnerability within the function responsible for handling encoded write operations. This flaw was identified during local fuzzing of version 6.12.94, where automated testing tools detected unreferenced objects allocated via standard slab allocators but never freed under specific error or exit conditions. The issue resides in btrfs_do_encoded_write(), a core routine that manages the writing of encoded data to Btrfs volumes. When this function encounters certain internal states or errors during its execution path, it returns without properly releasing resources that were previously allocated for tracking extent changesets. These allocations are critical for maintaining metadata consistency and managing disk space accounting within the filesystem structure.

The technical root cause involves a failure in resource cleanup logic within the control flow of btrfs_do_encoded_write(). During the process of reserving data quotas, the kernel allocates an extent_changeset object to track modifications to file extents. This allocation occurs through calls to functions such as qgroup_reserve_data and ulist_prealloc, which rely on kmalloc_noprof and kzalloc_noprof for memory management. In scenarios where the operation does not complete successfully or takes a specific exit path, the code fails to invoke the necessary deallocation routine for this extent_changeset structure. Consequently, the kernel's kmemleak subsystem flags these objects as unreferenced because their pointers are lost when the function returns without freeing them. This results in a gradual accumulation of unused memory allocations within the kernel space over time if such operations are triggered repeatedly.

From an operational perspective, this vulnerability poses a risk of resource exhaustion and potential denial of service conditions for systems relying on Btrfs with encoded write capabilities. While individual leaks may seem minor due to their small size, persistent triggering can lead to significant memory pressure in long-running environments or high-throughput storage scenarios. Attackers could potentially exploit this by crafting specific ioctl calls that force the execution path leading to the leak repeatedly. This aligns with CWE-401, which describes missing release of memory after effective usage, and falls under the broader category of resource management errors. The vulnerability is accessible via system calls, specifically through vfs_ioctl mechanisms, allowing local users or processes with appropriate permissions to interact directly with the Btrfs filesystem interface.

The mitigation for this issue involves modifying btrfs_do_encoded_write() to ensure that all allocated extent_changeset structures are properly freed before any return statement within the function. This requires adding explicit cleanup logic that calls the appropriate deallocation functions, such as free_extent_changeset or equivalent kernel routines, depending on the specific version's implementation details. By ensuring deterministic resource release regardless of the execution path taken, the vulnerability is neutralized. System administrators should apply patches from their distribution vendors that include this fix to maintain system stability and prevent potential memory degradation in Btrfs-based storage environments. This update reinforces proper adherence to kernel coding standards regarding dynamic memory management and error handling paths.

Responsible

Linux

Reservation

08/15/2026

Disclosure

08/22/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Want to know what is going to be exploited?

We predict KEV entries!