nfsd: initialize DRC hash table before registering shrinker
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfsd: initialize DRC hash table before registering shrinker
shrinker_register() precedes the INIT_LIST_HEAD loop and the drc_hashsize store. On weakly-ordered architectures (arm64, ppc), a shrinker scan can observe drc_hashsize before the bucket list heads are initialized, causing a NULL deref in the DRC shrinker callback.
Move bucket initialization and the drc_hashsize store before shrinker_register() so the hash table is fully initialized before it becomes visible to the shrinker.
From the CVE record · Linux
The Linux kernel can register the nfsd DRC shrinker before its hash table is fully initialized. On weakly ordered architectures such as arm64 and ppc, a shrinker scan can then cause a NULL dereference. The input does not identify an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel on weakly ordered architectures such as arm64 or ppc should check their versions; affected versions were not provided.