mm/memory_hotplug: fix memory block reference leak on remove
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:
mm/memory_hotplug: fix memory block reference leak on remove
Patch series "mm: Fix memory block leaks and locking", v2.
This series fixes two memory block device reference leaks and one locking issue around the per-memory_block hwpoison counter.
This patch (of 2):
remove_memory_blocks_and_altmaps() looks up each memory block with find_memory_block(), which acquires a reference to the memory block device.
That reference is never dropped on this path, resulting in a leaked device reference when removing memory blocks and their altmaps. Drop the reference after retrieving mem->altmap and clearing mem->altmap, before removing the memory block device.
From the CVE record · Linux
The Linux kernel leaks a memory block device reference when removing memory blocks and their altmaps. The input does not specify whether an attacker can trigger this path, what impact they could cause, or whether access or user interaction is required.
Teams running Linux kernels that remove memory blocks and their altmaps should check whether their kernel includes the fix; affected versions are not specified.