qemu/hw/audio
Manos Pitsidianakis 9b6083465f virtio-snd: check for invalid param shift operands
When setting the parameters of a PCM stream, we compute the bit flag
with the format and rate values as shift operand to check if they are
set in supported_formats and supported_rates.

If the guest provides a format/rate value which when shifting 1 results
in a value bigger than the number of bits in
supported_formats/supported_rates, we must report an error.

Previously, this ended up triggering the not reached assertions later
when converting to internal QEMU values.

Reported-by: Zheyu Ma <zheyuma97@gmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2416
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <virtio-snd-fuzz-2416-fix-v1-manos.pitsidianakis@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-07-21 14:43:02 -04:00
..
ac97.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
ac97.h
adlib.c
asc.c hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
cs4231.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
cs4231a.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
es1370.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
fmopl.c
fmopl.h
gus.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
gusemu_hal.c
gusemu_mixer.c
gusemu.h
gustate.h
hda-codec-common.h
hda-codec.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
intel-hda-defs.h
intel-hda.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
intel-hda.h
Kconfig
lm4549.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
lm4549.h
marvell_88w8618.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
meson.build Add virtio-sound-pci device 2023-11-07 03:39:10 -05:00
pcspk.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
pl041.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00
pl041.h
pl041.hx
sb16.c hw/audio/sb16: Do not migrate qdev properties 2024-01-05 16:20:15 +01:00
soundhw.c
trace-events virtio-sound: implement audio capture (RX) 2023-11-07 03:39:10 -05:00
trace.h
via-ac97.c hw/audio/via-ac97: Route interrupts using via_isa_set_irq() 2023-11-28 14:26:37 +01:00
virtio-snd-pci.c hw/audio/virtio-snd-pci: fix the PCI class code 2023-12-02 15:56:49 -05:00
virtio-snd.c virtio-snd: check for invalid param shift operands 2024-07-21 14:43:02 -04:00
wm8750.c hw/audio: Constify VMState 2023-12-29 11:17:30 +11:00