CVE-2023-54276
Description
In the Linux kernel, the following vulnerability has been resolved:
nfsd: move init of percpu reply_cache_stats counters back to nfsd_init_net
Commit f5f9d4a314da ("nfsd: move reply cache initialization into nfsd startup") moved the initialization of the reply cache into nfsd startup, but didn't account for the stats counters, which can be accessed before nfsd is ever started. The result can be a NULL pointer dereference when someone accesses /proc/fs/nfsd/reply_cache_stats while nfsd is still shut down.
This is a regression and a user-triggerable oops in the right situation:
- non-x86_64 arch
- /proc/fs/nfsd is mounted in the namespace
- nfsd is not started in the namespace
- unprivileged user calls "cat /proc/fs/nfsd/reply_cache_stats"
Although this is easy to trigger on some arches (like aarch64), on x86_64, calling this_cpu_ptr(NULL) evidently returns a pointer to the fixed_percpu_data. That struct looks just enough like a newly initialized percpu var to allow nfsd_reply_cache_stats_show to access it without Oopsing.
Move the initialization of the per-net+per-cpu reply-cache counters back into nfsd_init_net, while leaving the rest of the reply cache allocations to be done at nfsd startup time.
Kudos to Eirik who did most of the legwork to track this down.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A NULL-pointer dereference in Linux kernel's NFS reply cache stats can be triggered by an unprivileged user reading /proc/fs/nfsd/reply_cache_stats while nfsd is not started.
Description
CVE-2023-54276 is a NULL-pointer dereference vulnerability in the Linux kernel's NFS NFS daemon (nfsd) reply cache statistics counters. The root cause is a regression introduced by commit f5f9d4a314da, which moved the initialization of the per-CPU reply cache statistics counters out of the network namespace initialization function (nfsd_init_net) into the nfsd startup path. When nfsd is not yet started, these counters remain uninitialized, leading to a NULL-pointer dereference when the /proc/fs/nfsd/reply_cache_stats proc file is read [1][2].
Exploitation
An unprivileged user can trigger the vulnerability by mounting the /proc/fs/nfsd filesystem (if not already mounted) in a network namespace and then reading /proc/fs/nfsd/reply_cache_stats while nfsd is not running in that namespace. On architectures such as aarch64, this results in a user-triggerable kernel oops. On x86_64, the this_cpu_ptr(NULL) call may return a fixed per-CPU data area that resembles a properly initialized struct, potentially masking the crash but leaving the system in an undefined state [1][2].
Impact
A successful exploit allows an unprivileged user to cause a kernel oops (denial of service). The vulnerability is local, requires access to a network namespace with /proc/fs/nfsd mounted, and does not require authentication beyond normal user permissions. The oops can lead to system instability or crash, impacting availability [1][2].
Mitigation
The fix moves the initialization of the per-net+per-CPU reply cache counters back into nfsd_init_net, ensuring the stats structures are allocated and initialized before any proc file access occurs. The rest of the reply cache allocations remain deferred to nfsd startup time. The patch has been applied to the Linux kernel stable trees and is present in versions that include commit 66a178177b2b or 8549384d0f65 [1][2]. Users should update their kernel to incorporate this fix.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
53025d489f9c88549384d0f6566a178177b2b768c408594b5ed9ab7346e90Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/3025d489f9c8984d1bf5916c4a20097ed80fca5cnvd
- git.kernel.org/stable/c/66a178177b2b3bb1d71e854c5e7bbb320eb0e566nvd
- git.kernel.org/stable/c/768c408594b52d8531e1a8ab62e5620c19213e73nvd
- git.kernel.org/stable/c/8549384d0f65981761fe2077d04fa2a8d37b54e0nvd
- git.kernel.org/stable/c/ed9ab7346e908496816cffdecd46932035f66e2envd
News mentions
0No linked articles in our index yet.