Skip to content
Commit 8866f405 authored by Xi Wang's avatar Xi Wang Committed by Takashi Iwai
Browse files

ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk()



A malicious USB device could feed in a large nr_rates value.  This would
cause the subsequent call to kmemdup() to allocate a smaller buffer than
expected, leading to out-of-bounds access.

This patch validates the nr_rates value and reuses the limit introduced
in commit 4fa0e81b ("ALSA: usb-audio: fix possible hang and overflow
in parse_uac2_sample_rate_range()").

Signed-off-by: default avatarXi Wang <xi.wang@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 27c3afe6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment