{"id":"CVE-2026-46164","state":"PUBLISHED","title":"btrfs: fix double free in create_space_info_sub_group() error path","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix double free in create_space_info_sub_group() error path\n\nWhen kobject_init_and_add() fails, the call chain is:\n\ncreate_space_info_sub_group()\n-> btrfs_sysfs_add_space_info_type()\n-> kobject_init_and_add()\n-> failure\n-> kobject_put(&sub_group->kobj)\n-> space_info_release()\n-> kfree(sub_group)\n\nThen control returns to create_space_info_sub_group(), where:\n\nbtrfs_sysfs_add_space_info_type() returns error\n-> kfree(sub_group)\n\nThus, sub_group is freed twice.\n\nKeep parent->sub_group[index] = NULL for the failure path, but after\nbtrfs_sysfs_add_space_info_type() has called kobject_put(), let the\nkobject release callback handle the cleanup.","publishedAt":"2026-05-28T09:36:19.810Z","updatedAt":"2026-08-05T12:30:08.949Z","severity":{"score":7,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"64c7ddda83acfbaa0efb381a1928ce908c584607","status":"affected","lessThan":"c2d59527cba6d59f0d77a75c1101ab4e69758bea","versionType":"git"},{"version":"0bd151ce4200ca847990e05cca29a76456982ca5","status":"affected","lessThan":"d2a675f2e238ec96c8e91e2718c1f910c9c8fb21","versionType":"git"},{"version":"190d5a7c4fe42b8c9aa46e3336389e7cb10395bb","status":"affected","lessThan":"14b22be1dd844383eb03af9b1ee3b6b25d32aeaf","versionType":"git"},{"version":"f92ee31e031c7819126d2febdda0c3e91f5d2eb9","status":"affected","lessThan":"dfd05a16b5c9d1d98b47905f37f2fccda52173d1","versionType":"git"},{"version":"f92ee31e031c7819126d2febdda0c3e91f5d2eb9","status":"affected","lessThan":"259af6857a1b4f1e9ef8b780353f9d11c26a22bd","versionType":"git"},{"version":"f92ee31e031c7819126d2febdda0c3e91f5d2eb9","status":"affected","lessThan":"a7449edf96143f192606ec8647e3167e1ecbd728","versionType":"git"},{"version":"6.1.162","status":"affected","lessThan":"6.1.176","versionType":"semver"},{"version":"6.6.122","status":"affected","lessThan":"6.6.141","versionType":"semver"},{"version":"6.12.67","status":"affected","lessThan":"6.12.90","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/space-info.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.1.176","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.141","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.90","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.32","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.7","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/space-info.c"]}],"references":["https://git.kernel.org/stable/c/c2d59527cba6d59f0d77a75c1101ab4e69758bea","https://git.kernel.org/stable/c/d2a675f2e238ec96c8e91e2718c1f910c9c8fb21","https://git.kernel.org/stable/c/14b22be1dd844383eb03af9b1ee3b6b25d32aeaf","https://git.kernel.org/stable/c/dfd05a16b5c9d1d98b47905f37f2fccda52173d1","https://git.kernel.org/stable/c/259af6857a1b4f1e9ef8b780353f9d11c26a22bd","https://git.kernel.org/stable/c/a7449edf96143f192606ec8647e3167e1ecbd728"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/46xxx/CVE-2026-46164.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46164","state":"PUBLISHED","datePublished":"2026-05-28T09:36:19.810Z","dateUpdated":"2026-08-05T12:30:08.949Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-05-13T15:03:33.102Z"},"containers":{"cna":{"title":"btrfs: fix double free in create_space_info_sub_group() error path","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix double free in create_space_info_sub_group() error path\n\nWhen kobject_init_and_add() fails, the call chain is:\n\ncreate_space_info_sub_group()\n-> btrfs_sysfs_add_space_info_type()\n-> kobject_init_and_add()\n-> failure\n-> kobject_put(&sub_group->kobj)\n-> space_info_release()\n-> kfree(sub_group)\n\nThen control returns to create_space_info_sub_group(), where:\n\nbtrfs_sysfs_add_space_info_type() returns error\n-> kfree(sub_group)\n\nThus, sub_group is freed twice.\n\nKeep parent->sub_group[index] = NULL for the failure path, but after\nbtrfs_sysfs_add_space_info_type() has called kobject_put(), let the\nkobject release callback handle the cleanup."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"64c7ddda83acfbaa0efb381a1928ce908c584607","status":"affected","lessThan":"c2d59527cba6d59f0d77a75c1101ab4e69758bea","versionType":"git"},{"version":"0bd151ce4200ca847990e05cca29a76456982ca5","status":"affected","lessThan":"d2a675f2e238ec96c8e91e2718c1f910c9c8fb21","versionType":"git"},{"version":"190d5a7c4fe42b8c9aa46e3336389e7cb10395bb","status":"affected","lessThan":"14b22be1dd844383eb03af9b1ee3b6b25d32aeaf","versionType":"git"},{"version":"f92ee31e031c7819126d2febdda0c3e91f5d2eb9","status":"affected","lessThan":"dfd05a16b5c9d1d98b47905f37f2fccda52173d1","versionType":"git"},{"version":"f92ee31e031c7819126d2febdda0c3e91f5d2eb9","status":"affected","lessThan":"259af6857a1b4f1e9ef8b780353f9d11c26a22bd","versionType":"git"},{"version":"f92ee31e031c7819126d2febdda0c3e91f5d2eb9","status":"affected","lessThan":"a7449edf96143f192606ec8647e3167e1ecbd728","versionType":"git"},{"version":"6.1.162","status":"affected","lessThan":"6.1.176","versionType":"semver"},{"version":"6.6.122","status":"affected","lessThan":"6.6.141","versionType":"semver"},{"version":"6.12.67","status":"affected","lessThan":"6.12.90","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/space-info.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.1.176","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.141","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.90","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.32","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.7","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/space-info.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c2d59527cba6d59f0d77a75c1101ab4e69758bea"},{"url":"https://git.kernel.org/stable/c/d2a675f2e238ec96c8e91e2718c1f910c9c8fb21"},{"url":"https://git.kernel.org/stable/c/14b22be1dd844383eb03af9b1ee3b6b25d32aeaf"},{"url":"https://git.kernel.org/stable/c/dfd05a16b5c9d1d98b47905f37f2fccda52173d1"},{"url":"https://git.kernel.org/stable/c/259af6857a1b4f1e9ef8b780353f9d11c26a22bd"},{"url":"https://git.kernel.org/stable/c/a7449edf96143f192606ec8647e3167e1ecbd728"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is only reachable through `open_ctree()` during a btrfs mount; it is not exposed over any network protocol and requires local access to introduce and mount the filesystem.\nAC:H - The double-free only triggers when `kobject_init_and_add()` fails (effectively ENOMEM, which the attacker cannot reliably induce at that exact allocation), and additionally requires a rare zoned btrfs configuration — conditions beyond the attacker's control.\nPR:N - Following the kernel CNA crafted-image mount-bug model, the attacker needs no privileges to supply the malicious zoned btrfs image; the privileged mount operation is captured under User Interaction.\nUI:R - A victim must perform the mount of the attacker-supplied zoned btrfs filesystem for the vulnerable path to execute.\nS:U - The corruption stays within the kernel's own memory/security authority; there is no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - A double-free corrupts the SLUB freelist and can be leveraged into a use-after-free granting attacker-controlled reads of freed/adjacent slab objects, enabling kernel memory disclosure.\nI:H - Freelist corruption from the double-free can be groomed into an arbitrary-write primitive, allowing modification of kernel data structures and control-flow hijacking.\nA:H - The double-free reliably corrupts slab state and (with freelist hardening) trips a BUG/panic, crashing the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:30:08.949Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.162","versionEndExcluding":"6.1.176"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.122","versionEndExcluding":"6.6.141"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.67","versionEndExcluding":"6.12.90"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.18.32"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.0.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}