CVE-2025-39873 can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel Xilinx CAN driver allows attackers to potentially execute code or cause a system crash.

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-2025-39873?

CVE-2025-39873 is a high-severity use after free vulnerability in Debian Debian Linux, published on 23 Sep 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: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB

can_put_echo_skb() takes ownership of the SKB and it may be freed during or after the call.

However, xilinx_can xcan_write_frame() keeps using SKB after the call.

Fix that by only calling can_put_echo_skb() after the code is done touching the SKB.

The tx_lock is held for the entire xcan_write_frame() execution and also on the can_get_echo_skb() side so the order of operations does not matter.

An earlier fix commit 3d3c817c3a40 ("can: xilinx_can: Fix usage of skb memory") did not move the can_put_echo_skb() call far enough.

[mkl: add "commit" in front of sha1 in patch description] [mkl: fix indention]

Weakness: CWE-416

Which versions are affected by CVE-2025-39873?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2025-39873?

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-2025-39873 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-67650, AZL-74930, BELL-CVE-2025-39873, DEBIAN-CVE-2025-39873, GHSA-9mp7-jx47-xv3h, ROOT-OS-DEBIAN-11-CVE-2025-39873 and 3 more.

Is CVE-2025-39873 in your software?

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

Check your SBOMs for free