{"id":"CVE-2023-54185","state":"PUBLISHED","title":"btrfs: remove BUG_ON()'s in add_new_free_space()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: remove BUG_ON()'s in add_new_free_space()\n\nAt add_new_free_space() we have these BUG_ON()'s that are there to deal\nwith any failure to add free space to the in memory free space cache.\nSuch failures are mostly -ENOMEM that should be very rare. However there's\nno need to have these BUG_ON()'s, we can just return any error to the\ncaller and all callers and their upper call chain are already dealing with\nerrors.\n\nSo just make add_new_free_space() return any errors, while removing the\nBUG_ON()'s, and returning the total amount of added free space to an\noptional u64 pointer argument.","publishedAt":"2025-12-30T12:08:55.218Z","updatedAt":"2026-05-11T19:57:06.627Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52","status":"affected","lessThan":"23e72231f8281505883514b23709076e234d4f27","versionType":"git"},{"version":"0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52","status":"affected","lessThan":"f775ceb0cb530e4a469b718fb2a24843071087f5","versionType":"git"},{"version":"0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52","status":"affected","lessThan":"d8ccbd21918fd7fa6ce3226cffc22c444228e8ad","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/block-group.c","fs/btrfs/block-group.h","fs/btrfs/free-space-tree.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.29","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.29","versionType":"semver"},{"version":"6.1.45","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.4.10","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/block-group.c","fs/btrfs/block-group.h","fs/btrfs/free-space-tree.c"]}],"references":["https://git.kernel.org/stable/c/23e72231f8281505883514b23709076e234d4f27","https://git.kernel.org/stable/c/f775ceb0cb530e4a469b718fb2a24843071087f5","https://git.kernel.org/stable/c/d8ccbd21918fd7fa6ce3226cffc22c444228e8ad"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/54xxx/CVE-2023-54185.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-54185","state":"PUBLISHED","datePublished":"2025-12-30T12:08:55.218Z","dateUpdated":"2026-05-11T19:57:06.627Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-30T12:06:44.497Z"},"containers":{"cna":{"title":"btrfs: remove BUG_ON()'s in add_new_free_space()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: remove BUG_ON()'s in add_new_free_space()\n\nAt add_new_free_space() we have these BUG_ON()'s that are there to deal\nwith any failure to add free space to the in memory free space cache.\nSuch failures are mostly -ENOMEM that should be very rare. However there's\nno need to have these BUG_ON()'s, we can just return any error to the\ncaller and all callers and their upper call chain are already dealing with\nerrors.\n\nSo just make add_new_free_space() return any errors, while removing the\nBUG_ON()'s, and returning the total amount of added free space to an\noptional u64 pointer argument."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52","status":"affected","lessThan":"23e72231f8281505883514b23709076e234d4f27","versionType":"git"},{"version":"0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52","status":"affected","lessThan":"f775ceb0cb530e4a469b718fb2a24843071087f5","versionType":"git"},{"version":"0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52","status":"affected","lessThan":"d8ccbd21918fd7fa6ce3226cffc22c444228e8ad","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/block-group.c","fs/btrfs/block-group.h","fs/btrfs/free-space-tree.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.29","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.29","versionType":"semver"},{"version":"6.1.45","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.4.10","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/block-group.c","fs/btrfs/block-group.h","fs/btrfs/free-space-tree.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/23e72231f8281505883514b23709076e234d4f27"},{"url":"https://git.kernel.org/stable/c/f775ceb0cb530e4a469b718fb2a24843071087f5"},{"url":"https://git.kernel.org/stable/c/d8ccbd21918fd7fa6ce3226cffc22c444228e8ad"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:57:06.627Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.29","versionEndExcluding":"6.1.45"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.29","versionEndExcluding":"6.4.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.29","versionEndExcluding":"6.5"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}