All vulnerabilities

Servers and applications

CVE-2026-46159

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

Severity
Unrated
Published
28 May 2026
Last changed
6 Nov 2026
Added to UpHeron
6 Nov 2026
Fixed in
5.15.210, 6.1.176, 6.6.140, 6.12.90, 6.18.32, 7.0.7
Exploit chance
under 0.1% in the next 30 daysEPSS by FIRST, 19 Nov 2026
Sources
CVE Program

Description

In the Linux kernel, the following vulnerability has been resolved:

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.

From the CVE Program.

Affected software

SoftwareAffected versions
Linux kernelServers and applications · cna:linux|linux
  • From 6.19 before 7.0.7
  • From 6.13 before 6.18.32
  • From 6.7 before 6.12.90
  • From 6.2 before 6.6.140
All 7 release lines
  • From 2.6.34 before 5.10.259
  • From 5.11 before 5.15.210
  • From 5.16 before 6.1.176
  • From 6.2 before 6.6.140
  • From 6.7 before 6.12.90
  • From 6.13 before 6.18.32
  • From 6.19 before 7.0.7

About Linux kernel

Unix-like operating system kernel, basis for all Linux operating systems

From Wikidata, CC0 1.0.
GitHub stars
255,726GitHub, 15 Nov 2026
Forks
67,394GitHub, 15 Nov 2026
Developer
Linus TorvaldsWikidata
License
GNU General Public License, version 2.0Wikidata
Written in
CWikidata
First released
25 Aug 1991Wikidata
First published on GitHub
4 Sept 2011GitHub

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-46159