CVE-2025-38382 btrfs: fix iteration of extrefs during log replay
An uninitialized variable in the Linux kernel's btrfs filesystem can cause invalid memory access during log replay, leading to a system crash.
- 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-2025-38382?
CVE-2025-38382 is a high-severity vulnerability in Debian Debian Linux, published on 25 Jul 2025. 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: fix iteration of extrefs during log replay
At __inode_add_ref() when processing extrefs, if we jump into the next label we have an undefined value of victim_name.len, since we haven't initialized it before we did the goto. This results in an invalid memory access in the next iteration of the loop since victim_name.len was not initialized to the length of the name of the current extref.
Fix this by initializing victim_name.len with the current extref's name length.
Weakness: CWE-908
Which versions are affected by CVE-2025-38382?
It affects 2 products.
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2025-38382?
Apply the vendor's patch.
Is CVE-2025-38382 being exploited?
There is no known exploitation of CVE-2025-38382 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as AZL-65768, BELL-CVE-2025-38382, DEBIAN-CVE-2025-38382, GHSA-926h-7qf4-c3hq, ROOT-OS-DEBIAN-12-CVE-2025-38382, ROOT-OS-UBUNTU-2404-CVE-2025-38382 and 1 more.