Skip to content

CVE-2024-49976 tracing/timerlat: Drop interface_lock in stop_kthread()

MediumCVSS 5.5 EPSS 0.18%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
Linux KernelUbuntuDebian

Description

In the Linux kernel, the following vulnerability has been resolved:

tracing/timerlat: Drop interface_lock in stop_kthread()

stop_kthread() is the offline callback for "trace/osnoise:online", since
commit 5bfbcd1ee57b ("tracing/timerlat: Add interface_lock around clearing
of kthread in stop_kthread()"), the following ABBA deadlock scenario is
introduced:

T1 | T2 [BP] | T3 [AP]
osnoise_hotplug_workfn() | work_for_cpu_fn() | cpuhp_thread_fun()
| _cpu_down() | osnoise_cpu_die()
mutex_lock(&interface_lock) | | stop_kthread()
| cpus_write_lock() | mutex_lock(&interface_lock)
cpus_read_lock() | cpuhp_kick_ap() |

As the interface_lock here in just for protecting the "kthread" field of
the osn_var, use xchg() instead to fix this issue. Also use
for_each_online_cpu() back in stop_per_cpu_kthreads() as it can take
cpu_read_lock() again.

Upgrade path

6 packages: 6 fixed.

PackageAffectedFixed inStatus
debian/linux(Debian 13) < 6.11.4-1 6.11.4-1 Fixed
debian/linux(Debian 14) < 6.11.4-1 6.11.4-1 Fixed
Linux kernel < 6.6.55; < 6.10.14; < 6.11.3; < 6.12 +9 more 6.6.55, 6.10.14, 6.11.3, 6.12, 09cb44cc3d3df7ade2cebc939d6257a2fa8afc7a, a4a05ceffe8fad68b45de38fe2311bda619e76e2, b484a02c9cedf8703eff8f0756f94618004bd165, db8571a9a098086608c11a15856ff585789e67e8 Fixed
Microsoft azure linux < 6.6.57.1-2 6.6.57.1-2 Fixed
ubuntu/linux(Ubuntu 24.04) < 6.8.0-54.56 6.8.0-54.56 Fixed
ubuntu/linux-raspi(Ubuntu 24.04) < 6.8.0-1019.23 6.8.0-1019.23 Fixed

Affected products

ProductAffected versionsFixed in
Microsoft azure linux < 6.6.57.1-2 6.6.57.1-2
debian/linux(Debian:13) < 6.11.4-1 6.11.4-1
debian/linux(Debian:14) < 6.11.4-1 6.11.4-1
Linux kernel >= b4fdabffae14cca2c80d99bd81f3f27239ac7f5e, < a4a05ceffe8fad68b45de38fe2311bda619e76e2 a4a05ceffe8fad68b45de38fe2311bda619e76e2
Linux kernel >= 4679272d5252720746fd9c5465352cbc5665f230, < 09cb44cc3d3df7ade2cebc939d6257a2fa8afc7a 09cb44cc3d3df7ade2cebc939d6257a2fa8afc7a
Linux kernel >= 5bfbcd1ee57b607fd29e4645c7f350dd385dd9ad, < db8571a9a098086608c11a15856ff585789e67e8 db8571a9a098086608c11a15856ff585789e67e8
Linux kernel >= 5bfbcd1ee57b607fd29e4645c7f350dd385dd9ad, < b484a02c9cedf8703eff8f0756f94618004bd165 b484a02c9cedf8703eff8f0756f94618004bd165
Linux kernel >= 6.6.51, < 6.6.55 6.6.55
Linux kernel >= 6.10.10, < 6.10.14 6.10.14
Linux kernel = 6.11 No fix listed
Linux kernel < 6.6.55 6.6.55
Linux kernel < 6.10.14 6.10.14
Linux kernel < 6.11.3 6.11.3
Linux kernel < 6.12 6.12
ubuntu/linux(Ubuntu:24.04) < 6.8.0-54.56 6.8.0-54.56
ubuntu/linux-raspi(Ubuntu:24.04) < 6.8.0-1019.23 6.8.0-1019.23
Linux kernel >= 6.11, < 6.11.3 6.11.3
Linux kernel = 6.12-rc1 No fix listed

References