CVE-2026-46159 Details
Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix btrfs_ioctl_space_info() slot_count TOCTOU which can lead to info-leak btrfs_ioctl_space_info() has a TOCTOU race between two passes over the block group RAID type lists. The first pass counts entries to determine the allocation size, then the second pass fills the buffer. The groups_sem rwlock is released between passes, allowing concurrent block group removal to reduce the entry count. When the second pass fills fewer entries than the first pass counted, copy_to_user() copies the full alloc_size bytes including trailing uninitialized kmalloc bytes to userspace. Fix by copying only total_spaces entries (the actually-filled count from the second pass) instead of alloc_size bytes, and switch to kzalloc so any future copy size mismatch cannot leak heap data.
A vulnerability in the Linux kernel's Btrfs file system has been addressed, which involved a time-of-check to time-of-use (TOCTOU) race condition in the 'btrfs_ioctl_space_info' function. This vulnerability allowed an information leak due to the function's two-pass processing over block group RAID type lists. The first pass counted entries to determine the allocation size, while the second pass filled the buffer. The 'groups_sem' read-write lock was released between these passes, permitting concurrent block group removals that could decrease the entry count. Consequently, if the second pass filled fewer entries than the first pass counted, the 'copy_to_user' function would inadvertently transfer the full allocated size bytes, including uninitialized data from the kernel heap, to user space. The vulnerability has been fixed by ensuring that only the actually filled count is copied to user space and by using a safer memory allocation method that prevents future leaks of heap data.
Users can upgrade to the latest stable version of the Linux kernel where this vulnerability has been patched. Instructions for downloading the latest version can be found on the official Linux kernel website.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-367 | Time-of-check Time-of-use (TOCTOU) Race Condition | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 2.6.34.1, < 6.6.140 >= 6.7, < 6.12.90 >= 6.13, < 6.18.32 >= 6.19, < 7.0.7 2.6.34 - 2.6.34 rc2 2.6.34 rc3 2.6.34 rc4 2.6.34 rc5 2.6.34 rc6 2.6.34 rc7 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 19, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 9, 2026 | Initial Analysis | [email protected] |
| May 28, 2026 | New CVE Received | kernel.org |