CVE-2025-38004: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: can: bcm: add locking for bcm_op runtime updates The CAN broadcast manager (CAN BCM) can send a sequence of CAN frames via hrtimer. The content and also the length of the sequence can be changed resp reduced at runtime where the 'currframe' counter is then set to zero. Although this appeared to be a safe operation the updates of 'currframe' can be triggered from user space and hrtimer context in bcm_can_tx(). Anderson Nascimento created a proof of concept that triggered a KASAN slab-out-of-bounds read access which can be prevented with a spin_lock_bh. At the rework of bcm_can_tx() the 'count' variable has been moved into the protected section as this variable can be modified from both contexts too.
AI Analysis
Technical Summary
CVE-2025-38004 is a vulnerability identified in the Linux kernel's CAN broadcast manager (CAN BCM) subsystem. The CAN BCM is responsible for managing sequences of CAN (Controller Area Network) frames, which are used extensively in automotive and industrial control systems for communication between microcontrollers and devices. The vulnerability arises from improper synchronization when updating runtime variables such as 'currframe' and 'count' within the bcm_can_tx() function. These variables track the current frame in the sequence and the count of frames to be sent, respectively. Both can be modified concurrently from user space and the high-resolution timer (hrtimer) context without adequate locking mechanisms. This race condition leads to a slab-out-of-bounds read detected by Kernel Address Sanitizer (KASAN), which indicates a potential for memory corruption. The root cause is the lack of a spin_lock_bh (bottom half spinlock) protecting these updates, allowing concurrent access and modification. The patch involves adding proper locking around these critical sections and moving the 'count' variable inside the protected region to prevent concurrent modification. Although no known exploits are currently in the wild, the vulnerability could be leveraged to cause kernel crashes or potentially escalate privileges by corrupting kernel memory. The affected versions are specific Linux kernel commits identified by their hashes, indicating this is a recent and targeted fix. Since the CAN BCM is primarily used in embedded and automotive Linux environments, the impact is more pronounced in systems relying on CAN bus communication.
Potential Impact
For European organizations, especially those in automotive manufacturing, industrial automation, and embedded systems sectors, this vulnerability poses a significant risk. Many European countries have strong automotive industries (e.g., Germany, France, Italy) where Linux-based embedded systems with CAN bus interfaces are common. Exploitation could lead to denial of service through kernel crashes or, in worst cases, privilege escalation allowing attackers to gain control over critical systems. This could disrupt manufacturing lines, compromise vehicle safety systems, or affect industrial control systems, leading to operational downtime and safety hazards. Additionally, organizations involved in developing or deploying IoT devices with CAN interfaces could face increased risk. Given the increasing adoption of Linux in automotive ECUs and industrial controllers, the vulnerability could have broad implications for supply chain security and operational continuity in Europe.
Mitigation Recommendations
Organizations should immediately apply the official Linux kernel patches that introduce spin_lock_bh protection in the bcm_can_tx() function and move the 'count' variable into the protected critical section. For embedded and automotive Linux systems, kernel updates should be tested and deployed promptly. Where immediate patching is not feasible, organizations should restrict unprivileged user access to CAN BCM interfaces to prevent exploitation from user space. Implementing strict access controls and monitoring for unusual CAN bus activity can help detect attempts to exploit this race condition. Additionally, enabling kernel hardening features such as KASAN in development environments can assist in early detection of memory corruption issues. Vendors and integrators should review their CAN BCM usage and consider additional synchronization mechanisms if custom modifications exist. Finally, continuous monitoring of Linux kernel advisories and rapid deployment of security updates is critical to mitigate emerging risks.
Affected Countries
Germany, France, Italy, Spain, United Kingdom, Netherlands, Sweden, Belgium
CVE-2025-38004: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: can: bcm: add locking for bcm_op runtime updates The CAN broadcast manager (CAN BCM) can send a sequence of CAN frames via hrtimer. The content and also the length of the sequence can be changed resp reduced at runtime where the 'currframe' counter is then set to zero. Although this appeared to be a safe operation the updates of 'currframe' can be triggered from user space and hrtimer context in bcm_can_tx(). Anderson Nascimento created a proof of concept that triggered a KASAN slab-out-of-bounds read access which can be prevented with a spin_lock_bh. At the rework of bcm_can_tx() the 'count' variable has been moved into the protected section as this variable can be modified from both contexts too.
AI-Powered Analysis
Technical Analysis
CVE-2025-38004 is a vulnerability identified in the Linux kernel's CAN broadcast manager (CAN BCM) subsystem. The CAN BCM is responsible for managing sequences of CAN (Controller Area Network) frames, which are used extensively in automotive and industrial control systems for communication between microcontrollers and devices. The vulnerability arises from improper synchronization when updating runtime variables such as 'currframe' and 'count' within the bcm_can_tx() function. These variables track the current frame in the sequence and the count of frames to be sent, respectively. Both can be modified concurrently from user space and the high-resolution timer (hrtimer) context without adequate locking mechanisms. This race condition leads to a slab-out-of-bounds read detected by Kernel Address Sanitizer (KASAN), which indicates a potential for memory corruption. The root cause is the lack of a spin_lock_bh (bottom half spinlock) protecting these updates, allowing concurrent access and modification. The patch involves adding proper locking around these critical sections and moving the 'count' variable inside the protected region to prevent concurrent modification. Although no known exploits are currently in the wild, the vulnerability could be leveraged to cause kernel crashes or potentially escalate privileges by corrupting kernel memory. The affected versions are specific Linux kernel commits identified by their hashes, indicating this is a recent and targeted fix. Since the CAN BCM is primarily used in embedded and automotive Linux environments, the impact is more pronounced in systems relying on CAN bus communication.
Potential Impact
For European organizations, especially those in automotive manufacturing, industrial automation, and embedded systems sectors, this vulnerability poses a significant risk. Many European countries have strong automotive industries (e.g., Germany, France, Italy) where Linux-based embedded systems with CAN bus interfaces are common. Exploitation could lead to denial of service through kernel crashes or, in worst cases, privilege escalation allowing attackers to gain control over critical systems. This could disrupt manufacturing lines, compromise vehicle safety systems, or affect industrial control systems, leading to operational downtime and safety hazards. Additionally, organizations involved in developing or deploying IoT devices with CAN interfaces could face increased risk. Given the increasing adoption of Linux in automotive ECUs and industrial controllers, the vulnerability could have broad implications for supply chain security and operational continuity in Europe.
Mitigation Recommendations
Organizations should immediately apply the official Linux kernel patches that introduce spin_lock_bh protection in the bcm_can_tx() function and move the 'count' variable into the protected critical section. For embedded and automotive Linux systems, kernel updates should be tested and deployed promptly. Where immediate patching is not feasible, organizations should restrict unprivileged user access to CAN BCM interfaces to prevent exploitation from user space. Implementing strict access controls and monitoring for unusual CAN bus activity can help detect attempts to exploit this race condition. Additionally, enabling kernel hardening features such as KASAN in development environments can assist in early detection of memory corruption issues. Vendors and integrators should review their CAN BCM usage and consider additional synchronization mechanisms if custom modifications exist. Finally, continuous monitoring of Linux kernel advisories and rapid deployment of security updates is critical to mitigate emerging risks.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2025-04-16T04:51:23.977Z
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 68458da771f4d251b551044e
Added to database: 6/8/2025, 1:18:31 PM
Last enriched: 7/9/2025, 12:40:21 AM
Last updated: 8/19/2025, 3:41:52 PM
Views: 17
Related Threats
CVE-2025-27714: CWE-434 in INFINITT Healthcare INFINITT PACS System Manager
MediumCVE-2025-24489: CWE-434 in INFINITT Healthcare INFINITT PACS System Manager
MediumCVE-2025-55231: CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in Microsoft Windows Server 2019
HighCVE-2025-55230: CWE-822: Untrusted Pointer Dereference in Microsoft Windows 10 Version 1809
HighCVE-2025-55229: CWE-347: Improper Verification of Cryptographic Signature in Microsoft Windows 10 Version 1809
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.