mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
usb: gadget: avoid exposing kernel stack
commitffeee83aa0upstream. Function in_rq_cur copies random bytes from the stack. Zero the memory instead. Fixes:132fcb4608("usb: gadget: Add Audio Class 2.0 Driver") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
popcornmix
parent
cb669da218
commit
7ded4aebee
@@ -1291,6 +1291,7 @@ in_rq_cur(struct usb_function *fn, const struct usb_ctrlrequest *cr)
|
||||
|
||||
if (control_selector == UAC2_CS_CONTROL_SAM_FREQ) {
|
||||
struct cntrl_cur_lay3 c;
|
||||
memset(&c, 0, sizeof(struct cntrl_cur_lay3));
|
||||
|
||||
if (entity_id == USB_IN_CLK_ID)
|
||||
c.dCUR = p_srate;
|
||||
|
||||
Reference in New Issue
Block a user