mm/kmemleak: avoid soft lockup when scanning task stacks
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c4b28963fd79457315783b3b0f21c01eb88cfdc1 · < 5d10d4e19e6daa487f0cd0ea6cba472325de92f9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mm/kmemleak: avoid soft lockup when scanning task stacks
Patch series "mm/kmemleak: avoid soft lockup when scanning task", v3.
kmemleak_scan() scans every task stack under one rcu_read_lock() with no reschedule point, which can trip the soft lockup watchdog on hosts with very many threads.
That prints the following message, depending on the workload+host configuration:
watchdog: BUG: soft lockup - CPU#35 stuck for 22s! [kmemleak:537] scan_block kmemleak_scan kmemleak_scan_thread kthread
Patch 1 walks the tasks with find_ge_pid() so the scan reschedules between tasks
Patches 2-3 let the scan loops stop early once a scan is interrupted.
From the CVE record · Linux
The Linux kernel's kmemleak scanner can hold a CPU long enough to trigger the soft lockup watchdog when scanning task stacks on hosts with very many threads. The input does not describe an attacker-controlled trigger or specify network access, authentication, or user-interaction requirements.
Operators running the Linux kernel with kmemleak should check their kernel versions; affected versions are not specified.