CVE-2025-68342 can: gs_usb: gs_usb_receive_bulk_callback(): check actual_length before accessing data

Not scored Published Updated

A missing length check in the Linux kernel gs_usb driver allows out-of-bounds memory access, potentially leading to crashes or code execution via USB.

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

What is CVE-2025-68342?

CVE-2025-68342 is a memory corruption vulnerability in Linux, published on 23 Dec 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:

can: gs_usb: gs_usb_receive_bulk_callback(): check actual_length before accessing data

The URB received in gs_usb_receive_bulk_callback() contains a struct gs_host_frame. The length of the data after the header depends on the gs_host_frame hf::flags and the active device features (e.g. time stamping).

Introduce a new function gs_usb_get_minimum_length() and check that we have at least received the required amount of data before accessing it. Only copy the data to that skb that has actually been received.

[mkl: rename gs_usb_get_minimum_length() -> +gs_usb_get_minimum_rx_length()]

Which versions are affected by CVE-2025-68342?

How do I fix CVE-2025-68342?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-68342 being exploited?

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

Sources

Also known as AZL-72989, BELL-CVE-2025-68342, DEBIAN-CVE-2025-68342, GHSA-2f36-x8xr-4642, ROOT-OS-DEBIAN-11-CVE-2025-68342, ROOT-OS-DEBIAN-12-CVE-2025-68342 and 4 more.

Is CVE-2025-68342 in your software?

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

Check your SBOMs for free