CVE-2026-31403
Use-After-Free Vulnerability in Linux Kernel NFS Proc Interface
Publication date: 2026-04-03
Last updated on: 2026-04-27
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in the Linux kernel's NFS server (NFSD) related to the handling of the /proc/fs/nfs/exports proc entry. When this proc entry is opened, it captures the caller's current network namespace but does not hold a reference to it. If the network namespace is destroyed (for example, when a container is destroyed after the opener switches namespaces), the kernel frees the associated cache. However, if the file descriptor remains open, subsequent reads dereference freed memory, leading to use-after-free issues.
The fix involves holding a reference to the network namespace for the lifetime of the open file descriptor, preventing the namespace from being torn down and the cache from being freed while the file descriptor is still open.
How can this vulnerability impact me? :
This vulnerability can lead to use-after-free conditions in the kernel, which may cause system instability, crashes, or potentially allow an attacker to execute arbitrary code with kernel privileges. This can compromise the security and reliability of systems running the affected Linux kernel, especially those using NFS services in containerized environments.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is resolved by holding a reference on the struct net for the lifetime of the open file descriptor to prevent the cache from being freed while any exports file descriptor is open.
To mitigate this vulnerability immediately, you should update your Linux kernel to a version that includes this fix.