mm/mm_init: handle alloc_percpu failure in free_area_init_core_hotplug
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 75ef7184053989118d3814c558a9af62e7376a58 · < 2ebce860bdd7ae5e13002811bc9bbbf33fcfc221| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mm/mm_init: handle alloc_percpu failure in free_area_init_core_hotplug
We miss a failed allocation check for pgdat->per_cpu_nodestats, which results in a NULL deref when we offset into the per-cpu area.
Propagate -ENOMEM up the stack and leave per_cpu_nodestats pointing at boot_nodestats so a later online can retry the allocation.
hotadd_init_pgdat() returns NULL on failure, which __try_online_node() already maps to -ENOMEM.
On failure nothing needs to be unwound: - the node is never marked online - per_cpu_nodestats is left pointing at boot_nodestats - __add_memory_resource() cleans up pending memblock resources - later online attempts retry the per_cpu_nodestats allocation
From the CVE record · Linux
A failed allocation of per-CPU node statistics can cause a NULL dereference during memory-node initialization. The input does not establish whether an attacker can trigger this condition or what access or user interaction it would require.
Engineers running the Linux kernel should check their installations; affected versions are not specified.