Use After Free Vulnerability in m_can

Kernel Updated 02 Oct 2025

Summary

24/04/2022
N/A
No i
Unrated
Not published

GSD-2022-1001924: can: m_can: m_can_tx_handler(): fix use after free of skb. Affects Kernel versions >= 80646733f11c2e9de3b6339f7e635047e6087280, < f43e64076ff1b1dcb893fb77ad1204105f710a29. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The m_can package is a part of the Linux Kernel ecosystem and is responsible for handling Controller Area Network (CAN) communication. CAN is a widely used protocol for communication between microcontrollers and devices in automotive and industrial applications. The m_can package provides the necessary functionality for transmitting and receiving CAN messages. However, a vulnerability has been discovered in the m_can_tx_handler() function, which can lead to a use after free of skb (socket buffer) objects.

Vulnerability Detail

The use after free vulnerability in m_can_tx_handler() occurs when the function attempts to access a socket buffer object that has already been freed. This can happen if the object is freed before the function completes its execution. An attacker can potentially exploit this vulnerability to execute arbitrary code or cause a denial of service by manipulating the freed skb object. The vulnerability was introduced in version v3.18 of the Linux Kernel and is fixed in version v5.15.33.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, users can apply the patch manually to the affected version of the Linux Kernel. The patch can be obtained from the commit f43e64076ff1b1dcb893fb77ad1204105f710a29 in the Linux Kernel repository. Here is an example of how to apply the patch:

  1. Clone the Linux Kernel repository: git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
  2. Checkout the affected version: git checkout v3.18
  3. Apply the patch: git cherry-pick f43e64076ff1b1dcb893fb77ad1204105f710a29
  4. Recompile and install the patched kernel.

Conclusion

The use after free vulnerability in m_can_tx_handler() of the m_can package in the Linux Kernel can have serious security implications. It is crucial to update to the fixed version of the Linux Kernel to mitigate the risk of arbitrary code execution or denial of service attacks. Applying the provided patch or obtaining the updated kernel from the official repository are recommended steps. If you need further assistance, feel free to contact DevNack.com for support on vulnerability remediation.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The use after free vulnerability in m_can_tx_handler() can potentially allow an attacker to execute arbitrary code or cause a denial of service. It is important to update to the fixed version of the Linux Kernel to mitigate this risk.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it for any open-source vulnerabilities, including this one.

Yes, this vulnerability can be exploited remotely if the affected system is exposed to the network. Attackers can send specially crafted CAN messages to trigger the use after free condition and potentially execute arbitrary code.

There are no known instances of this vulnerability being exploited in the wild. However, it is always recommended to apply security patches promptly to mitigate any potential risks.

For further support on vulnerability remediation and assistance with updating the Linux Kernel, you can reach out to info@devnack.com.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback