ALSA: timer: Don't take register_mutex with copy_from/to_user()
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: timer: Don't take register_mutex with copy_from/to_user()
The infamous mmap_lock taken in copy_from/to_user() can be often problematic when it's called inside another mutex, as they might lead to deadlocks.
In the case of ALSA timer code, the bad pattern is with guard(mutex)(®ister_mutex) that covers copy_from/to_user() -- which was mistakenly introduced at converting to guard(), and it had been carefully worked around in the past.
This patch fixes those pieces simply by moving copy_from/to_user() out of the register mutex lock again.
From the CVE record · Linux
The Linux kernel's ALSA timer code can hold register_mutex while copying data to or from user space. A local user exercising the affected timer operations may trigger a deadlock when those copies acquire mmap_lock. The input does not specify an authentication requirement beyond local access.
Engineers running the Linux kernel should check their systems; affected versions are not specified.