Skip to content

Commit 75a5ca5

Browse files
committed
ALSA: usb-audio: Fix size validation in convert_chmap_v3()
jira VULN-152936 cve-bf CVE-2025-39757 commit-author Dan Carpenter <dan.carpenter@linaro.org> commit 89f0add 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> (cherry picked from commit 89f0add) Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
1 parent 1d1cc24 commit 75a5ca5

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
@@ -346,7 +346,7 @@ snd_pcm_chmap_elem *convert_chmap_v3(struct uac3_cluster_header_descriptor
346346
u16 cs_len;
347347
u8 cs_type;
348348

349-
if (len < sizeof(*p))
349+
if (len < sizeof(*cs_desc))
350350
break;
351351
cs_len = le16_to_cpu(cs_desc->wLength);
352352
if (len < cs_len)

0 commit comments

Comments
 (0)