ALSA: seq: Fix race of snd_seq_timer_open()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
5.10.445.12.115.13In the Linux kernel, the following vulnerability has been resolved:
ALSA: seq: Fix race of snd_seq_timer_open()
The timer instance per queue is exclusive, and snd_seq_timer_open() should have managed the concurrent accesses. It looks as if it's checking the already existing timer instance at the beginning, but it's not right, because there is no protection, hence any later concurrent call of snd_seq_timer_open() may override the timer instance easily. This may result in UAF, as the leftover timer instance can keep running while the queue itself gets closed, as spotted by syzkaller recently.
For avoiding the race, add a proper check at the assignment of tmr->timeri again, and return -EBUSY if it's been already registered.
From the CVE record · Linux
A race in the Linux kernel’s ALSA sequencer timer can let concurrent calls to snd_seq_timer_open() replace a queue’s timer instance. The leftover timer may continue running after the queue closes, causing a use-after-free. The input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with the ALSA sequencer should check whether their kernel includes the fix; affected versions are not specified.