CVE-2026-31400 sunrpc: fix cache_request leak in cache_release
A memory leak in the Linux kernel's sunrpc module allows attackers to exhaust system memory by closing file descriptors during cache reads, causing denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-31400?
CVE-2026-31400 is a medium-severity denial of service vulnerability in Linux kernel, published on 3 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
sunrpc: fix cache_request leak in cache_release
When a reader's file descriptor is closed while in the middle of reading a cache_request (rp->offset != 0), cache_release() decrements the request's readers count but never checks whether it should free the request.
In cache_read(), when readers drops to 0 and CACHE_PENDING is clear, the cache_request is removed from the queue and freed along with its buffer and cache_head reference. cache_release() lacks this cleanup.
The only other path that frees requests with readers == 0 is cache_dequeue(), but it runs only when CACHE_PENDING transitions from set to clear. If that transition already happened while readers was still non-zero, cache_dequeue() will have skipped the request, and no subsequent call will clean it up.
Add the same cleanup logic from cache_read() to cache_release(): after decrementing readers, check if it reached 0 with CACHE_PENDING clear, and if so, dequeue and free the cache_request.
Weakness: CWE-401
Which versions are affected by CVE-2026-31400?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2026-31400?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-31400 being exploited?
There is no known exploitation of CVE-2026-31400 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2026-31400, DEBIAN-CVE-2026-31400, GHSA-73jc-99jj-ch5v, ROOT-OS-DEBIAN-11-CVE-2026-31400, ROOT-OS-DEBIAN-12-CVE-2026-31400, ROOT-OS-DEBIAN-13-CVE-2026-31400 and 3 more.