# CVE-2024-40980: drop\_monitor: replace spin\_lock by raw\_spin\_lock

> 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.81% (percentile 54, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-07-12T12:32:15.569Z
- **Modified:** 2026-10-15T01:18:39.740Z

## Who should check

- Anyone running Linux \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 594e47957f3fe034645e6885393ce96c12286334; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 96941f29ebcc1e9cbf570dc903f30374909562f5; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< b3722fb69468693555f531cddda5c30444726dac; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< f251ccef1d864790e5253386e95544420b7cd8f3; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 76ce2f9125244e1708d29c1d3f9d1d50b347bda0; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 07ea878684dfb78a9d4f564c39d07e855a9e242e; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< f1e197a665c2148ebc25fe09c53689e60afea195
- Anyone running Linux 2.6.31

## Description

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

drop\_monitor: replace spin\_lock by raw\_spin\_lock

trace\_drop\_common() is called with preemption disabled, and it acquires
a spin\_lock. This is problematic for RT kernels because spin\_locks are
sleeping locks in this configuration, which causes the following splat:

BUG: sleeping function called from invalid context at kernel/locking/spinlock\_rt.c:48
in\_atomic(): 1, irqs\_disabled(): 1, non\_block: 0, pid: 449, name: rcuc/47
preempt\_count: 1, expected: 0
RCU nest depth: 2, expected: 2
5 locks held by rcuc/47/449:
 \#0: ff1100086ec30a60 ((softirq\_ctrl.lock)){+.+.}-{2:2}, at: \_\_local\_bh\_disable\_ip+0x105/0x210
 \#1: ffffffffb394a280 (rcu\_read\_lock){....}-{1:2}, at: rt\_spin\_lock+0xbf/0x130
 \#2: ffffffffb394a280 (rcu\_read\_lock){....}-{1:2}, at: \_\_local\_bh\_disable\_ip+0x11c/0x210
 \#3: ffffffffb394a160 (rcu\_callback){....}-{0:0}, at: rcu\_do\_batch+0x360/0xc70
 \#4: ff1100086ee07520 (&data-\>lock){+.+.}-{2:2}, at: trace\_drop\_common.constprop.0+0xb5/0x290
irq event stamp: 139909
hardirqs last  enabled at (139908): \[\<ffffffffb1df2b33\>\] \_raw\_spin\_unlock\_irqrestore+0x63/0x80
hardirqs last disabled at (139909): \[\<ffffffffb19bd03d\>\] trace\_drop\_common.constprop.0+0x26d/0x290
softirqs last  enabled at (139892): \[\<ffffffffb07a1083\>\] \_\_local\_bh\_enable\_ip+0x103/0x170
softirqs last disabled at (139898): \[\<ffffffffb0909b33\>\] rcu\_cpu\_kthread+0x93/0x1f0
Preemption disabled at:
\[\<ffffffffb1de786b\>\] rt\_mutex\_slowunlock+0xab/0x2e0
CPU: 47 PID: 449 Comm: rcuc/47 Not tainted 6.9.0-rc2-rt1+ \#7
Hardware name: Dell Inc. PowerEdge R650/0Y2G81, BIOS 1.6.5 04/15/2022
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x8c/0xd0
 dump\_stack+0x14/0x20
 \_\_might\_resched+0x21e/0x2f0
 rt\_spin\_lock+0x5e/0x130
 ? trace\_drop\_common.constprop.0+0xb5/0x290
 ? skb\_queue\_purge\_reason.part.0+0x1bf/0x230
 trace\_drop\_common.constprop.0+0xb5/0x290
 ? preempt\_count\_sub+0x1c/0xd0
 ? \_raw\_spin\_unlock\_irqrestore+0x4a/0x80
 ? \_\_pfx\_trace\_drop\_common.constprop.0+0x10/0x10
 ? rt\_mutex\_slowunlock+0x26a/0x2e0
 ? skb\_queue\_purge\_reason.part.0+0x1bf/0x230
 ? \_\_pfx\_rt\_mutex\_slowunlock+0x10/0x10
 ? skb\_queue\_purge\_reason.part.0+0x1bf/0x230
 trace\_kfree\_skb\_hit+0x15/0x20
 trace\_kfree\_skb+0xe9/0x150
 kfree\_skb\_reason+0x7b/0x110
 skb\_queue\_purge\_reason.part.0+0x1bf/0x230
 ? \_\_pfx\_skb\_queue\_purge\_reason.part.0+0x10/0x10
 ? mark\_lock.part.0+0x8a/0x520
...

trace\_drop\_common() also disables interrupts, but this is a minor issue
because we could easily replace it with a local\_lock.

Replace the spin\_lock with raw\_spin\_lock to avoid sleeping in atomic
context.

## Affected and fixed versions

- Linux: \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 594e47957f3fe034645e6885393ce96c12286334; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 96941f29ebcc1e9cbf570dc903f30374909562f5; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< b3722fb69468693555f531cddda5c30444726dac; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< f251ccef1d864790e5253386e95544420b7cd8f3; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 76ce2f9125244e1708d29c1d3f9d1d50b347bda0; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 07ea878684dfb78a9d4f564c39d07e855a9e242e; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< f1e197a665c2148ebc25fe09c53689e60afea195 (cvelist)
- Linux: 2.6.31 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-40980.md
Affected: Linux >= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, < 594e47957f3fe034645e6885393ce96c12286334; >= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, < 96941f29ebcc1e9cbf570dc903f30374909562f5; >= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, < b3722fb69468693555f531cddda5c30444726dac; >= 4ea7e38696c7e798c47ebbe…
Fixed in: Linux 594e47957f3fe034645e6885393ce96c12286334, Linux 96941f29ebcc1e9cbf570dc903f30374909562f5, Linux 76ce2f9125244e1708d29c1d3f9d1d50b347bda0, Linux 07ea878684dfb78a9d4f564c39d07e855a9e242e

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-2024-40980 being exploited?

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

### How serious is CVE-2024-40980?

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

### Which versions are affected by CVE-2024-40980?

Linux \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 594e47957f3fe034645e6885393ce96c12286334; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 96941f29ebcc1e9cbf570dc903f30374909562f5; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< b3722fb69468693555f531cddda5c30444726dac; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< f251ccef1d864790e5253386e95544420b7cd8f3; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 76ce2f9125244e1708d29c1d3f9d1d50b347bda0; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< 07ea878684dfb78a9d4f564c39d07e855a9e242e; \>= 4ea7e38696c7e798c47ebbecadfd392f23f814f9, \< f1e197a665c2148ebc25fe09c53689e60afea195; Linux 2.6.31.

### Is there a fix for CVE-2024-40980?

Yes. Fixed in Linux 594e47957f3fe034645e6885393ce96c12286334, Linux 96941f29ebcc1e9cbf570dc903f30374909562f5, Linux 76ce2f9125244e1708d29c1d3f9d1d50b347bda0, Linux 07ea878684dfb78a9d4f564c39d07e855a9e242e. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-40980?

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/594e47957f3fe034645e6885393ce96c12286334>
- patch: <https://git.kernel.org/stable/c/96941f29ebcc1e9cbf570dc903f30374909562f5>
- patch: <https://git.kernel.org/stable/c/b3722fb69468693555f531cddda5c30444726dac>
- patch: <https://git.kernel.org/stable/c/f251ccef1d864790e5253386e95544420b7cd8f3>
- patch: <https://git.kernel.org/stable/c/76ce2f9125244e1708d29c1d3f9d1d50b347bda0>
- patch: <https://git.kernel.org/stable/c/07ea878684dfb78a9d4f564c39d07e855a9e242e>
- patch: <https://git.kernel.org/stable/c/f1e197a665c2148ebc25fe09c53689e60afea195>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-613116.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-355557.html>

## 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-2024-40980>

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