В ядре Linux была устранена следующая уязвимость: ALSA: usb-audio: fix OOB write in snd_usbmidi_us122l_output() The snd_usbmidi_us122l_output() выбирает счёт 2 на чём-либо более медленном, чем высокая скорость, и никогда не связывает его с ep->max_transfer. Буфер URB содержит точно max_transfer байтов, поэтому устройство, объявляющее одну байтовую конечную точку, занимает два байта от snd_rawmidi_transmit(), а мемсет, который прокладывает остальные, вычисляет 1 - 2 в int и обертывается в SIZE_MAX. Только 0x800e и 0x800f привязаны к девяти байтам.
US-122MKII при 0x0644:0x8021 падает по умолчанию и принимает usb_maxpacket(), который ядро USB только зажимает вниз. Операции вывода akai и novation в этом файле недавно получили ту же защиту. Сделайте то же самое здесь.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ALSA: usb-audio: fix OOB write in snd_usbmidi_us122l_output() The snd_usbmidi_us122l_output() picks a count of 2 on anything slower than high speed and never relates it to ep->max_transfer. The URB buffer holds exactly max_transfer bytes, so a device declaring a one byte bulk endpoint takes two bytes from snd_rawmidi_transmit(), and the memset that pads the rest computes 1 - 2 in int and wraps to SIZE_MAX. Only 0x800e and 0x800f are pinned to nine bytes. The US-122MKII at 0x0644:0x8021 falls to the default and takes usb_maxpacket(), which the USB core only clamps downward. The akai and novation output ops in this file were given the same guard recently. Do the same here.