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

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2025-07-25T12:53:23.665Z
- Modified: 2026-08-05T12:01:29.887Z
- Weaknesses: CWE-908
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 1cf474cd474bc5d3ef63086ffd009a87a5b7bb2e before 539969fc472886a1d63565459514d47e27fef461; from e43eec81c5167b655b72c781b0e75e62a05e415e before 2d11d274e2e1d7c79e2ca8461ce3ff3a95c11171; from e43eec81c5167b655b72c781b0e75e62a05e415e before 7ac790dc2ba00499a8d671d4a24de4d4ad27e234; from e43eec81c5167b655b72c781b0e75e62a05e415e before aee57a0293dca675637e5504709f9f8fd8e871be; from e43eec81c5167b655b72c781b0e75e62a05e415e before 54a7081ed168b72a8a2d6ef4ba3a1259705a2926; from 6.1.57 before 6.1.144; 6.2 (not affected: before 6.2; from 6.1.144 up to 6.1.*; from 6.6.97 up to 6.6.*; from 6.12.37 up to 6.12.*; from 6.15.6 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 6.1.57 before 6.1.144; from 6.2 before 6.6.97; from 6.7 before 6.12.37; from 6.13 before 6.15.6; 6.16
- debian debian_linux: 11.0

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/539969fc472886a1d63565459514d47e27fef461> (patch)
- <https://git.kernel.org/stable/c/2d11d274e2e1d7c79e2ca8461ce3ff3a95c11171> (patch)
- <https://git.kernel.org/stable/c/7ac790dc2ba00499a8d671d4a24de4d4ad27e234> (patch)
- <https://git.kernel.org/stable/c/aee57a0293dca675637e5504709f9f8fd8e871be> (patch)
- <https://git.kernel.org/stable/c/54a7081ed168b72a8a2d6ef4ba3a1259705a2926> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (third-party-advisory)

## Sources

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

---

Page: https://cve.day/CVE-2025-38382 · Whole record: https://cve.day/CVE-2025-38382.json · Rebuilt by cve.day 2026-11-25T22:59:01.677Z
