[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220301022608.10950-1-hbh25y@gmail.com>
Date: Tue, 1 Mar 2022 10:26:06 +0800
From: Hangyu Hua <hbh25y@...il.com>
To: gregkh@...uxfoundation.org
Cc: stable@...r.kernel.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, ben@...adent.org.uk,
balbi@...nel.org, axboe@...nel.dk, mingo@...nel.org,
jj251510319013@...il.com, zsm@...omium.org,
stern@...land.harvard.edu, Hangyu Hua <hbh25y@...il.com>
Subject: [PATCH 4.14 0/2] usb: gadget: use after free in dev_config
Author: Hangyu Hua <hbh25y@...il.com>
commit 89f3594d0de5 ("usb: gadget: don't release an existing dev->buf")
Author: Hangyu Hua <hbh25y@...il.com>
commit 501e38a5531e ("usb: gadget: clear related members when goto fail")
Add two commits to all stable branches.
There are two bugs:
dev->buf does not need to be released if it already exists before
executing dev_config.
dev->config and dev->hs_config and dev->dev need to be cleaned if
dev_config fails to avoid UAF.
Hangyu Hua (2):
usb: gadget: don't release an existing dev->buf
usb: gadget: clear related members when goto fail
drivers/usb/gadget/legacy/inode.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
2.25.1
Powered by blists - more mailing lists