CVE-2024-56651 can: hi311x: hi3110_can_ist(): fix potential use-after-free
A use-after-free vulnerability in the Linux kernel hi311x CAN driver allows attackers to potentially execute code or cause a system crash.
- 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-2024-56651?
CVE-2024-56651 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:
can: hi311x: hi3110_can_ist(): fix potential use-after-free
The commit a22bd630cfff ("can: hi311x: do not report txerr and rxerr during bus-off") removed the reporting of rxerr and txerr even in case of correct operation (i. e. not bus-off).
The error count information added to the CAN frame after netif_rx() is a potential use after free, since there is no guarantee that the skb is in the same state. It might be freed or reused.
Fix the issue by postponing the netif_rx() call in case of txerr and rxerr reporting.
Weakness: CWE-416
Which versions are affected by CVE-2024-56651?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-56651?
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-56651 being exploited?
There is no known exploitation of CVE-2024-56651 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-54750, AZL-54884, BELL-CVE-2024-56651, DEBIAN-CVE-2024-56651, GHSA-jcjf-6896-f99g, ROOT-OS-DEBIAN-11-CVE-2024-56651 and 1 more.