[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1462742459-4270-1-git-send-email-xypron.glpk@gmx.de>
Date: Sun, 8 May 2016 23:20:59 +0200
From: Heinrich Schuchardt <xypron.glpk@....de>
To: Felipe Balbi <balbi@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Daniel Mack <zonque@...il.com>,
Peter Chen <peter.chen@...escale.com>,
Robert Baldyga <r.baldyga@...sung.com>,
Nicholas Bellinger <nab@...ux-iscsi.org>,
John Youn <John.Youn@...opsys.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org,
Heinrich Schuchardt <xypron.glpk@....de>
Subject: [PATCH 1/1] usb: gadget: avoid exposing kernel stack
Function in_rq_cur copies random bytes from the stack.
Zero the memory instead.
Fixes: 132fcb460839 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@....de>
---
drivers/usb/gadget/function/f_uac2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
index 186d4b1..23cba7b 100644
--- a/drivers/usb/gadget/function/f_uac2.c
+++ b/drivers/usb/gadget/function/f_uac2.c
@@ -1292,6 +1292,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;
--
2.1.4
Powered by blists - more mailing lists