VDB

CVE-2026-46159

CVE-2026-46159 PUBLISHED

btrfs: fix btrfs_ioctl_space_info() slot_count TOCTOU which can lead to info-leak

Reported by linux · Published May 28, 2026

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernelAmazon Linux1:6.1.176-220.358.amzn2023
kernel6.18-toolsAmazon Linux1:6.18.33-63.124.amzn2023
kernel-livepatch-6.1.176-220.358Amazon Linux1:1.0-0.amzn2023
kernel6.12-develAmazon Linux1:6.12.90-120.164.amzn2023
kernel-livepatch-6.12.90-120.164Amazon Linux1:1.0-0.amzn2023
kernel-modules-extraAmazon Linux1:6.1.176-220.358.amzn2023
kernel6.18Amazon Linux1:6.18.33-63.124.amzn2023
perf6.18Amazon Linux1:6.18.33-63.124.amzn2023
bpftool6.18Amazon Linux1:6.18.33-63.124.amzn2023
python3-perf6.18Amazon Linux1:6.18.33-63.124.amzn2023
kernel6.18-modules-extraAmazon Linux1:6.18.33-63.124.amzn2023

Affected products

VendorProductVersions
LinuxLinux7fde62bffb576d384ea49a3aed3403d5609ee5bc, 7fde62bffb576d384ea49a3aed3403d5609ee5bc, 7fde62bffb576d384ea49a3aed3403d5609ee5bc
LinuxLinux2.6.34, 0, 5.10.259
amazon:2023kernel0
amazon:2023kernel6.18-tools0
amazon:2023kernel-livepatch-6.1.176-220.3580
amazon:2023kernel6.12-devel0
amazon:2023kernel-livepatch-6.12.90-120.1640
amazon:2023kernel-modules-extra0
amazon:2023kernel6.180
amazon:2023perf6.180
amazon:2023bpftool6.180
amazon:2023python3-perf6.180
amazon:2023kernel6.18-modules-extra0
linuxlinux_kernel2.6.34, 2.6.34, 2.6.34
amazon:2023kernel-devel0
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystem0
LinuxLinux7.1, 7fde62bffb576d384ea49a3aed3403d5609ee5bc, 7fde62bffb576d384ea49a3aed3403d5609ee5bc
amazon:2023kernel6.12-modules-extra-common0
amazon:2023kernel6.12-modules-extra0
amazon:2023kernel6.18-modules-extra-common0

…and 18 more

Timeline

  • May 27, 2026 CVE Published
  • May 28, 2026 EPSS Score (10 in total, the first dated here)
  • Jun 1, 2026 Security Advisory (131 in total, the first dated here)
  • Jun 4, 2026 Coalition ESS Score
  • Aug 11, 2026 Distribution Patch (128 in total, the first dated here)
  • Nov 6, 2026 CVE Updated

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-46159
vulnetix vdb fixes CVE-2026-46159

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-46159/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›