btrfs: remove BUG_ON()'s in add_new_free_space()
In the Linux kernel, the following vulnerability has been resolved: btrfs: remove BUG_ON()'s in add_new_free_space() At add_new_free_space() we have these BUG_ON()'s that are there to deal with any failure to add free space to the in memory free space cache. Such failures are mostly -ENOMEM that should be very rare. However there's no need to have these BUG_ON()'s, we can just return any error to the caller and all callers and their upper call chain are already dealing with errors. So just make add_new_free_space() return any errors, while removing the BUG_ON()'s, and returning the total amount of added free space to an optional u64 pointer argument.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.1.45, 6.4.10
- CVEs
- CVE-2023-54185
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 16:41 UTC · Revision 1
Source evidence
btrfs: remove BUG_ON()'s in add_new_free_space()
core-osv · Original sourcePublished 30 Dec 2025, 12:08 UTC
In the Linux kernel, the following vulnerability has been resolved: btrfs: remove BUG_ON()'s in add_new_free_space() At add_new_free_space() we have these BUG_ON()'s that are there to deal with any failure to add free space to the in memory free space cache. Such failures are mostly -ENOMEM that should be very rare. However there's no need to have these BUG_ON()'s, we can just return any error to the caller and all callers and their upper call chain are already dealing with errors. So just make add_new_free_space() return any errors, while removing the BUG_ON()'s, and returning the total amount of added free space to an optional u64 pointer argument.
osv:CVE-2023-54185
Kernel
Fixed versions: 6.1.45, 6.4.10
Complete source record
{
"id": "dc360b03c4abfe327e27fda8fdde3010963c9a424194ceac3be226786f56c041",
"url": "https://osv.dev/vulnerability/CVE-2023-54185",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "btrfs: remove BUG_ON()'s in add_new_free_space()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: btrfs: remove BUG_ON()'s in add_new_free_space() At add_new_free_space() we have these BUG_ON()'s that are there to deal with any failure to add free space to the in memory free space cache. Such failures are mostly -ENOMEM that should be very rare. However there's no need to have these BUG_ON()'s, we can just return any error to the caller and all callers and their upper call chain are already dealing with errors. So just make add_new_free_space() return any errors, while removing the BUG_ON()'s, and returning the total amount of added free space to an optional u64 pointer argument.",
"evidence": "osv:CVE-2023-54185",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.1.45",
"evidence": "/affected/1/ranges"
},
{
"value": "6.4.10",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2023-54185",
"aliases": [
"CVE-2023-54185"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52"
},
{
"fixed": "23e72231f8281505883514b23709076e234d4f27"
},
{
"fixed": "f775ceb0cb530e4a469b718fb2a24843071087f5"
},
{
"fixed": "d8ccbd21918fd7fa6ce3226cffc22c444228e8ad"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54185.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.6.29"
},
{
"fixed": "6.1.45"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.4.10"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54185.json"
}
}
],
"modified": "2026-10-28T02:30:44.353727944Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/23e72231f8281505883514b23709076e234d4f27",
"https://git.kernel.org/stable/c/d8ccbd21918fd7fa6ce3226cffc22c444228e8ad",
"https://git.kernel.org/stable/c/f775ceb0cb530e4a469b718fb2a24843071087f5",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54185.json",
"https://nvd.nist.gov/vuln/detail/CVE-2023-54185",
"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/2023/54xxx/CVE-2023-54185.json"
}
},
"related_cves": [
{
"value": "CVE-2023-54185",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 512433,
"published_at": "2025-12-30T12:08:55.218+00:00"
}