CVE-2025-68169: netpoll: Fix deadlock in memory allocation under spinlock
In the Linux kernel, the following vulnerability has been resolved:
netpoll: Fix deadlock in memory allocation under spinlock
Fix a AA deadlock in refillskbs() where memory allocation while holding skbpool->lock can trigger a recursive lock acquisition attempt.
The deadlock scenario occurs when the system is under severe memory pressure:
1. refillskbs() acquires skbpool->lock (spinlock) 2. allocskb() is called while holding the lock 3. Memory allocator fails and calls slaboutofmemory() 4. This triggers printk() for the OOM warning 5. The console output path calls netpollsendudp() 6. netpollsendudp() attempts to acquire the same skbpool->lock 7. Deadlock: the lock is already held by the same CPU
Call stack: refillskbs() spinlockirqsave(&skbpool->lock) <- lock acquired allocskb() kmemcacheallocnodenoprof() slaboutofmemory() printk() consoleflushall() netpollsendudp() skbdequeue() spinlockirqsave(&skbpool->lock) <- deadlock attempt
This bug was exposed by commit 248f6571fd4c51 ("netpoll: Optimize skb refilling on critical path") which removed refillskbs() from the critical path (where nested printk was being deferred), letting nested printk being called from inside refillskbs()
Refactor refillskbs() to never allocate memory while holding the spinlock.
Another possible solution to fix this problem is protecting the refillskbs() from nested printks, basically calling printkdeferred{enter,exit}() in refillskbs(), then, any nested prwarn() would be deferred.
I prefer this approach, given I think it might be a good idea to move the allocskb() from GFPATOMIC to GFPKERNEL in the future, so, having the allocskb() outside of the lock will be necessary step.
There is a possible TOCTOU issue when checking for the pool length, and queueing the new allocated skb, but, this is not an issue, given that an extra SKB in the pool is harmless and it will be eventually used.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-68169?
CVE-2025-68169 is classified as a high-severity vulnerability due to the potential for deadlock under specific conditions.
How do I fix CVE-2025-68169?
To fix CVE-2025-68169, you need to update your Linux kernel to the latest stable version that contains the patch addressing this vulnerability.
What is the impact of CVE-2025-68169?
The impact of CVE-2025-68169 includes the risk of system hangs and decreased availability due to deadlock situations during memory allocation.
Which versions of the Linux kernel are affected by CVE-2025-68169?
CVE-2025-68169 affects multiple versions of the Linux kernel, specifically those before the patch was applied.
Is CVE-2025-68169 a remote exploit vulnerability?
CVE-2025-68169 is not a remote exploit vulnerability, as it requires local access to trigger the deadlock situation.