Linux kernel denial of service in memory tier offlining
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 |
|
|
6.18.647.3.57.4-rc2In the Linux kernel, the following vulnerability has been resolved:
mm/memory-tiers: unregister empty tiers outside memory_tier_lock
When offlining a node's last memory empties its tier, clear_node_memory_tier() calls device_unregister() while holding memory_tier_lock. A concurrent sysfs read can hold a kernfs active reference and block in nodelist_show() on that mutex. device_unregister() then waits in kernfs_drain() for the read to finish and release its active reference, while the reader waits for the offlining task to release the mutex.
Return the node's former tier from clear_node_memory_tier(), making the helper more similar to set_node_memory_tier(), which also returns a memory_tier pointer. Let the caller unlink an empty tier under memory_tier_lock before rebuilding demotion targets, then unregister its device after dropping the lock.
From the CVE record · Linux
The Linux kernel can deadlock when offlining a node's last memory empties its memory tier while a sysfs read is in progress. The offlining task holds memory_tier_lock while waiting for the read to finish, but the read needs that lock to complete. The input does not specify an authentication requirement or a remote attack path.
Engineers running Linux kernels with memory-tier support should check their versions; affected versions are not specified.