btrfs: fix double free in create_space_info_sub_group() error path
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix double free in create_space_info_sub_group() error path When kobject_init_and_add() fails, the call chain is: create_space_info_sub_group() -> btrfs_sysfs_add_space_info_type() -> kobject_init_and_add() -> failure -> kobject_put(&sub_group->kobj) -> space_info_release() -> kfree(sub_group) Then control returns to create_space_info_sub_group(), where: btrfs_sysfs_add_space_info_type() returns error -> kfree(sub_group) Thus, sub_group is freed twice. Keep parent->sub_group[index] = NULL for the failure path, but after btrfs_sysfs_add_space_info_type() has called kobject_put(), let the kobject release callback handle the cleanup.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.176, 6.12.90, 6.18.32, 6.6.141, 7.0.7
- CVEs
- CVE-2026-46164
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 17:51 UTC · Revision 1
Source evidence
btrfs: fix double free in create_space_info_sub_group() error path
core-osv · Original sourcePublished 28 May 2026, 09:36 UTC
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix double free in create_space_info_sub_group() error path When kobject_init_and_add() fails, the call chain is: create_space_info_sub_group() -> btrfs_sysfs_add_space_info_type() -> kobject_init_and_add() -> failure -> kobject_put(&sub_group->kobj) -> space_info_release() -> kfree(sub_group) Then control returns to create_space_info_sub_group(), where: btrfs_sysfs_add_space_info_type() returns error -> kfree(sub_group) Thus, sub_group is freed twice. Keep parent->sub_group[index] = NULL for the failure path, but after btrfs_sysfs_add_space_info_type() has called kobject_put(), let the kobject release callback handle the cleanup.
osv:CVE-2026-46164
Kernel
Fixed versions: 6.1.176, 6.6.141, 6.12.90, 6.18.32, 7.0.7
Complete source record
{
"id": "2b430e8795ef99652ba49db39852770af11c8d790ae86fa2e547bf475fc7d3ed",
"url": "https://osv.dev/vulnerability/CVE-2026-46164",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "btrfs: fix double free in create_space_info_sub_group() error path",
"summary": "In the Linux kernel, the following vulnerability has been resolved: btrfs: fix double free in create_space_info_sub_group() error path When kobject_init_and_add() fails, the call chain is: create_space_info_sub_group() -> btrfs_sysfs_add_space_info_type() -> kobject_init_and_add() -> failure -> kobject_put(&sub_group->kobj) -> space_info_release() -> kfree(sub_group) Then control returns to create_space_info_sub_group(), where: btrfs_sysfs_add_space_info_type() returns error -> kfree(sub_group) Thus, sub_group is freed twice. Keep parent->sub_group[index] = NULL for the failure path, but after btrfs_sysfs_add_space_info_type() has called kobject_put(), let the kobject release callback handle the cleanup.",
"evidence": "osv:CVE-2026-46164",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.176",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.141",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.90",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.32",
"evidence": "/affected/1/ranges"
},
{
"value": "7.0.7",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2026-46164",
"aliases": [
"CVE-2026-46164"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "64c7ddda83acfbaa0efb381a1928ce908c584607"
},
{
"fixed": "c2d59527cba6d59f0d77a75c1101ab4e69758bea"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "0bd151ce4200ca847990e05cca29a76456982ca5"
},
{
"fixed": "d2a675f2e238ec96c8e91e2718c1f910c9c8fb21"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "190d5a7c4fe42b8c9aa46e3336389e7cb10395bb"
},
{
"fixed": "14b22be1dd844383eb03af9b1ee3b6b25d32aeaf"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "f92ee31e031c7819126d2febdda0c3e91f5d2eb9"
},
{
"fixed": "dfd05a16b5c9d1d98b47905f37f2fccda52173d1"
},
{
"fixed": "259af6857a1b4f1e9ef8b780353f9d11c26a22bd"
},
{
"fixed": "a7449edf96143f192606ec8647e3167e1ecbd728"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.1.162"
},
{
"fixed": "6.1.176"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.6.122"
},
{
"fixed": "6.6.141"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.12.67"
},
{
"fixed": "6.12.90"
}
]
}
],
"versions": [
"v6.1.175",
"v6.1.174",
"v6.1.173",
"v6.1.172",
"v6.1.171",
"v6.1.170",
"v6.1.169",
"v6.1.168",
"v6.1.167",
"v6.1.166",
"v6.1.165",
"v6.1.164",
"v6.1.163",
"v6.1.162",
"v6.6.140",
"v6.6.139",
"v6.6.138",
"v6.6.137",
"v6.6.136",
"v6.6.135",
"v6.6.134",
"v6.6.133",
"v6.6.132",
"v6.6.131",
"v6.6.130",
"v6.6.129",
"v6.6.128",
"v6.6.127",
"v6.6.126",
"v6.6.125",
"v6.6.124",
"v6.6.123",
"v6.6.122",
"v6.12.89",
"v6.12.88",
"v6.12.87",
"v6.12.86",
"v6.12.85",
"v6.12.84",
"v6.12.83",
"v6.12.82",
"v6.12.81",
"v6.12.80",
"v6.12.79",
"v6.12.78",
"v6.12.77",
"v6.12.76",
"v6.12.75",
"v6.12.74",
"v6.12.73",
"v6.12.72",
"v6.12.71",
"v6.12.70",
"v6.12.69",
"v6.12.68",
"v6.12.67"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46164.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "6.1.176"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.141"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.90"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.32"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.16.0"
},
{
"fixed": "7.0.7"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46164.json"
}
}
],
"modified": "2026-10-28T02:30:38.163152400Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/14b22be1dd844383eb03af9b1ee3b6b25d32aeaf",
"https://git.kernel.org/stable/c/259af6857a1b4f1e9ef8b780353f9d11c26a22bd",
"https://git.kernel.org/stable/c/a7449edf96143f192606ec8647e3167e1ecbd728",
"https://git.kernel.org/stable/c/c2d59527cba6d59f0d77a75c1101ab4e69758bea",
"https://git.kernel.org/stable/c/d2a675f2e238ec96c8e91e2718c1f910c9c8fb21",
"https://git.kernel.org/stable/c/dfd05a16b5c9d1d98b47905f37f2fccda52173d1",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46164.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-46164",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46164.json"
}
},
"related_cves": [
{
"value": "CVE-2026-46164",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 505498,
"published_at": "2026-05-28T09:36:19.81+00:00"
}