CVE-2024-56603 net: af_can: do not leave a dangling sk pointer in can_create()

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel CAN network subsystem allows attackers to potentially execute arbitrary code or escalate privileges.

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

CVE-2024-56603 is a high-severity use after free vulnerability in Linux kernel, published on 27 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:

net: af_can: do not leave a dangling sk pointer in can_create()

On error can_create() frees the allocated sk object, but sock_init_data() has already attached it to the provided sock object. This will leave a dangling sk pointer in the sock object and may cause use-after-free later.

Weakness: CWE-416

Which versions are affected by CVE-2024-56603?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-56603?

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-2024-56603 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-55488, AZL-55588, BELL-CVE-2024-56603, DEBIAN-CVE-2024-56603, GHSA-98rc-vgv3-572h, UBUNTU-CVE-2024-56603.

Is CVE-2024-56603 in your software?

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

Check your SBOMs for free