# CVE-2025-21809: rxrpc, afs: Fix peer hash locking vs RCU callback

> 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.51% (percentile 37, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-02-27T20:01:00.969Z
- **Modified:** 2026-08-05T11:54:36.772Z

## Who should check

- Anyone running Linux \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 10ba5a3d57af20e494e0d979d1894260989235dd; \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 0e77dd41689637ac4e1b8fe0f27541f373640855; \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 79d458c13056559d49b5e41fbc4b6890e68cf65b; 056fc740be000d39a7dba700a935f3bbfbc664e6; \>= 6.7.3, \< 6.8
- Anyone running Linux 6.8

## Description

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

rxrpc, afs: Fix peer hash locking vs RCU callback

In its address list, afs now retains pointers to and refs on one or more
rxrpc\_peer objects.  The address list is freed under RCU and at this time,
it puts the refs on those peers.

Now, when an rxrpc\_peer object runs out of refs, it gets removed from the
peer hash table and, for that, rxrpc has to take a spinlock.  However, it
is now being called from afs's RCU cleanup, which takes place in BH
context - but it is just taking an ordinary spinlock.

The put may also be called from non-BH context, and so there exists the
possibility of deadlock if the BH-based RCU cleanup happens whilst the hash
spinlock is held.  This led to the attached lockdep complaint.

Fix this by changing spinlocks of rxnet-\>peer\_hash\_lock back to
BH-disabling locks.

    ================================
    WARNING: inconsistent lock state
    6.13.0-rc5-build2+ \#1223 Tainted: G            E
    --------------------------------
    inconsistent {SOFTIRQ-ON-W} -\> {IN-SOFTIRQ-W} usage.
    swapper/1/0 \[HC0\[0\]:SC1\[1\]:HE1:SE0\] takes:
    ffff88810babe228 (&rxnet-\>peer\_hash\_lock){+.?.}-{3:3}, at: rxrpc\_put\_peer+0xcb/0x180
    {SOFTIRQ-ON-W} state was registered at:
      mark\_usage+0x164/0x180
      \_\_lock\_acquire+0x544/0x990
      lock\_acquire.part.0+0x103/0x280
      \_raw\_spin\_lock+0x2f/0x40
      rxrpc\_peer\_keepalive\_worker+0x144/0x440
      process\_one\_work+0x486/0x7c0
      process\_scheduled\_works+0x73/0x90
      worker\_thread+0x1c8/0x2a0
      kthread+0x19b/0x1b0
      ret\_from\_fork+0x24/0x40
      ret\_from\_fork\_asm+0x1a/0x30
    irq event stamp: 972402
    hardirqs last  enabled at (972402): \[\<ffffffff8244360e\>\] \_raw\_spin\_unlock\_irqrestore+0x2e/0x50
    hardirqs last disabled at (972401): \[\<ffffffff82443328\>\] \_raw\_spin\_lock\_irqsave+0x18/0x60
    softirqs last  enabled at (972300): \[\<ffffffff810ffbbe\>\] handle\_softirqs+0x3ee/0x430
    softirqs last disabled at (972313): \[\<ffffffff810ffc54\>\] \_\_irq\_exit\_rcu+0x44/0x110

    other info that might help us debug this:
     Possible unsafe locking scenario:
           CPU0
           ----
      lock(&rxnet-\>peer\_hash\_lock);
      \<Interrupt\>
        lock(&rxnet-\>peer\_hash\_lock);

     \*\*\* DEADLOCK \*\*\*
    1 lock held by swapper/1/0:
     \#0: ffffffff83576be0 (rcu\_callback){....}-{0:0}, at: rcu\_lock\_acquire+0x7/0x30

    stack backtrace:
    CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G            E      6.13.0-rc5-build2+ \#1223
    Tainted: \[E\]=UNSIGNED\_MODULE
    Hardware name: ASUS All Series/H97-PLUS, BIOS 2306 10/09/2014
    Call Trace:
     \<IRQ\>
     dump\_stack\_lvl+0x57/0x80
     print\_usage\_bug.part.0+0x227/0x240
     valid\_state+0x53/0x70
     mark\_lock\_irq+0xa5/0x2f0
     mark\_lock+0xf7/0x170
     mark\_usage+0xe1/0x180
     \_\_lock\_acquire+0x544/0x990
     lock\_acquire.part.0+0x103/0x280
     \_raw\_spin\_lock+0x2f/0x40
     rxrpc\_put\_peer+0xcb/0x180
     afs\_free\_addrlist+0x46/0x90 \[kafs\]
     rcu\_do\_batch+0x2d2/0x640
     rcu\_core+0x2f7/0x350
     handle\_softirqs+0x1ee/0x430
     \_\_irq\_exit\_rcu+0x44/0x110
     irq\_exit\_rcu+0xa/0x30
     sysvec\_apic\_timer\_interrupt+0x7f/0xa0
     \</IRQ\>

## Affected and fixed versions

- Linux: \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 10ba5a3d57af20e494e0d979d1894260989235dd; \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 0e77dd41689637ac4e1b8fe0f27541f373640855; \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 79d458c13056559d49b5e41fbc4b6890e68cf65b; 056fc740be000d39a7dba700a935f3bbfbc664e6; \>= 6.7.3, \< 6.8 (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 6.8 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-21809.md
Affected: Linux >= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, < 10ba5a3d57af20e494e0d979d1894260989235dd; >= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, < 0e77dd41689637ac4e1b8fe0f27541f373640855; >= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, < 79d458c13056559d49b5e41fbc4b6890e68cf65b; 056fc740be000d39a7dba700a9…
Fixed in: Linux 10ba5a3d57af20e494e0d979d1894260989235dd, Linux 0e77dd41689637ac4e1b8fe0f27541f373640855, Linux 79d458c13056559d49b5e41fbc4b6890e68cf65b, Linux 6.8

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-2025-21809 being exploited?

There is no confirmed exploitation: CVE-2025-21809 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.51% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21809?

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

### Which versions are affected by CVE-2025-21809?

Linux \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 10ba5a3d57af20e494e0d979d1894260989235dd; \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 0e77dd41689637ac4e1b8fe0f27541f373640855; \>= 72904d7b9bfbf2dd146254edea93958bc35bbbfe, \< 79d458c13056559d49b5e41fbc4b6890e68cf65b; 056fc740be000d39a7dba700a935f3bbfbc664e6; \>= 6.7.3, \< 6.8; Linux 6.8.

### Is there a fix for CVE-2025-21809?

Yes. Fixed in Linux 10ba5a3d57af20e494e0d979d1894260989235dd, Linux 0e77dd41689637ac4e1b8fe0f27541f373640855, Linux 79d458c13056559d49b5e41fbc4b6890e68cf65b, Linux 6.8. Upgrade Linux to 6.8 or later.

### How do I check if I'm affected by CVE-2025-21809?

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

- patch: <https://git.kernel.org/stable/c/10ba5a3d57af20e494e0d979d1894260989235dd>
- patch: <https://git.kernel.org/stable/c/0e77dd41689637ac4e1b8fe0f27541f373640855>
- patch: <https://git.kernel.org/stable/c/79d458c13056559d49b5e41fbc4b6890e68cf65b>

## 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-2025-21809>

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