ALSA: seq: Serialize compat port-info ioctls
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b3defb791b26ea0683a93a4f49c77ec45ec96f10 · < fc5c52848e405b6efb073db5035bb9ebaed11ec4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: seq: Serialize compat port-info ioctls
The native sequencer ioctl path serializes handler calls with client->ioctl_mutex, but the translated port-info compat path invokes the same handlers through snd_seq_kernel_client_ctl() without taking that mutex.
This lets concurrent compat CREATE_PORT requests pass the port-count check before any request reaches the serialized insertion. The computed integer port index can then exceed the address field range and wrap to an existing index. Subsequent subscriber teardown can resolve the duplicate address to the wrong port and access a freed subscriber.
Take ioctl_mutex while dispatching converted port-info requests, matching the native ioctl path. All translated port-info commands share this helper, so their accesses to the client port state are serialized as well.
From the CVE record · Linux
The Linux kernel’s ALSA sequencer does not serialize translated port-info ioctl requests. A local process issuing concurrent compat CREATE_PORT requests can cause a port index to wrap to an existing address; subsequent subscriber teardown can then access a freed subscriber. No authentication or user interaction requirements are specified.
Engineers running Linux kernels with ALSA sequencer compat port-info ioctl support should check their versions; affected versions are not specified.