CVE-2026-74321
kernel: btrfs: fix invalid pointer dereference in __btrfs_run_delayed_refs()
Overview
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 103 fixes
Oracle Linux 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | bpftool +13 | 5.15.0-324.217.5.2.el8uek |
| 9 | bpftool +2 | 5.15.0-324.217.5.2.el9uek |
| 9 | kernel-uek +34 | 6.12.0-206.104.3.3.el9uek |
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 5.0 | bpftool +10 | 6.12.103-1.ph5 |
SUSE Linux Enterprise 2 releases · 5 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.7 | kernel-livepatch-6-4-0-150700-7-75-rt | 1-150700.1.3.1 | SUSE-SU-2026:4120-1 |
| 15.7 | kernel-livepatch-6-4-0-150700-53-81-default | 1-150700.15.3.1 | SUSE-SU-2026:4254-1 |
| 15.7 | cluster-md-kmp-default +20 | 6.4.0-150700.53.81.1 | SUSE-SU-2026:4254-1 |
| 15.7 | kernel-default-base | 6.4.0-150700.53.81.1.150700.17.45.1 | SUSE-SU-2026:4254-1 |
| 16.0 | cluster-md-kmp-default +2 | 6.12.0-160000.38.1 | SUSE-SU-2026:23897-1 |
| 16.0 | kernel-64kb +23 | 6.12.0-160000.38.1 | SUSE-SU-2026:23902-1 |
1 more row
SUSE Linux Enterprise Micro 3 releases · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 6.0 | kernel-devel-rt +3 | 6.4.0-52.1 | SUSE-SU-2026:23477-1 |
| 6.0 | kernel-default +5 | 6.4.0-52.1 | SUSE-SU-2026:23481-1 |
| 6.0 | kernel-default-base | 6.4.0-52.1.21.36 | SUSE-SU-2026:23481-1 |
| 6.1 | kernel-devel-rt +4 | 6.4.0-52.1 | SUSE-SU-2026:23528-1 |
| 6.1 | kernel-default +6 | 6.4.0-52.1 | SUSE-SU-2026:23529-1 |
| 6.1 | kernel-default-base | 6.4.0-52.1.21.34 | SUSE-SU-2026:23529-1 |
2 more rows
amazon linux 1 release · 4 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | kernel-livepatch-6-1-180-225-360 +2 | 1:1.0-0.amzn2023 |
| 2023 | bpftool +16 | 1:6.1.180-225.360.amzn2023 |
| 2023 | bpftool6-12 +16 | 1:6.12.100-125.179.amzn2023 |
| 2023 | bpftool6-18 +17 | 1:6.18.41-94.142.amzn2023 |
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.262-1 |
| 12 | linux | 6.1.180-1 |
| 13 | linux | 6.12.100-1 |
| 14 | linux | 7.1.5-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 6.12.100-1 |
openSUSE Leap 2 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 16.0 | cluster-md-kmp-64kb +74 | 6.12.0-160000.38.1 | openSUSE-SU-2026:21910-1 |
| 16.0 | kernel-default-base | 6.12.0-160000.38.1.160000.2.22 | openSUSE-SU-2026:21910-1 |
| 16.1 | cluster-md-kmp-64kb +74 | 6.12.0-160100.9.1 | openSUSE-SU-2026:22309-1 |
| 16.1 | kernel-default-base | 6.12.0-160100.9.1.160100.3.14 | openSUSE-SU-2026:22309-1 |
ubuntu 5 releases · 50 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | linux-aws-5-4 +6 | affected |
| 20.04-ESM | linux +10 | affected |
| 20.04-ESM | linux-nvidia-tegra-5-15 | 5.15.0-1070.72~20.04.1 |
| 20.04-ESM | linux-ibm-5-15 +1 | 5.15.0-1111.115~20.04.1 |
| 20.04-ESM | linux-intel-iotg-5-15 | 5.15.0-1112.118~20.04.1 |
| 20.04-ESM | linux-oracle-5-15 | 5.15.0-1114.120~20.04.1 |
65 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-74321
- git.kernel.org https://git.kernel.org/linus/486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae (7.2-rc1)
- git.kernel.org https://git.kernel.org/stable/c/015dc4a1e0c2cba551d4620eba13d26d5081dc34
- git.kernel.org https://git.kernel.org/stable/c/3b15d02be05e74321adb1e0ae0cb4ccfba7c6cb1
- git.kernel.org https://git.kernel.org/stable/c/486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae
- git.kernel.org https://git.kernel.org/stable/c/65770111a2d47c2b15e20b2ba92bb12198f289d4
- git.kernel.org https://git.kernel.org/stable/c/9faa6b69ad73f03c7bde53e07d75a28822dc9a1a
- git.kernel.org https://git.kernel.org/stable/c/a71143590ce9764dbcb47617647592ff8b4d48bc
- git.kernel.org https://git.kernel.org/stable/c/ba9fa2ff5981589bb49094d3358c339b37c47f53
- git.kernel.org https://git.kernel.org/stable/c/c372ca227e16bace86f1df1fa4ae6849e2fcfa28
Show all 40 references
- linux.oracle.com https://linux.oracle.com/cve/CVE-2026-74321.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2026-500249.html
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2026081553-CVE-2026-74321-a221@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-74321
- ubuntu.com https://ubuntu.com/security/notices/USN-8875-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8875-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8876-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8877-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8878-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8879-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8886-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8887-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8887-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8887-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8888-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8888-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8889-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8917-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8918-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8963-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9003-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9021-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9024-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9025-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9026-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9029-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9040-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9043-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9066-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2026-74321
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.