ALSA: seq: Clear variable event pointer on read
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 74ac1ce1f4afdb3b80b6742fa28fb86c8c51d31b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: seq: Clear variable event pointer on read
snd_seq_read() copies a queued variable-length event header to userspace before expanding the payload. Queued variable-length events use SNDRV_SEQ_EXT_CHAINED internally, and data.ext.ptr points at the first extension cell.
The read side strips SNDRV_SEQ_EXT_* bits from data.ext.len before the copy, but it leaves data.ext.ptr untouched. A userspace sequencer client can therefore write a direct variable event to itself and read back the extension-cell kernel address from the returned header.
Clear the temporary header pointer before copy_to_user(). The original queued event remains unchanged and is still passed to snd_seq_expand_var_event(), so payload expansion keeps using the internal chain.
From the CVE record · Linux
The Linux kernel ALSA sequencer leaves a kernel pointer in the header returned when a variable-length event is read. A local userspace sequencer client can send such an event to itself and read back the extension-cell kernel address; this requires access to the sequencer client but no other user interaction.
Operators running Linux kernels with the affected ALSA sequencer code should check their kernel versions; affected versions were not specified.