CVE-2026-74321
btrfs: fix invalid pointer dereference in __btrfs_run_delayed_refs()
Reported by linux · Published August 15, 2026
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-headers | Amazon Linux | 1:6.1.180-225.360.amzn2023 |
| bpftool6.12 | Amazon Linux | 1:6.12.100-125.179.amzn2023 |
| bpftool6.18 | Amazon Linux | 1:6.18.41-94.142.amzn2023 |
| kernel-tools-devel | Amazon Linux | 1:6.1.180-225.360.amzn2023 |
| python3-perf | Amazon Linux | 1:6.1.180-225.360.amzn2023 |
| kernel6.12-headers | Amazon Linux | 1:6.12.100-125.179.amzn2023 |
| kernel-livepatch-6.18.41-94.142 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel6.12-modules-extra | Amazon Linux | 1:6.12.100-125.179.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, 0110a4c43451533de1ea1bbdc57b5d452f9d8b25 |
| Linux | Linux | 4.20, 0, 5.10.261 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2023 | bpftool6.12 | 0 |
| amazon:2023 | bpftool6.18 | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel-livepatch-6.18.41-94.142 | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| Linux | Linux | 0110a4c43451533de1ea1bbdc57b5d452f9d8b25, 7.2, 7.1.5 |
| amazon:2023 | kernel6.18-modules-extra-common | 0 |
| amazon:2023 | kernel6.18 | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel6.12-devel | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel6.18-tools-devel | 0 |
| amazon:2023 | microvm-kernel6.18 | 0 |
…and 18 more
Timeline
- Aug 15, 2026 CVE Published
- Aug 19, 2026 Security Advisory
- Aug 24, 2026 EPSS Score (30 in total, the first dated here)
- Oct 16, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-74321
vulnetix vdb fixes CVE-2026-74321
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-74321/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart