linux/sound/usb/caiaq
Pengpeng Hou aba30af07d ALSA: usb-audio: caiaq: validate EP1 reply lengths
usb_ep1_command_reply_dispatch() uses buf[0] as a command byte and then
reads command-specific fixed items from the same URB buffer. Several
paths use buf + 1, buf[1], buf[2], or buf + 3 without first proving that
urb->actual_length contains those bytes.

Add per-command length checks, use a payload length derived from the
bytes after the command byte for the control-state copy, and reject short
analog input payloads before the input helper reads fixed offsets from
the EP1 reply.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260705084601.56400-1-pengpeng@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-07-05 12:14:19 +02:00
..
audio.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
audio.h ALSA: caiaq: Use snd_card_free_when_closed() at disconnection 2024-11-13 13:33:47 +01:00
control.c ALSA: caiaq: Fix control_put() result and cache rollback 2026-04-17 17:52:00 +02:00
control.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
device.c ALSA: usb-audio: caiaq: validate EP1 reply lengths 2026-07-05 12:14:19 +02:00
device.h ALSA: caiaq: Replace with __packed attribute 2023-10-26 09:43:07 +02:00
input.c ALSA: usb-audio: caiaq: validate EP1 reply lengths 2026-07-05 12:14:19 +02:00
input.h ALSA: caiaq: Use snd_card_free_when_closed() at disconnection 2024-11-13 13:33:47 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
midi.c ALSA: Convert strlcpy to strscpy when return value is unused 2021-01-08 09:30:05 +01:00
midi.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00