diff options
author | Takashi Iwai <[email protected]> | 2024-07-15 14:35:54 +0200 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2024-07-15 16:06:09 +0200 |
commit | 2f38cf730caedaeacdefb7ff35b0a3c1168117f9 (patch) | |
tree | c7e89afb408dbed7fc07a8f2b0b6be0f20d63198 /lib/crypto/mpi/mpi-internal.h | |
parent | 5fa87a081b2d633b944d5a93f5767623ef2a961d (diff) |
ALSA: usb: Fix UBSAN warning in parse_audio_unit()
A malformed USB descriptor may pass the lengthy mixer description with
a lot of channels, and this may overflow the 32bit integer shift
size, as caught by syzbot UBSAN test. Although this won't cause any
real trouble, it's better to address.
This patch introduces a sanity check of the number of channels to bail
out the parsing when too many channels are found.
Reported-by: [email protected]
Closes: https://lore.kernel.org/[email protected]
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions