posix-timers: Prevent RT livelock in itimer_delete()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ec8f954a40da8cd3d159713b608e901f0cd909a9 · < 9d9e522010eb5685d8b53e8a24320653d9d4cbbf| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
posix-timers: Prevent RT livelock in itimer_delete()
itimer_delete() has a retry loop when the timer is concurrently expired. On non-RT kernels this just spin-waits until the timer callback has completed, except for posix CPU timers which have HAVE_POSIX_CPU_TIMERS_TASK_WORK enabled.
In that case and on RT kernels the existing task could live lock when preempting the task which does the timer delivery.
Replace spin_unlock() with an invocation of timer_wait_running() to handle it the same way as the other retry loops in the posix timer code.
From the CVE record · Linux
The Linux kernel's itimer_delete() can livelock when timer deletion races with expiration and the deleting task preempts the task delivering the timer. This affects RT kernels and non-RT kernels with HAVE_POSIX_CPU_TIMERS_TASK_WORK enabled for POSIX CPU timers. The input does not specify whether an attacker needs local access, authentication, or user interaction.
Engineers running Linux kernels with RT support or HAVE_POSIX_CPU_TIMERS_TASK_WORK enabled should check their kernel versions against the vendor advisory; affected versions were not provided.