ALSA: aloop: Fix racy access at PCM trigger
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b1c73fc8e697eb73e23603e465e9af2711ed4183 · < 5727ccf9d19ca414cb76d9b647883822e2789c2e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: aloop: Fix racy access at PCM trigger
The PCM trigger callback of aloop driver tries to check the PCM state and stop the stream of the tied substream in the corresponding cable. Since both check and stop operations are performed outside the cable lock, this may result in UAF when a program attempts to trigger frequently while opening/closing the tied stream, as spotted by fuzzers.
For addressing the UAF, this patch changes two things: - It covers the most of code in loopback_check_format() with cable->lock spinlock, and add the proper NULL checks. This avoids already some racy accesses. - In addition, now we try to check the state of the capture PCM stream that may be stopped in this function, which was the major pain point leading to UAF.
From the CVE record · Linux
The Linux kernel ALSA aloop driver has a race in its PCM trigger callback that can cause a use-after-free. A local program may trigger it by repeatedly triggering PCM while opening and closing the tied stream; the input does not specify whether special privileges are required.
Engineers running Linux kernels with the ALSA aloop driver should check their kernel versions; affected versions are not specified.