CVE-2025-38004 can: bcm: add locking for bcm_op runtime updates

High 7.3 Published Updated

A race condition in the Linux kernel CAN broadcast manager allows a local attacker to trigger a slab-out-of-bounds read, potentially causing a crash or leaking memory.

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-38004?

CVE-2025-38004 is a high-severity vulnerability in Debian Debian Linux, published on 8 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:

can: bcm: add locking for bcm_op runtime updates

The CAN broadcast manager (CAN BCM) can send a sequence of CAN frames via hrtimer. The content and also the length of the sequence can be changed resp reduced at runtime where the 'currframe' counter is then set to zero.

Although this appeared to be a safe operation the updates of 'currframe' can be triggered from user space and hrtimer context in bcm_can_tx(). Anderson Nascimento created a proof of concept that triggered a KASAN slab-out-of-bounds read access which can be prevented with a spin_lock_bh.

At the rework of bcm_can_tx() the 'count' variable has been moved into the protected section as this variable can be modified from both contexts too.

Weakness: CWE-125

Which versions are affected by CVE-2025-38004?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2025-38004?

Apply the vendor's patch.

Is CVE-2025-38004 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-63687, BELL-CVE-2025-38004, DEBIAN-CVE-2025-38004, GHSA-29qg-42xm-553c, ROOT-OS-DEBIAN-11-CVE-2025-38004, ROOT-OS-DEBIAN-12-CVE-2025-38004 and 3 more.

Is CVE-2025-38004 in your software?

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

Check your SBOMs for free