CVE-2023-54276

Source
https://nvd.nist.gov/vuln/detail/CVE-2023-54276
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54276.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-54276
Downstream
Published
2025-12-30T12:16:05.020Z
Modified
2025-12-30T21:06:31.531887Z
Summary
nfsd: move init of percpu reply_cache_stats counters back to nfsd_init_net
Details

In the Linux kernel, the following vulnerability has been resolved:

nfsd: move init of percpu replycachestats counters back to nfsdinitnet

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/replycachestats 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/replycachestats"

Although this is easy to trigger on some arches (like aarch64), on x8664, calling thiscpuptr(NULL) evidently returns a pointer to the fixedpercpudata. That struct looks just enough like a newly initialized percpu var to allow nfsdreplycachestats_show to access it without Oopsing.

Move the initialization of the per-net+per-cpu reply-cache counters back into nfsdinitnet, 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54276.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4e18b58b106e34ac69d3052dd91f520bd83cf2fc
Fixed
3025d489f9c8984d1bf5916c4a20097ed80fca5c
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
70fdee548c036c6bdb496f284c9e78f1654b6dd0
Fixed
8549384d0f65981761fe2077d04fa2a8d37b54e0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e7e571ed4ec7bb50136233d8e7b986efef2af8c1
Fixed
66a178177b2b3bb1d71e854c5e7bbb320eb0e566
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f5f9d4a314da88c0a5faa6d168bf69081b7a25ae
Fixed
768c408594b52d8531e1a8ab62e5620c19213e73
Fixed
ed9ab7346e908496816cffdecd46932035f66e2e

Affected versions

v6.*

v6.3
v6.3-rc1
v6.3-rc2
v6.3-rc3
v6.3-rc4
v6.3-rc5
v6.3-rc6
v6.3-rc7
v6.4
v6.4-rc1
v6.4-rc2
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.4.1
v6.4.2
v6.4.3

Database specific

source

"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54276.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.3.0
Fixed
6.4.4

Database specific

source

"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54276.json"