# CVE-2023-54185: btrfs: remove BUG\_ON()'s in add\_new\_free\_space()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.26% (percentile 10, 2026-11-26)
- **Published:** 2025-12-30T12:08:55.218Z
- **Modified:** 2026-06-17T06:46:57.780Z

## Who should check

- Anyone running Linux \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< 23e72231f8281505883514b23709076e234d4f27; \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< f775ceb0cb530e4a469b718fb2a24843071087f5; \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< d8ccbd21918fd7fa6ce3226cffc22c444228e8ad
- Anyone running Linux 2.6.29

## Description

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.

## Affected and fixed versions

- Linux: \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< 23e72231f8281505883514b23709076e234d4f27; \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< f775ceb0cb530e4a469b718fb2a24843071087f5; \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< d8ccbd21918fd7fa6ce3226cffc22c444228e8ad (cvelist)
- Linux: 2.6.29 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-54185. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-54185.md
Affected: Linux >= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, < 23e72231f8281505883514b23709076e234d4f27; >= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, < f775ceb0cb530e4a469b718fb2a24843071087f5; >= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, < d8ccbd21918fd7fa6ce3226cffc22c444228e8ad; Linux 2.6.29
Fixed in: Linux 23e72231f8281505883514b23709076e234d4f27

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-54185 being exploited?

There is no confirmed exploitation: CVE-2023-54185 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.26% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-54185?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2023-54185?

Linux \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< 23e72231f8281505883514b23709076e234d4f27; \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< f775ceb0cb530e4a469b718fb2a24843071087f5; \>= 0f9dd46cda36b8de3b9f48bc42bd09d20b9c3b52, \< d8ccbd21918fd7fa6ce3226cffc22c444228e8ad; Linux 2.6.29.

### Is there a fix for CVE-2023-54185?

Yes. Fixed in Linux 23e72231f8281505883514b23709076e234d4f27. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-54185?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/23e72231f8281505883514b23709076e234d4f27>
- other: <https://git.kernel.org/stable/c/f775ceb0cb530e4a469b718fb2a24843071087f5>
- other: <https://git.kernel.org/stable/c/d8ccbd21918fd7fa6ce3226cffc22c444228e8ad>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-54185>

HTML: <https://flawdb.com/CVE-2023-54185> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-54185>
