# CVE-2024-44963: btrfs: do not BUG_ON() when freeing tree block after error

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-09-04T18:36:00.948Z
- Modified: 2026-10-30T13:17:34.877Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

btrfs: do not BUG_ON() when freeing tree block after error

When freeing a tree block, at btrfs_free_tree_block(), if we fail to
create a delayed reference we don't deal with the error and just do a
BUG_ON(). The error most likely to happen is -ENOMEM, and we have a
comment mentioning that only -ENOMEM can happen, but that is not true,
because in case qgroups are enabled any error returned from
btrfs_qgroup_trace_extent_post() (can be -EUCLEAN or anything returned
from btrfs_search_slot() for example) can be propagated back to
btrfs_free_tree_block().

So stop doing a BUG_ON() and return the error to the callers and make
them abort the transaction to prevent leaking space. Syzbot was
triggering this, likely due to memory allocation failure injection.

(As written by CVE List.)

## Affected

- Linux Linux: from fb235dc06fac9eaa4408ade9c8b20d45d63c89b7 before bfcef12f80b3a9bd6b09c7305679164e3307328a; from fb235dc06fac9eaa4408ade9c8b20d45d63c89b7 before 22d907bcd283d69d5e60497fc0d51969545c583b; from fb235dc06fac9eaa4408ade9c8b20d45d63c89b7 before 98251cd60b4d702a8a81de442ab621e83a3fb24f; from fb235dc06fac9eaa4408ade9c8b20d45d63c89b7 before bb3868033a4cccff7be57e9145f2117cbdc91c11; 4.11 (not affected: before 4.11; from 6.1.191 up to 6.1.*; from 6.6.64 up to 6.6.*; from 6.10.5 up to 6.10.*; from 6.11 up to *)
- linux linux_kernel: before 6.10.5

## References

- <https://git.kernel.org/stable/c/bfcef12f80b3a9bd6b09c7305679164e3307328a>
- <https://git.kernel.org/stable/c/22d907bcd283d69d5e60497fc0d51969545c583b>
- <https://git.kernel.org/stable/c/98251cd60b4d702a8a81de442ab621e83a3fb24f> (patch)
- <https://git.kernel.org/stable/c/bb3868033a4cccff7be57e9145f2117cbdc91c11> (patch)

## Sources

- CVE List: [CVE-2024-44963](https://www.cve.org/CVERecord?id=CVE-2024-44963), CVE Terms of Use, modified 2026-10-30
- NVD: [CVE-2024-44963](https://nvd.nist.gov/vuln/detail/CVE-2024-44963), Public domain, modified 2026-10-30

---

Page: https://cve.day/CVE-2024-44963 · Whole record: https://cve.day/CVE-2024-44963.json · Rebuilt by cve.day 2026-11-25T22:58:45.078Z
