Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
Medium

Linux kernel Btrfs btrfs_ioctl_space_info() TOCTOU information leak

IdentifiersCVE-2026-46159CWE-367· Time-of-check Time-of-use (TOCTOU)…

CVE-2026-46159 is a Linux kernel vulnerability in the Btrfs filesystem, specifically in btrfs_ioctl_space_info(). The flaw is a time-of-check/time-of-use race between two passes over block group RAID type lists. In the first pass, the function counts entries to determine the allocation size for the userspace-visible buffer; in the second pass, it fills that buffer. Because the groups_sem rwlock is released between the two passes, concurrent block group removal can reduce the number of entries present during the second pass. If fewer entries are filled than were counted initially, copy_to_user() may copy the full alloc_size, including trailing uninitialized kmalloc heap bytes, to userspace. The upstream fix changes the code to copy only the actually populated total_spaces entries from the second pass and replaces kmalloc with kzalloc to reduce the risk of future heap-data disclosure from copy-size mismatches.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation results in kernel information disclosure to a local userspace caller. Specifically, uninitialized kernel heap memory can be copied to userspace through the btrfs space-info ioctl path, potentially exposing residual data from prior kernel allocations. The provided context characterizes this as an information leak rather than code execution or privilege escalation.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, reduce exposure by limiting local untrusted access to systems that permit Btrfs ioctl interaction, since the issue requires local access and the ability to invoke the affected ioctl path. There is no complete mitigation in the provided content short of applying the kernel fix.

Remediation

Patch, then assume compromise.

Update to a Linux kernel version containing the fix for CVE-2026-46159. The fix modifies btrfs_ioctl_space_info() to copy only the actual number of entries populated during the second pass (total_spaces) instead of the originally computed alloc_size, and changes the allocation from kmalloc to kzalloc. Vendor kernel updates from SUSE and corresponding upstream stable kernel commits are referenced in the provided content.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
LinuxLinux Kerneloperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.