{"id":"CVE-2026-46159","published":"2026-05-28T09:36:14Z","modified":"2026-11-06T16:13:41Z","title":"btrfs: fix btrfs_ioctl_space_info() slot_count TOCTOU which can lead to info-leak","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix btrfs_ioctl_space_info() slot_count TOCTOU which can lead to info-leak\n\nbtrfs_ioctl_space_info() has a TOCTOU race between two passes over the\nblock group RAID type lists. The first pass counts entries to determine\nthe allocation size, then the second pass fills the buffer. The\ngroups_sem rwlock is released between passes, allowing concurrent block\ngroup removal to reduce the entry count.\n\nWhen the second pass fills fewer entries than the first pass counted,\ncopy_to_user() copies the full alloc_size bytes including trailing\nuninitialized kmalloc bytes to userspace.\n\nFix by copying only total_spaces entries (the actually-filled count from\nthe second pass) instead of alloc_size bytes, and switch to kzalloc so\nany future copy size mismatch cannot leak heap data.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.00098,"percentile":0.00766,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/f407aad350bdea4db300c47433573b7a41630d33","tags":[]},{"url":"https://git.kernel.org/stable/c/d8224b1be6627c6c3b204bfb264508d27c65ac44","tags":[]},{"url":"https://git.kernel.org/stable/c/d69a4a6813fdba7c4cc3695a7e843842b240790d","tags":[]},{"url":"https://git.kernel.org/stable/c/f5ee467b56764964027c361641f64953fc0f8f9a","tags":[]},{"url":"https://git.kernel.org/stable/c/4fdc6ee0802121d9cd96b8d085e589f51e5a4ec3","tags":[]},{"url":"https://git.kernel.org/stable/c/5d12e0ab009ade48c1bff9324fd9bea2c773d088","tags":[]},{"url":"https://git.kernel.org/stable/c/d09d67d5de577cedae3de9497dff217e0ac8b641","tags":[]},{"url":"https://git.kernel.org/stable/c/973e57c726c1f8e77259d1c8e519519f1e9aea77","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[]}],"priority":{"score":0.2,"factors":[{"name":"EPSS percentile","points":0.15}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 7fde62bffb576d384ea49a3aed3403d5609ee5bc, < f407aad350bdea4db300c47433573b7a41630d33",">= 7fde62bffb576d384ea49a3aed3403d5609ee5bc, < d8224b1be6627c6c3b204bfb264508d27c65ac44",">= 7fde62bffb576d384ea49a3aed3403d5609ee5bc, < d69a4a6813fdba7c4cc3695a7e843842b240790d",">= 7fde62bffb576d384ea49a3aed3403d5609ee5bc, < f5ee467b56764964027c361641f64953fc0f8f9a",">= 7fde62bffb576d384ea49a3aed3403d5609ee5bc, < 4fdc6ee0802121d9cd96b8d085e589f51e5a4ec3",">= 7fde62bffb576d384ea49a3aed3403d5609ee5bc, < 5d12e0ab009ade48c1bff9324fd9bea2c773d088",">= 7fde62bffb576d384ea49a3aed3403d5609ee5bc, < d09d67d5de577cedae3de9497dff217e0ac8b641",">= 7fde62bffb576d384ea49a3aed3403d5609ee5bc, < 973e57c726c1f8e77259d1c8e519519f1e9aea77"]},{"vendor":"Linux","product":"Linux","versions":["2.6.34"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-11-06T16:10:24.100456Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-32786","exploited":false,"provenance":"source"}}