Bug 2373665 (CVE-2022-50034) - CVE-2022-50034 kernel: usb: cdns3 fix use-after-free at workaround 2
Summary: CVE-2022-50034 kernel: usb: cdns3 fix use-after-free at workaround 2
Keywords:
Status: NEW
Alias: CVE-2022-50034
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-18 12:12 UTC by OSIDB Bzimport
Modified: 2025-06-18 19:48 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-06-18 12:12:53 UTC
In the Linux kernel, the following vulnerability has been resolved:

usb: cdns3 fix use-after-free at workaround 2

BUG: KFENCE: use-after-free read in __list_del_entry_valid+0x10/0xac

cdns3_wa2_remove_old_request()
{
	...
	kfree(priv_req->request.buf);
	cdns3_gadget_ep_free_request(&priv_ep->endpoint, &priv_req->request);
	list_del_init(&priv_req->list);
	^^^ use after free
	...
}

cdns3_gadget_ep_free_request() free the space pointed by priv_req,
but priv_req is used in the following list_del_init().

This patch move list_del_init() before cdns3_gadget_ep_free_request().

Comment 1 Avinash Hanwate 2025-06-18 19:38:08 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025061840-CVE-2022-50034-0d64@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.