CVE-2024-44963 btrfs: do not BUG_ON() when freeing tree block after error
A local attacker can trigger a kernel crash by causing a memory allocation failure during Btrfs tree block freeing, leading to denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-44963?
CVE-2024-44963 is a medium-severity denial of service vulnerability in Linux kernel, published on 4 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2024-44963?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-44963?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2024-44963 being exploited?
There is no known exploitation of CVE-2024-44963 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-49924, AZL-49953, BELL-CVE-2024-44963, DEBIAN-CVE-2024-44963, GHSA-9388-m6c7-2394, ROOT-OS-DEBIAN-11-CVE-2024-44963 and 3 more.