# CVE-2024-40981: batman-adv: bypass empty buckets in batadv\_purge\_orig\_ref()

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; 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:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-07-12T12:32:16.277Z
- **Modified:** 2026-06-17T07:47:00.870Z

## Who should check

- Anyone running Linux \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 79636f636126775436a11ee9cf00a9253a33ac11; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 154e3f862ba33675cf3f4abf0a0a309a89df87d2; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 82cdea8f3af1e36543c937df963d108c60bea030; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 92176caf9896572f00e741a93cecc0ef1172da07; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< fed7914858a1f1f3e6350bb0f620d6ef15107d16; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 2685008a5f9a636434a8508419cee8158a2f52c8; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< ae7f3cffe86aea3da0e8e079525a1ae619b8862a; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 40dc8ab605894acae1473e434944924a22cfaaa0
- Anyone running Linux 2.6.39

## Description

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

batman-adv: bypass empty buckets in batadv\_purge\_orig\_ref()

Many syzbot reports are pointing to soft lockups in
batadv\_purge\_orig\_ref() \[1\]

Root cause is unknown, but we can avoid spending too much
time there and perhaps get more interesting reports.

\[1\]

watchdog: BUG: soft lockup - CPU\#0 stuck for 27s! \[kworker/u4:6:621\]
Modules linked in:
irq event stamp: 6182794
 hardirqs last  enabled at (6182793): \[\<ffff8000801dae10\>\] \_\_local\_bh\_enable\_ip+0x224/0x44c kernel/softirq.c:386
 hardirqs last disabled at (6182794): \[\<ffff80008ad66a78\>\] \_\_el1\_irq arch/arm64/kernel/entry-common.c:533 \[inline\]
 hardirqs last disabled at (6182794): \[\<ffff80008ad66a78\>\] el1\_interrupt+0x24/0x68 arch/arm64/kernel/entry-common.c:551
 softirqs last  enabled at (6182792): \[\<ffff80008aab71c4\>\] spin\_unlock\_bh include/linux/spinlock.h:396 \[inline\]
 softirqs last  enabled at (6182792): \[\<ffff80008aab71c4\>\] batadv\_purge\_orig\_ref+0x114c/0x1228 net/batman-adv/originator.c:1287
 softirqs last disabled at (6182790): \[\<ffff80008aab61dc\>\] spin\_lock\_bh include/linux/spinlock.h:356 \[inline\]
 softirqs last disabled at (6182790): \[\<ffff80008aab61dc\>\] batadv\_purge\_orig\_ref+0x164/0x1228 net/batman-adv/originator.c:1271
CPU: 0 PID: 621 Comm: kworker/u4:6 Not tainted 6.8.0-rc7-syzkaller-g707081b61156 \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
Workqueue: bat\_events batadv\_purge\_orig
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : should\_resched arch/arm64/include/asm/preempt.h:79 \[inline\]
 pc : \_\_local\_bh\_enable\_ip+0x228/0x44c kernel/softirq.c:388
 lr : \_\_local\_bh\_enable\_ip+0x224/0x44c kernel/softirq.c:386
sp : ffff800099007970
x29: ffff800099007980 x28: 1fffe00018fce1bd x27: dfff800000000000
x26: ffff0000d2620008 x25: ffff0000c7e70de8 x24: 0000000000000001
x23: 1fffe00018e57781 x22: dfff800000000000 x21: ffff80008aab71c4
x20: ffff0001b40136c0 x19: ffff0000c72bbc08 x18: 1fffe0001a817bb0
x17: ffff800125414000 x16: ffff80008032116c x15: 0000000000000001
x14: 1fffe0001ee9d610 x13: 0000000000000000 x12: 0000000000000003
x11: 0000000000000000 x10: 0000000000ff0100 x9 : 0000000000000000
x8 : 00000000005e5789 x7 : ffff80008aab61dc x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000006 x1 : 0000000000000080 x0 : ffff800125414000
Call trace:
  \_\_daif\_local\_irq\_enable arch/arm64/include/asm/irqflags.h:27 \[inline\]
  arch\_local\_irq\_enable arch/arm64/include/asm/irqflags.h:49 \[inline\]
  \_\_local\_bh\_enable\_ip+0x228/0x44c kernel/softirq.c:386
  \_\_raw\_spin\_unlock\_bh include/linux/spinlock\_api\_smp.h:167 \[inline\]
  \_raw\_spin\_unlock\_bh+0x3c/0x4c kernel/locking/spinlock.c:210
  spin\_unlock\_bh include/linux/spinlock.h:396 \[inline\]
  batadv\_purge\_orig\_ref+0x114c/0x1228 net/batman-adv/originator.c:1287
  batadv\_purge\_orig+0x20/0x70 net/batman-adv/originator.c:1300
  process\_one\_work+0x694/0x1204 kernel/workqueue.c:2633
  process\_scheduled\_works kernel/workqueue.c:2706 \[inline\]
  worker\_thread+0x938/0xef4 kernel/workqueue.c:2787
  kthread+0x288/0x310 kernel/kthread.c:388
  ret\_from\_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.8.0-rc7-syzkaller-g707081b61156 \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : arch\_local\_irq\_enable+0x8/0xc arch/arm64/include/asm/irqflags.h:51
 lr : default\_idle\_call+0xf8/0x128 kernel/sched/idle.c:103
