CVE-2022-50095: posix-cpu-timers: Cleanup CPU timers before freeing them during exec
In the Linux kernel, the following vulnerability has been resolved:
posix-cpu-timers: Cleanup CPU timers before freeing them during exec
Commit 55e8c8eb2c7b ("posix-cpu-timers: Store a reference to a pid not a task") started looking up tasks by PID when deleting a CPU timer.
When a non-leader thread calls execve, it will switch PIDs with the leader process. Then, as it calls exititimers, posixcputimerdel cannot find the task because the timer still points out to the old PID.
That means that armed timers won't be disarmed, that is, they won't be removed from the timerqueuelist. exititimers will still release their memory, and when that list is later processed, it leads to a use-after-free.
Clean up the timers from the de-threaded task before freeing them. This prevents a reported use-after-free.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.0.2-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.140-1Fixed in 6.0.2-1 - Compensating control
Clean up CPU timers from the de-threaded task before freeing them during exec.
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50095?
CVE-2022-50095 has been classified as a medium-severity vulnerability in the Linux kernel.
How do I fix CVE-2022-50095?
To address CVE-2022-50095, upgrade to a patched version of the Linux kernel beyond the affected versions.
Which versions of the Linux kernel are affected by CVE-2022-50095?
CVE-2022-50095 affects Linux kernel versions from 5.7 up to, but not including, 5.10.137, 5.11 through 5.15.61, 5.16 through 5.18.18, and 5.19 through 5.19.2.
What kind of attack can exploit CVE-2022-50095?
CVE-2022-50095 can potentially be exploited to cause denial of service due to improper cleanup of CPU timers.
Is CVE-2022-50095 exploitable remotely?
CVE-2022-50095 is generally considered not remotely exploitable, as it requires local access to the system.