{"id":"DEBIAN-CVE-2026-98818","details":"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-\u003epi_lock){-.-.}-{2:2}, at: _raw_spin_lock_irqsave+0x12/0x20    but task is already holding lock:   ffff8e57bffff1a0 (&pgdat-\u003ekswapd_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:    -\u003e #2 (&pgdat-\u003ekswapd_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          [...]    -\u003e #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 \t [...]    -\u003e #0 (&p-\u003epi_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-\u003epi_lock --\u003e kswapd_wakeup --\u003e &pgdat-\u003ekswapd_wait     Possible unsafe locking scenario:           CPU0                    CPU1          ----                    ----     lock(&pgdat-\u003ekswapd_wait);                                  lock(kswapd_wakeup);                                  lock(&pgdat-\u003ekswapd_wait);     lock(&p-\u003epi_lock);     *** DEADLOCK ***    3 locks held by git/6660:    #0: ffff8e519f0e9e20 (&type-\u003ei_mutex_dir_key#6){++++}-{4:4}, at: lookup_slow+0x2d/0x60    #1: ffffffff8a31c460 (kswapd_wakeup){-.-.}- ---truncated---","modified":"2026-10-19T05:00:47.767205693Z","published":"2026-10-18T17:47:32.496057114Z","upstream":["CVE-2026-98818"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2026-98818"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.2.10-1"}]}],"versions":["6.12.100-1","6.12.101-1","6.12.105-1","6.12.107-1","6.12.111-1","6.12.113-1","6.12.38-1","6.12.41-1","6.12.43-1","6.12.43-1~bpo12+1","6.12.48-1","6.12.57-1","6.12.57-1~bpo12+1","6.12.63-1","6.12.63-1~bpo12+1","6.12.69-1","6.12.69-1~bpo12+1","6.12.73-1","6.12.73-1~bpo12+1","6.12.74-1","6.12.74-2","6.12.74-2~bpo12+1","6.12.85-1","6.12.85-1~bpo12+1","6.12.86-1","6.12.86-1~bpo12+1","6.12.88-1","6.12.88-1~bpo12+1","6.12.90-1","6.12.90-1~bpo12+1","6.12.90-2","6.12.90-2~bpo12+1","6.12.94-1","6.12.94-1~bpo12+1","6.12.95-1","6.12.95-1~bpo12+1","6.12.96-1","6.13.10-1~exp1","6.13.11-1~exp1","6.13.2-1~exp1","6.13.3-1~exp1","6.13.4-1~exp1","6.13.5-1~exp1","6.13.6-1~exp1","6.13.7-1~exp1","6.13.8-1~exp1","6.13.9-1~exp1","6.13~rc6-1~exp1","6.13~rc7-1~exp1","6.14.3-1~exp1","6.14.5-1~exp1","6.14.6-1~exp1","6.15-1~exp1","6.15.1-1~exp1","6.15.2-1~exp1","6.15.3-1~exp1","6.15.4-1~exp1","6.15.5-1~exp1","6.15.6-1~exp1","6.15~rc7-1~exp1","6.16-1~exp1","6.16.1-1~exp1","6.16.10-1","6.16.11-1","6.16.12-1","6.16.12-1~bpo13+1","6.16.12-2","6.16.3-1","6.16.3-1~bpo13+1","6.16.5-1","6.16.6-1","6.16.7-1","6.16.8-1","6.16.9-1","6.16~rc7-1~exp1","6.17.10-1","6.17.11-1","6.17.12-1","6.17.13-1","6.17.13-1~bpo13+1","6.17.2-1~exp1","6.17.5-1~exp1","6.17.6-1","6.17.7-1","6.17.7-2","6.17.8-1","6.17.8-1~bpo13+1","6.17.9-1","6.18.1-1~exp1","6.18.10-1","6.18.12-1","6.18.12-1~bpo13+1","6.18.13-1","6.18.14-1","6.18.15-1","6.18.15-1~bpo13+1","6.18.2-1~exp1","6.18.3-1","6.18.5-1","6.18.5-1~bpo13+1","6.18.8-1","6.18.9-1","6.18.9-1~bpo13+1","6.18~rc4-1~exp1","6.18~rc4-1~exp2","6.18~rc5-1~exp1","6.18~rc6-1~exp1","6.18~rc7-1~exp1","6.19-1~exp1","6.19.10-1","6.19.10-1~bpo13+1","6.19.11-1","6.19.11-1~bpo13+1","6.19.12-1","6.19.13-1","6.19.13-1~bpo13+1","6.19.14-1","6.19.14-1~bpo13+1","6.19.2-1~exp1","6.19.3-1~exp1","6.19.4-1~exp1","6.19.5-1~exp1","6.19.6-1","6.19.6-2","6.19.6-2~bpo13+1","6.19.8-1","6.19.8-1~bpo13+1","6.19~rc4-1~exp1","6.19~rc5-1~exp1","6.19~rc6-1~exp1","6.19~rc7-1~exp1","6.19~rc8-1~exp1","7.0-1~exp1","7.0.1-1~exp1","7.0.10-1","7.0.10-1~bpo13+1","7.0.12-1","7.0.12-2","7.0.12-2~bpo13+1","7.0.13-1","7.0.13-1~bpo13+1","7.0.14-1","7.0.3-1","7.0.4-1","7.0.4-1~bpo13+1","7.0.7-1","7.0.7-1~bpo13+1","7.0.9-1","7.0.9-1~bpo13+1","7.1.1-1~exp1","7.1.10-1","7.1.12-1","7.1.13-1","7.1.13-1~bpo13+1","7.1.2-1~exp1","7.1.3-1","7.1.3-1+sunvdc","7.1.3-1~bpo13+1","7.1.4-1","7.1.5-1","7.1.6-1","7.1.7-1","7.1.7-1~bpo13+1","7.1.8-1","7.1.8-1~bpo13+1","7.1.8-2","7.1.9-1","7.1.9-1+sparc64","7.1~rc2-1~exp1","7.1~rc3-1~exp1","7.1~rc4-1~exp1","7.1~rc4-1~exp2","7.1~rc5-1~exp1","7.1~rc7-1~exp1","7.2.2-1~exp1","7.2.3-1~exp1","7.2.6-1","7.2.6-1~bpo13+1","7.2.7-1","7.2.8-1","7.2.9-1","7.2.9-1~bpo13+1","7.2~rc3-1~exp1","7.2~rc5-1~exp1","7.2~rc7-1~exp1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-98818.json"}}],"schema_version":"1.9.0"}