CVE-2024-46845: tracing/timerlat: Only clear timer if a kthread exists
In the Linux kernel, the following vulnerability has been resolved:
tracing/timerlat: Only clear timer if a kthread exists
The timerlat tracer can use user space threads to check for osnoise and timer latency. If the program using this is killed via a SIGTERM, the threads are shutdown one at a time and another tracing instance can start up resetting the threads before they are fully closed. That causes the hrtimer assigned to the kthread to be shutdown and freed twice when the dying thread finally closes the file descriptors, causing a use-after-free bug.
Only cancel the hrtimer if the associated thread is still around. Also add the interfacelock around the resetting of the tlatvar->kthread.
Note, this is just a quick fix that can be backported to stable. A real fix is to have a better synchronization between the shutdown of old threads and the starting of new ones.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.133-1Fixed in 6.12.22-1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-46845?
CVE-2024-46845 has a moderate severity rating due to its potential impact on system performance.
How do I fix CVE-2024-46845?
To fix CVE-2024-46845, update to a patched version of the Linux kernel such as 5.10.223-1 or a later version.
Which versions of the Linux kernel are affected by CVE-2024-46845?
CVE-2024-46845 affects Linux kernel versions from 6.5 up to 6.10.10, as well as specific release candidates.
What is the main issue addressed by CVE-2024-46845?
CVE-2024-46845 resolves a timer latency issue in the timerlat tracer when a user-space thread is terminated.
Is there a workaround for CVE-2024-46845?
There are no known workarounds for CVE-2024-46845, so updating to a safe version is recommended.