summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorCássio Gabriel <cassiogabrielcontato@gmail.com>2026-05-07 11:28:30 -0300
committerTakashi Iwai <tiwai@suse.de>2026-05-15 11:21:20 +0200
commitc77a6cbb36ff8cbc1f084d94f8dcda5250935271 (patch)
tree8589a63bd9f37b4a1655b2474d986521f588d550 /include/linux
parent0cf821727205109ff2119d2bbd45fef8239f7e2c (diff)
ALSA: virtio: Validate control metadata from the device
virtio-snd control handling trusts the device-provided control type and value count returned by the device. That metadata is then used directly to index g_v2a_type_map[] in virtsnd_kctl_info(), and to size loops and memcpy() operations in virtsnd_kctl_get() and virtsnd_kctl_put() against fixed-size virtio_snd_ctl_value and snd_ctl_elem_value arrays. A buggy or malicious device can therefore trigger out-of-bounds access by advertising an invalid control type or an oversized value count. Validate control type and count once in virtsnd_kctl_parse_cfg(), before querying enumerated items or exposing the control to ALSA. Fixes: d6568e3de42d ("ALSA: virtio: add support for audio controls") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260507-alsa-virtio-validate-kctl-info-v1-1-7404fb12ec37@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions