Skip to content

Commit 06fb130

Browse files
committed
ALSA: usb-audio: Fix size validation in convert_chmap_v3()
JIRA: https://issues.redhat.com/browse/RHEL-118908 commit 89f0add Author: Dan Carpenter <dan.carpenter@linaro.org> Date: Mon Aug 18 12:59:45 2025 +0300 ALSA: usb-audio: Fix size validation in convert_chmap_v3() The "p" pointer is void so sizeof(*p) is 1. The intent was to check sizeof(*cs_desc), which is 3, instead. Fixes: ecfd411 ("ALSA: usb-audio: Validate UAC3 cluster segment descriptors") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aKL5kftC1qGt6lpv@stanley.mountain Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
1 parent 257a04d commit 06fb130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/usb/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
349349
u16 cs_len;
350350
u8 cs_type;
351351

352-
if (len < sizeof(*p))
352+
if (len < sizeof(*cs_desc))
353353
break;
354354
cs_len = le16_to_cpu(cs_desc->wLength);
355355
if (len < cs_len)

0 commit comments

Comments
 (0)