# CVE-2026-98818: mm/slab: do not wake up kswapd in \_\_kfree\_rcu\_sheaf()

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.20% (percentile 5, 2026-11-28)
- **Published:** 2026-10-18T15:49:10.258Z
- **Modified:** 2026-10-19T10:19:45.873Z

## Who should check

- Anyone running Linux \>= ec66e0d599520ab414db745544e25d80d0ac5054, \< 46545c86b54ffb969b6e3662942b4a6191619eaa; \>= ec66e0d599520ab414db745544e25d80d0ac5054, \< af2fb3ee6679b517e2fdbd3ba16ec276a8b74312
- Anyone running Linux 6.18

## Description

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

mm/slab: do not wake up kswapd in \_\_kfree\_rcu\_sheaf()

Since kfree\_rcu() can be called under pi\_lock (a raw spinlock in the
scheduler), kfree\_rcu() itself should never allocate memory with
\_\_GFP\_KSWAPD\_RECLAIM as waking up kswapd ends up acquiring pi\_lock,
which leads to a deadlock.

Reproducing the issue even intentionally was not straightforward.
The set\_cpus\_allowed\_force() path that is called under pi\_lock is
exercised very rarely, and competing tasks that allocate memory will
most likely wake kswapd up.

Therefore the existence of the deadlock was verified with a modified
kernel that has a lockdep map for waking up kswapd:

  ======================================================
  WARNING: possible circular locking dependency detected
  7.2.0-rc1-slab-for-next+ \#10 Not tainted
  ------------------------------------------------------
  git/6660 is trying to acquire lock:
  ffff8e524533c550 (&p-\>pi\_lock){-.-.}-{2:2}, at: \_raw\_spin\_lock\_irqsave+0x12/0x20

  but task is already holding lock:
  ffff8e57bffff1a0 (&pgdat-\>kswapd\_wait){....}-{3:3}, at: \_raw\_spin\_lock\_irqsave+0x12/0x20

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

  -\> \#2 (&pgdat-\>kswapd\_wait){....}-{3:3}:
         \_\_lock\_acquire+0x5a4/0xc50
         lock\_acquire.part.0+0xb7/0x240
         lock\_acquire+0x70/0x170
         \_\_raw\_spin\_lock\_irqsave+0x44/0x80
         \_raw\_spin\_lock\_irqsave+0x12/0x20
         \_\_wake\_up\_common\_lock+0x31/0xa0
         \_\_wake\_up+0x20/0x40
         kswapd\_wakeup\_wake+0x7e/0x110
         wakeup\_kswapd+0x295/0x320
         wake\_all\_kswapds+0xac/0x1a0
         \_\_alloc\_pages\_slowpath.constprop.0+0x282/0xf80
         \_\_alloc\_frozen\_pages\_noprof+0x32a/0x360
         alloc\_slab\_page+0x2e/0x160
         allocate\_slab+0x82/0x420
         new\_slab+0x52/0xb0
         refill\_objects+0x13d/0x190
         refill\_sheaf+0x5d/0xd0
         \_\_pcs\_replace\_empty\_main+0x230/0xb10
         \[...\]

  -\> \#1 (kswapd\_wakeup){-.-.}-{0:0}:
         \_\_lock\_acquire+0x5a4/0xc50
         lock\_sync.part.0+0x75/0x100
         lock\_sync+0x36/0x70
         might\_wakeup\_kswapd+0x61/0xa0
         \_\_kfree\_rcu\_sheaf+0x33/0xd90
         kvfree\_call\_rcu+0x1d4/0x3b0
         set\_cpus\_allowed\_force+0x163/0x220
         cpuset\_cpus\_allowed\_fallback+0x18b/0x240
         select\_fallback\_rq+0x1e6/0x250
	 \[...\]

  -\> \#0 (&p-\>pi\_lock){-.-.}-{2:2}:
         check\_prev\_add+0xe6/0xe00
         validate\_chain+0x51e/0x6e0
         \_\_lock\_acquire+0x5a4/0xc50
         lock\_acquire.part.0+0xb7/0x240
         lock\_acquire+0x70/0x170
         \_\_raw\_spin\_lock\_irqsave+0x44/0x80
         \_raw\_spin\_lock\_irqsave+0x12/0x20
         try\_to\_wake\_up+0x77/0xa90
         default\_wake\_function+0x27/0x60
         autoremove\_wake\_function+0x23/0xb0
         \_\_wake\_up\_common+0xb8/0x170
         \_\_wake\_up\_common\_lock+0x51/0xa0
         \_\_wake\_up+0x20/0x40
         kswapd\_wakeup\_wake+0x7e/0x110
         wakeup\_kswapd+0x295/0x320
         wake\_all\_kswapds+0xac/0x1a0
         \_\_alloc\_pages\_slowpath.constprop.0+0x282/0xf80
         \_\_alloc\_frozen\_pages\_noprof+0x32a/0x360
         alloc\_slab\_page+0x2e/0x160
         allocate\_slab+0x82/0x420
         new\_slab+0x52/0xb0
         refill\_objects+0x13d/0x190
         refill\_sheaf+0x5d/0xd0
         \_\_pcs\_replace\_empty\_main+0x230/0xb10
         \[...\]

  other info that might help us debug this:

  Chain exists of:
    &p-\>pi\_lock --\> kswapd\_wakeup --\> &pgdat-\>kswapd\_wait

   Possible unsafe locking scenario:

         CPU0                    CPU1
         ----                    ----
    lock(&pgdat-\>kswapd\_wait);
                                 lock(kswapd\_wakeup);
                                 lock(&pgdat-\>kswapd\_wait);
    lock(&p-\>pi\_lock);

   \*\*\* DEADLOCK \*\*\*

  3 locks held by git/6660:
   \#0: ffff8e519f0e9e20 (&type-\>i\_mutex\_dir\_key\#6){++++}-{4:4}, at: lookup\_slow+0x2d/0x60
   \#1: ffffffff8a31c460 (kswapd\_wakeup){-.-.}-
---truncated---

## Affected and fixed versions

- Linux: \>= ec66e0d599520ab414db745544e25d80d0ac5054, \< 46545c86b54ffb969b6e3662942b4a6191619eaa; \>= ec66e0d599520ab414db745544e25d80d0ac5054, \< af2fb3ee6679b517e2fdbd3ba16ec276a8b74312 (cvelist)
- Linux: 6.18 (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-2026-98818. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-98818.md
Affected: Linux >= ec66e0d599520ab414db745544e25d80d0ac5054, < 46545c86b54ffb969b6e3662942b4a6191619eaa; >= ec66e0d599520ab414db745544e25d80d0ac5054, < af2fb3ee6679b517e2fdbd3ba16ec276a8b74312; Linux 6.18
Fixed in: Linux 46545c86b54ffb969b6e3662942b4a6191619eaa

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-2026-98818 being exploited?

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

### How serious is CVE-2026-98818?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-98818?

Linux \>= ec66e0d599520ab414db745544e25d80d0ac5054, \< 46545c86b54ffb969b6e3662942b4a6191619eaa; \>= ec66e0d599520ab414db745544e25d80d0ac5054, \< af2fb3ee6679b517e2fdbd3ba16ec276a8b74312; Linux 6.18.

### Is there a fix for CVE-2026-98818?

Yes. Fixed in Linux 46545c86b54ffb969b6e3662942b4a6191619eaa. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-98818?

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

- other: <https://git.kernel.org/stable/c/46545c86b54ffb969b6e3662942b4a6191619eaa>
- other: <https://git.kernel.org/stable/c/af2fb3ee6679b517e2fdbd3ba16ec276a8b74312>

## 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-2026-98818>

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