Linux Kernel Spin Lock Initialization Vulnerability in m_can Class Device Handling

Vulnerability

A vulnerability exists in the Linux kernel's CAN bus controller implementation, specifically within the m_can class device management. The issue arises because the spin lock responsible for managing transmission handling is not properly initialized during the device probing process. This lack of initialization can lead to kernel errors related to spin lock integrity, particularly when sending CAN frames using the 'cansend' command from the can-utils package. The uninitialized spin lock generates a 'bad magic' error, indicating a corruption in the expected lock state, which can disrupt normal operations and potentially be exploited in a way that causes further issues within the kernel's handling of CAN communications.

Impact

Failure to initialize the spin lock can cause kernel panic or instability when the system attempts to manage CAN frame transmissions, leading to a breakdown in communication over the CAN bus.

Reproduction

The vulnerability can be reproduced by loading a Linux kernel version that contains the flaw and then using the 'cansend' command from the can-utils package to send CAN frames. The kernel will respond with a 'spinlock bad magic' error, indicating that the transmission handling spin lock was not properly initialized, causing a disruption in the expected operation.

Remediation

The vulnerability has been addressed in the official Linux kernel repository. Users should upgrade to a version that includes the fix.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
5.7
remediation
7.7
relevance
0.0
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.