CVE-2021-47232 can: j1939: fix Use-after-Free, hold skb ref while in use

Critical 9.8 Published Updated

A use-after-free vulnerability in the Linux kernel CAN J1939 protocol allows attackers to cause denial of service or potentially execute code.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-47232?

CVE-2021-47232 is a critical use after free vulnerability in Linux kernel, published on 21 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

can: j1939: fix Use-after-Free, hold skb ref while in use

This patch fixes a Use-after-Free found by the syzbot.

The problem is that a skb is taken from the per-session skb queue, without incrementing the ref count. This leads to a Use-after-Free if the skb is taken concurrently from the session queue due to a CTS.

Weakness: CWE-416

Which versions are affected by CVE-2021-47232?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47232?

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-2021-47232 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47232, GHSA-rmqp-6x5x-g7fg, UBUNTU-CVE-2021-47232.

Is CVE-2021-47232 in your software?

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

Check your SBOMs for free