CVE-2022-50034 usb: cdns3 fix use-after-free at workaround 2

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's cdns3 USB driver allows attackers to cause a denial of service or potentially execute arbitrary code.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50034?

CVE-2022-50034 is a high-severity use after free vulnerability in Linux kernel, published on 18 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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().

Weakness: CWE-416

Which versions are affected by CVE-2022-50034?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50034?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2022-50034 being exploited?

There is no known exploitation of CVE-2022-50034 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50034, GHSA-7fcf-99gr-mjr2, UBUNTU-CVE-2022-50034.

Is CVE-2022-50034 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free