sp : ffff800093a17d30
x29: ffff800093a17d30 x28: dfff800000000000 x27: 1ffff00012742fb4
x26: ffff80008ec9d000 x25: 0000000000000000 x24: 0000000000000002
x23: 1ffff00011d93a74 x22: ffff80008ec9d3a0 x21: 0000000000000000
x20: ffff0000c19dbc00 x19: ffff8000802d0fd8 x18: 1fffe00036804396
x17: ffff80008ec9d000 x16: ffff8000802d089c x15: 0000000000000001
---truncated---

## Affected and fixed versions

- Linux: \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 79636f636126775436a11ee9cf00a9253a33ac11; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 154e3f862ba33675cf3f4abf0a0a309a89df87d2; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 82cdea8f3af1e36543c937df963d108c60bea030; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 92176caf9896572f00e741a93cecc0ef1172da07; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< fed7914858a1f1f3e6350bb0f620d6ef15107d16; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 2685008a5f9a636434a8508419cee8158a2f52c8; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< ae7f3cffe86aea3da0e8e079525a1ae619b8862a; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 40dc8ab605894acae1473e434944924a22cfaaa0 (cvelist)
- Linux: 2.6.39 (cvelist)

## Mitigation

- Upgrade Linux to 40dc8ab605894acae1473e434944924a22cfaaa0 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-40981.md
Affected: Linux >= fb778ea173fcd58b8fc3d75c674f07fab187b55f, < 79636f636126775436a11ee9cf00a9253a33ac11; >= fb778ea173fcd58b8fc3d75c674f07fab187b55f, < 154e3f862ba33675cf3f4abf0a0a309a89df87d2; >= fb778ea173fcd58b8fc3d75c674f07fab187b55f, < 82cdea8f3af1e36543c937df963d108c60bea030; >= fb778ea173fcd58b8fc3d75…
Fixed in: Linux 79636f636126775436a11ee9cf00a9253a33ac11, Linux 154e3f862ba33675cf3f4abf0a0a309a89df87d2, Linux 82cdea8f3af1e36543c937df963d108c60bea030, Linux 92176caf9896572f00e741a93cecc0ef1172da07, Linux 2685008a5f9a636434a8508419cee8158a2f52c8, Linux 40dc8ab605894acae1473e434944924a22cfaaa0

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-40981 being exploited?

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 79636f636126775436a11ee9cf00a9253a33ac11; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 154e3f862ba33675cf3f4abf0a0a309a89df87d2; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 82cdea8f3af1e36543c937df963d108c60bea030; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 92176caf9896572f00e741a93cecc0ef1172da07; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< fed7914858a1f1f3e6350bb0f620d6ef15107d16; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 2685008a5f9a636434a8508419cee8158a2f52c8; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< ae7f3cffe86aea3da0e8e079525a1ae619b8862a; \>= fb778ea173fcd58b8fc3d75c674f07fab187b55f, \< 40dc8ab605894acae1473e434944924a22cfaaa0; Linux 2.6.39.

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

Yes. Fixed in Linux 79636f636126775436a11ee9cf00a9253a33ac11, Linux 154e3f862ba33675cf3f4abf0a0a309a89df87d2, Linux 82cdea8f3af1e36543c937df963d108c60bea030, Linux 92176caf9896572f00e741a93cecc0ef1172da07, Linux 2685008a5f9a636434a8508419cee8158a2f52c8, Linux 40dc8ab605894acae1473e434944924a22cfaaa0. Upgrade Linux to 40dc8ab605894acae1473e434944924a22cfaaa0 or later.

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

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/79636f636126775436a11ee9cf00a9253a33ac11>
- patch: <https://git.kernel.org/stable/c/154e3f862ba33675cf3f4abf0a0a309a89df87d2>
- patch: <https://git.kernel.org/stable/c/82cdea8f3af1e36543c937df963d108c60bea030>
- patch: <https://git.kernel.org/stable/c/92176caf9896572f00e741a93cecc0ef1172da07>
- patch: <https://git.kernel.org/stable/c/fed7914858a1f1f3e6350bb0f620d6ef15107d16>
- patch: <https://git.kernel.org/stable/c/2685008a5f9a636434a8508419cee8158a2f52c8>
- patch: <https://git.kernel.org/stable/c/ae7f3cffe86aea3da0e8e079525a1ae619b8862a>
- patch: <https://git.kernel.org/stable/c/40dc8ab605894acae1473e434944924a22cfaaa0>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.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-40981>

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