CVE-2026-46159CWE-367

CVE-2026-46159

Medium · published May 28, 2026

CVSS v3.1
4.7
EPSS
0%
Percentile
0.7
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
4.7 · MEDIUM
Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS v4.0
Not supplied
EPSS
0.00098 · 0.7th percentile
Weakness
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race Condition
Published
2026-05-28T14:16Z
Affected products (11)
ProductVersionsFixed in
linux/linux_kernel≥ 2.6.34.1, < 6.6.1406.6.140
linux/linux_kernel≥ 6.7, < 6.12.906.12.90
linux/linux_kernel≥ 6.13, < 6.18.326.18.32
linux/linux_kernel≥ 6.19, < 7.0.77.0.7
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
References (9)
EPSS history
Timeline
  • 28 MAY 09:36Z
    btrfs: fix btrfs_ioctl_space_info() slot_count TOCTOU which can lead to info-leak
    cvelistv5