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 info 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 the block-group RAID type lists. In the first pass, the function counts entries to determine the allocation size for the userspace result buffer. The groups_sem rwlock is then released before a second pass populates the buffer. If block groups are concurrently removed between the two passes, the second pass may fill fewer entries than were counted initially. The vulnerable code could still call copy_to_user() with the original alloc_size, causing trailing uninitialized kmalloc heap bytes to be copied to userspace. The upstream fix changes the copy logic to use only total_spaces, the actual number of entries filled during the second pass, and replaces kmalloc with kzalloc to reduce the risk of future heap 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 user. Specifically, uninitialized kernel heap memory can be leaked to userspace through the Btrfs space-info ioctl path. The provided context does not establish integrity compromise or code execution; the documented impact is disclosure of residual heap contents, which may aid further local exploitation by exposing kernel memory state.

Mitigation

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

If immediate patching is not possible, reduce exposure by limiting local access to systems using vulnerable kernels and restricting untrusted users from invoking Btrfs ioctl interfaces. Because the issue is local and depends on concurrent filesystem state changes, minimizing untrusted local shell or container access and avoiding unnecessary Btrfs exposure can reduce risk. No complete mitigation short of applying the fixed kernel is provided in the available information.

Remediation

Patch, then assume compromise.

Apply a kernel update containing the upstream fix for CVE-2026-46159. The fix modifies btrfs_ioctl_space_info() so that copy_to_user() copies only the actually populated total_spaces entries rather than the originally computed alloc_size, and changes the allocation from kmalloc to kzalloc. Vendor kernel packages incorporating this fix were released across multiple SUSE product lines in June 2026; administrators should install the relevant patched kernel for their distribution and reboot into the updated kernel.
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.