[PATCH] usb: gadget: f_uac1: fix ac_header_desc in SS descriptor list

From: Paritosh Potukuchi

Date: Sat Aug 01 2026 - 17:09:22 EST


ac_header_desc is a pointer to a dynamically allocated
uac1_ac_header_descriptor. The SS descriptor list
incorrectly stores &ac_header_desc, which is the address of
the pointer variable rather than the descriptor itself.

usb_copy_descriptors() interprets the entry as a USB
descriptor header, which can lead to a global-out-of-bounds
read.

Store ac_header_desc instead of &ac_header_desc.

Fixes: 0591bc236015 ("usb: gadget: add f_uac1 variant based on a new u_audio api")
Reported-by: syzbot+debc5c305403f180c01c@xxxxxxxxxxxxxxxxxxxxxxxxx
Link: https://lore.kernel.org/all/6a68b182.4c659fcc.19cd90.0021.GAE@xxxxxxxxxx/T/
Signed-off-by: Paritosh Potukuchi <paritosh.potukuchi@xxxxxxx>
---
drivers/usb/gadget/function/f_uac1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 85c502e98f57..95d53ac8cedb 100644
--- a/drivers/usb/gadget/function/f_uac1.c
+++ b/drivers/usb/gadget/function/f_uac1.c
@@ -332,7 +332,7 @@ static struct usb_ss_ep_comp_descriptor ss_as_in_ep_desc_comp = {

static struct usb_descriptor_header *f_audio_ss_desc[] = {
(struct usb_descriptor_header *)&ac_interface_desc,
- (struct usb_descriptor_header *)&ac_header_desc,
+ (struct usb_descriptor_header *)ac_header_desc,

(struct usb_descriptor_header *)&usb_out_it_desc,
(struct usb_descriptor_header *)&io_out_ot_desc,
--
2.54.0