Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-56651 Overview
CVE-2024-56651 is a use-after-free vulnerability [CWE-416] in the Linux kernel's hi311x Controller Area Network (CAN) driver. The flaw resides in the hi3110_can_ist() interrupt service routine, where the driver attaches error count information to a socket buffer (skb) after calling netif_rx(). Once netif_rx() is invoked, the kernel takes ownership of the skb and may free or reuse it, creating a use-after-free condition when the driver subsequently writes txerr and rxerr values into the frame.
Critical Impact
Local attackers with low privileges on a system using the HI-3110 CAN controller can trigger memory corruption, leading to confidentiality, integrity, and availability loss.
Affected Products
- Linux kernel versions prior to the patched stable releases containing the fix commits
- Linux kernel 6.13-rc1
- Debian LTS distributions shipping affected kernel versions
Discovery Timeline
- 2024-12-27 - CVE-2024-56651 published to NVD
- 2025-03 - Debian LTS security advisory issued
- 2026-08-04 - Last updated in NVD database
Technical Details for CVE-2024-56651
Vulnerability Analysis
The hi311x driver supports the Holt HI-3110 CAN controller connected via SPI. Inside hi3110_can_ist(), the interrupt handler constructs an skb representing a received CAN frame and delivers it to the network stack with netif_rx(). A prior change, commit a22bd630cfff ("can: hi311x: do not report txerr and rxerr during bus-off"), restructured error reporting but left code that writes transmit and receive error counters into the frame after the netif_rx() call.
Once netif_rx() returns, the socket buffer is no longer owned by the driver. The kernel's networking subsystem may free the buffer, pass it to a consumer, or recycle it into another path. Subsequent dereferences of the skb or its payload constitute a use-after-free, enabling attacker-influenced memory writes against freed kernel memory.
Root Cause
The root cause is an ordering violation in hi3110_can_ist(). The driver mutates the CAN frame payload after transferring ownership of the containing skb to the networking stack. The fix postpones the netif_rx() call until after txerr and rxerr values are written, ensuring the driver only touches memory it still owns.
Attack Vector
Exploitation requires local access with low privileges on a system using the hi311x driver. An attacker able to influence CAN bus traffic, or trigger error-reporting paths on the HI-3110 controller, can race the kernel's skb lifecycle to produce freed-memory accesses. Successful exploitation can corrupt kernel memory, enabling privilege escalation or kernel crashes. The vulnerability is scoped to hardware configurations that include the HI-3110 SPI CAN controller.
No public proof-of-concept exploit is available for CVE-2024-56651. Technical details are documented in the upstream kernel commits referenced in the vendor advisories.
Detection Methods for CVE-2024-56651
Indicators of Compromise
- Unexpected kernel oops or panic messages referencing hi3110_can_ist, netif_rx, or skb handling in kernel ring buffer output (dmesg).
- KASAN (Kernel Address Sanitizer) reports flagging use-after-free in the CAN subsystem on affected kernels.
- CAN interface instability, dropped frames, or unexplained bus-off transitions on devices using the HI-3110 controller.
Detection Strategies
- Inventory running kernel versions across Linux endpoints and compare against the fixed stable commits (1128022, 4ad77eb, 9ad86d3, bc30b2f).
- Identify systems loading the hi311x kernel module with lsmod | grep hi311x and prioritize patching those hosts.
- Enable KASAN or SLUB debugging on test systems to surface memory corruption during CAN driver exercise.
Monitoring Recommendations
- Collect dmesg and /var/log/kern.log output centrally and alert on kernel oops signatures referencing the CAN subsystem.
- Monitor loaded kernel modules on embedded and automotive Linux fleets where SPI-attached CAN controllers are common.
- Track vendor advisories from git.kernel.org and distribution security teams for additional stable backports.
How to Mitigate CVE-2024-56651
Immediate Actions Required
- Apply the upstream kernel patches referenced in the stable commits 1128022009444faf49359bd406cd665b177cb643, 4ad77eb8f2e07bcfa0e28887d3c7dbb732d92cc1, 9ad86d377ef4a19c75a9c639964879a5b25a433b, and bc30b2fe8c54694f8ae08a5b8a5d174d16d93075.
- Update to the latest stable kernel release provided by your Linux distribution vendor.
- Restrict local access on systems using the HI-3110 CAN controller until patching is complete.
Patch Information
The fix postpones the netif_rx() invocation until after error counter fields are written into the CAN frame, eliminating the window where the driver touches an skb owned by the network stack. Patches are available via the Kernel Git Commit 1128022, Kernel Git Commit 4ad77e, Kernel Git Commit 9ad86d3, and Kernel Git Commit bc30b2f. Debian users should consult the Debian LTS Announcement March 2025.
Workarounds
- Unload the hi311x module on systems that do not require HI-3110 CAN functionality using modprobe -r hi311x and blacklist it in /etc/modprobe.d/.
- Limit local user accounts and remove unnecessary access to systems with the HI-3110 controller to reduce the attack surface.
- Apply standard Linux hardening to constrain unprivileged users from interacting with CAN network interfaces.
# Blacklist the hi311x driver on systems that do not require it
echo "blacklist hi311x" | sudo tee /etc/modprobe.d/blacklist-hi311x.conf
sudo modprobe -r hi311x
# Verify the module is no longer loaded
lsmod | grep hi311x
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

