qemu/hw
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
..
9pfs
acpi hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' 2024-06-19 12:40:49 +02:00
adc
alpha
arm hw/arm/smmu: Refactor SMMU OAS 2024-07-18 13:49:30 +01:00
audio virtio-snd: check for invalid param shift operands 2024-07-21 14:43:02 -04:00
avr
block hw/block: m25p80: support quad mode for w25q01jvq 2024-07-09 08:05:44 +02:00
char hw/char/pl011: Avoid division-by-zero in pl011_get_baudrate() 2024-07-11 11:41:33 +01:00
core * target/i386/tcg: fixes for seg_helper.c 2024-07-17 15:40:28 +10:00
cpu
cris
cxl hw/cxl: Support firmware updates 2024-07-21 14:42:58 -04:00
display hw/display/bcm2835_fb: fix fb_use_offsets condition 2024-07-18 13:49:29 +01:00
dma hw/dma: Add a trace log for a description loading failure 2024-06-18 14:52:00 +02:00
fsi
gpio hw/gpio/aspeed: Add reg_table_count to AspeedGPIOClass 2024-07-02 07:52:43 +02:00
hppa
hyperv
i2c
i386 trivial patches for 2024-07-17 2024-07-18 10:07:23 +10:00
ide hw/ide/macio: switch from using qemu_allocate_irq() to qdev input GPIOs 2024-07-02 06:58:48 +02:00
input
intc virtio: features,fixes 2024-07-03 20:54:17 -07:00
ipack
ipmi
isa hw/isa/vt82c686: Turn "intr" irq into a named gpio 2024-07-16 20:04:08 +02:00
loongarch hw/loongarch/virt: Remove unused assignment 2024-07-12 09:41:18 +08:00
m68k hw: skip registration of outdated versioned machine types 2024-07-02 06:58:37 +02:00
mem hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature 2024-07-21 14:42:04 -04:00
microblaze
mips hw/isa/vt82c686: Turn "intr" irq into a named gpio 2024-07-16 20:04:08 +02:00
misc hw/misc: In STM32L4x5 EXTI, handle direct interrupts 2024-07-11 11:41:34 +01:00
net hw/net:ftgmac100: update TX and RX packet buffers address to 64 bits 2024-07-09 08:05:44 +02:00
nubus
nvme hw/nvme: Expand VI/VQ resource to uint32 2024-07-11 17:05:37 +02:00
nvram hw/nvram: Add BCM2835 OTP device 2024-07-01 12:48:55 +01:00
openrisc
pci hw/pci: Replace -1 with UINT32_MAX for romsize 2024-07-03 18:14:07 -04:00
pci-bridge
pci-host hw/ppc: Avoid using Monitor in pnv_phb4_pic_print_info() 2024-06-19 12:40:49 +02:00
pcmcia
ppc hw/isa/vt82c686: Turn "intr" irq into a named gpio 2024-07-16 20:04:08 +02:00
remote
riscv hw/riscv/virt.c: re-insert and deprecate 'riscv,delegate' 2024-07-18 12:08:45 +10:00
rtc
rx
s390x virtio: features,fixes 2024-07-03 20:54:17 -07:00
scsi * target/i386/tcg: fixes for seg_helper.c 2024-07-17 15:40:28 +10:00
sd hw/sd/sdcard: Support boot area in emmc image 2024-07-16 20:30:15 +02:00
sensor
sh4 hw/sh4: Remove newline character in trace events 2024-06-10 13:05:27 -04:00
smbios hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() 2024-06-19 12:40:49 +02:00
sparc
sparc64
ssi aspeed/smc: Add AST2700 support 2024-06-16 21:08:54 +02:00
timer hpet: fix HPET_TN_SETVAL for high 32-bits of the comparator 2024-07-16 18:18:24 +02:00
tpm
tricore
ufs hw/ufs: Fix mcq register range check logic 2024-07-14 17:11:21 +09:00
usb hw/usb/u2f-passthru: Get rid of qemu_open_old() 2024-07-17 14:04:15 +03:00
vfio hw/vfio/container: Get rid of qemu_open_old() 2024-07-17 14:04:15 +03:00
virtio hw/virtio/virtio-crypto: Fix op_code assignment in virtio_crypto_create_asym_session 2024-07-21 14:31:59 -04:00
watchdog aspeed/wdt: Add AST2700 support 2024-06-16 21:08:54 +02:00
xen xen: mapcache: Fix unmapping of first entries in buckets 2024-07-12 00:17:36 +02:00
xenpv
xtensa
Kconfig
meson.build