CVE-2026-46159·Kernel vulnerability
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.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 7.0.7
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — in the bottom 1% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 6.19
Until: 7.0.7
Fixed in: 7.0.7
How to fix this CVE
Update your Linux kernel to version 7.0.7 or later to resolve a TOCTOU race condition in the btrfs ioctl handler that could leak uninitialized kernel memory to unprivileged users. This vulnerability affects kernel versions 6.19 through 7.0.6 and requires a kernel upgrade followed by a system reboot to take effect.
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 the affected range 6.19-7.0.6
- Step 2: Verify if btrfs is in use on your system with 'df -T | grep btrfs' or 'mount | grep btrfs'
- Step 3: Review audit logs for unprivileged ioctl calls targeting btrfs: 'sudo ausearch -k btrfs_ioctl' or check dmesg for btrfs-related errors
- Step 4: After patching, confirm the new kernel version with 'uname -r' and ensure it shows 7.0.7 or later
FAQ
What is CVE-2026-46159?
This vulnerability is a time-of-check-time-of-use (TOCTOU) race condition in the btrfs filesystem ioctl handler that allows unprivileged local users to read uninitialized kernel heap memory by exploiting a gap between counting and copying btrfs block group entries.
Is CVE-2026-46159 being actively exploited?
No, this vulnerability is not listed on CISA's KEV catalog and no public exploits are currently available, though the local attack surface and memory disclosure nature make it a moderate information disclosure risk.
What versions of Kernel are affected by CVE-2026-46159?
Linux kernel versions 6.19 through 7.0.6 are vulnerable. The fix is available in kernel 7.0.7 and all subsequent releases.
How do I check if my server is vulnerable to CVE-2026-46159?
Run 'uname -r' to see your kernel version. If it is 6.19 or later but earlier than 7.0.7, and your system has btrfs filesystems, you are vulnerable. Confirm btrfs usage with 'df -T | grep btrfs'.
Does Defensia detect CVE-2026-46159?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2026-46159 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/4fdc6ee0802121d9cd96b8d085e589f51e5a4ec3
- https://git.kernel.org/stable/c/5d12e0ab009ade48c1bff9324fd9bea2c773d088
- https://git.kernel.org/stable/c/973e57c726c1f8e77259d1c8e519519f1e9aea77
- https://git.kernel.org/stable/c/d09d67d5de577cedae3de9497dff217e0ac8b641
- https://git.kernel.org/stable/c/d69a4a6813fdba7c4cc3695a7e843842b240790d
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-46159. Free for 1 server.
Get started free