CVE-2024-56698 usb: dwc3: gadget: Fix looping of queued SG entries

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel DWC3 USB gadget driver can cause a system crash when handling partially completed requests.

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-2024-56698?

CVE-2024-56698 is a medium-severity vulnerability in Linux kernel, published on 28 Dec 2024. 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: dwc3: gadget: Fix looping of queued SG entries

The dwc3_request->num_queued_sgs is decremented on completion. If a partially completed request is handled, then the dwc3_request->num_queued_sgs no longer reflects the total number of num_queued_sgs (it would be cleared).

Correctly check the number of request SG entries remained to be prepare and queued. Failure to do this may cause null pointer dereference when accessing non-existent SG entry.

Weakness: CWE-476

Which versions are affected by CVE-2024-56698?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-56698?

Apply the vendor's patch.

Is CVE-2024-56698 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-56169, BELL-CVE-2024-56698, DEBIAN-CVE-2024-56698, GHSA-wh76-6j96-82w8, UBUNTU-CVE-2024-56698.

Is CVE-2024-56698 in your software?

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

Check your SBOMs for free