# CVE-2026-74321: btrfs: fix invalid pointer dereference in \_\_btrfs\_run\_delayed\_refs()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.50% (percentile 45, 2026-12-04)
- **Published:** 2026-08-15T05:58:17.485Z
- **Modified:** 2026-10-16T19:17:39.263Z

## Who should check

- Anyone running Linux \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< c372ca227e16bace86f1df1fa4ae6849e2fcfa28; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< a71143590ce9764dbcb47617647592ff8b4d48bc; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 65770111a2d47c2b15e20b2ba92bb12198f289d4; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 015dc4a1e0c2cba551d4620eba13d26d5081dc34; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< ba9fa2ff5981589bb49094d3358c339b37c47f53; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 3b15d02be05e74321adb1e0ae0cb4ccfba7c6cb1; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 9faa6b69ad73f03c7bde53e07d75a28822dc9a1a; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae
- Anyone running Linux 4.20

## Description

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

btrfs: fix invalid pointer dereference in \_\_btrfs\_run\_delayed\_refs()

In the beginning of the loop, we try to obtain a locked delayed ref head,
if 'locked\_ref' is currently NULL, by calling btrfs\_select\_ref\_head(),
which can return an error pointer. If the error pointer is -EAGAIN we do
a continue and go back to the beginning of the loop, which will not try
again to call btrfs\_select\_ref\_head() since 'locked\_ref' is no longer
NULL but it's ERR\_PTR(-EAGAIN), and then we do:

   spin\_lock(&locked\_ref-\>lock);

against a ERR\_PTR(-EAGAIN) value, generating an invalid pointer
dereference.

Fix this by ensuring that 'locked\_ref' is set to NULL when
btrfs\_select\_ref\_head() returns ERR\_PTR(-EAGAIN) and incrementing 'count'
as well, to prevent infinite looping. We do this by doing a goto to the
bottom of the loop that already sets 'locked\_ref' to NULL and does a
cond\_resched(), with an increment to 'count' right before the goto.
These measures were in place before the refactoring in commit 0110a4c43451
("btrfs: refactor \_\_btrfs\_run\_delayed\_refs loop") but were unintentionally
lost afterwards.

## Affected and fixed versions

- Linux: \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< c372ca227e16bace86f1df1fa4ae6849e2fcfa28; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< a71143590ce9764dbcb47617647592ff8b4d48bc; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 65770111a2d47c2b15e20b2ba92bb12198f289d4; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 015dc4a1e0c2cba551d4620eba13d26d5081dc34; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< ba9fa2ff5981589bb49094d3358c339b37c47f53; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 3b15d02be05e74321adb1e0ae0cb4ccfba7c6cb1; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 9faa6b69ad73f03c7bde53e07d75a28822dc9a1a; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae (cvelist)
- Linux: 4.20 (cvelist)

## Mitigation

- Upgrade Linux to 486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-74321. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-74321.md
Affected: Linux >= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, < c372ca227e16bace86f1df1fa4ae6849e2fcfa28; >= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, < a71143590ce9764dbcb47617647592ff8b4d48bc; >= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, < 65770111a2d47c2b15e20b2ba92bb12198f289d4; >= 0110a4c43451533de1ea1bb…
Fixed in: Linux 65770111a2d47c2b15e20b2ba92bb12198f289d4, Linux 015dc4a1e0c2cba551d4620eba13d26d5081dc34, Linux 3b15d02be05e74321adb1e0ae0cb4ccfba7c6cb1, Linux 9faa6b69ad73f03c7bde53e07d75a28822dc9a1a, Linux 486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-74321 being exploited?

There is no confirmed exploitation: CVE-2026-74321 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.50% chance of exploitation in the next 30 days (as of 2026-12-04).

### How serious is CVE-2026-74321?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-74321?

Linux \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< c372ca227e16bace86f1df1fa4ae6849e2fcfa28; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< a71143590ce9764dbcb47617647592ff8b4d48bc; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 65770111a2d47c2b15e20b2ba92bb12198f289d4; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 015dc4a1e0c2cba551d4620eba13d26d5081dc34; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< ba9fa2ff5981589bb49094d3358c339b37c47f53; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 3b15d02be05e74321adb1e0ae0cb4ccfba7c6cb1; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 9faa6b69ad73f03c7bde53e07d75a28822dc9a1a; \>= 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, \< 486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae; Linux 4.20.

### Is there a fix for CVE-2026-74321?

Yes. Fixed in Linux 65770111a2d47c2b15e20b2ba92bb12198f289d4, Linux 015dc4a1e0c2cba551d4620eba13d26d5081dc34, Linux 3b15d02be05e74321adb1e0ae0cb4ccfba7c6cb1, Linux 9faa6b69ad73f03c7bde53e07d75a28822dc9a1a, Linux 486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae. Upgrade Linux to 486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae or later.

### How do I check if I'm affected by CVE-2026-74321?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/c372ca227e16bace86f1df1fa4ae6849e2fcfa28>
- other: <https://git.kernel.org/stable/c/a71143590ce9764dbcb47617647592ff8b4d48bc>
- other: <https://git.kernel.org/stable/c/65770111a2d47c2b15e20b2ba92bb12198f289d4>
- other: <https://git.kernel.org/stable/c/015dc4a1e0c2cba551d4620eba13d26d5081dc34>
- other: <https://git.kernel.org/stable/c/ba9fa2ff5981589bb49094d3358c339b37c47f53>
- other: <https://git.kernel.org/stable/c/3b15d02be05e74321adb1e0ae0cb4ccfba7c6cb1>
- other: <https://git.kernel.org/stable/c/9faa6b69ad73f03c7bde53e07d75a28822dc9a1a>
- other: <https://git.kernel.org/stable/c/486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-74321>

HTML: <https://flawdb.com/CVE-2026-74321> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-74321>
