В ядре Linux была устранена следующая уязвимость: ALSA: seq: Don't Утечка указателя ячейки расширения в загрузке The bounce_error_event() встраивает неудавшееся событие в загрузку data.ext.ptr, указывая на него. Когда это событие является событием переменной длины в очереди, его собственный data.ext.ptr содержит адрес своей первой ячейки расширения, помещенный туда snd_seq_event_dup(). Полезная нагрузка выходит дословно через snd_seq_expand_var_event(), поэтому адрес достигает пользовательского пространства.
Это тот же адрес commit 705dd6dcbc0e ("ALSA: seq: Clear variable event pointer on read"), удаленный из заголовка события. Путь чтения все еще очищает его там, чуть выше вызова, который расширяет полезную нагрузку. Вместо этого вставьте дезинфицированную копию, обработанную точно так же, как snd_seq_read () обрабатывает заголовок.
Копии стека достаточно, потому что доставка является синхронной и snd_seq_event_dup() копии перед возвращением. Непривилегированный клиент достигает этого, устанавливая SNDRV_SEQ_FILTER_BOUNCE, выстраивая событие переменной длины в очередь на порт, который не существует, и читая отскок назад. Восемь байт на 64-бит, из собственного пула.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ALSA: seq: Don't leak the extension cell pointer in the bounce payload The bounce_error_event() embeds the failed event in the bounce payload by pointing data.ext.ptr at it. When that event is a queued variable-length event, its own data.ext.ptr holds the address of its first extension cell, put there by snd_seq_event_dup(). The payload goes out verbatim through snd_seq_expand_var_event(), so the address reaches userspace. That is the same address commit 705dd6dcbc0e ("ALSA: seq: Clear variable event pointer on read") removed from the event header. The read path still clears it there, just above the call that expands the payload. Embed a sanitised copy instead, treated exactly as snd_seq_read() treats the header. A stack copy is enough because delivery is synchronous and snd_seq_event_dup() copies before returning. An unprivileged client reaches this by setting SNDRV_SEQ_FILTER_BOUNCE, queueing a variable-length event to a port that does not exist and reading the bounce back. Eight bytes on 64-bit, from its own pool.