Use-after-free vulnerability in spi: stm32 package

Kernel Updated 02 Oct 2025

Summary

31/05/2021
N/A
No i
Unrated
Not published

GSD-2021-1000294: spi: stm32: Fix use-after-free on unbind. Affects Kernel versions >= 1251ef565c1e31541019248a95eea5ffd5baa616, < 7bd798abad613855f80f7a205a60ccad17ad9487. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The spi: stm32 package is a component of the Linux Kernel, which is responsible for managing SPI (Serial Peripheral Interface) communication on STM32 microcontrollers. SPI is a synchronous serial communication interface commonly used in embedded systems to connect microcontrollers with peripheral devices. The spi: stm32 package provides the necessary drivers and functionality for SPI communication on STM32-based systems.

Vulnerability Detail

The use-after-free vulnerability in the spi: stm32 package allows an attacker to exploit a memory corruption issue that occurs when unbinding the SPI device. This vulnerability can be triggered by an attacker with local access to the system or by a remote attacker if the SPI device is exposed over a network. By sending specially crafted requests, an attacker can cause the SPI device to be freed while still being referenced, leading to a use-after-free condition. This can result in various consequences, including system crashes, privilege escalation, or arbitrary code execution.

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

If updating the kernel is not immediately feasible, a possible workaround is to disable the affected SPI device or restrict access to it. This can be achieved by modifying the system configuration or using access control mechanisms to limit the privileges of potential attackers. However, applying the fix by updating the kernel is strongly recommended to fully mitigate the vulnerability.

Conclusion

The use-after-free vulnerability in the spi: stm32 package can have serious security implications, including system crashes and potential code execution. It is crucial to apply the recommended fix by updating the Linux Kernel to the latest version. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The spi: stm32 package is a component of the Linux Kernel that provides drivers and functionality for SPI communication on STM32 microcontrollers.

A use-after-free vulnerability is a type of memory corruption issue where a program continues to reference memory after it has been freed. This can lead to various security issues, including crashes, privilege escalation, or arbitrary code execution.

This vulnerability can be exploited by an attacker with local access to the system or by a remote attacker if the SPI device is exposed over a network. The attacker can send specially crafted requests to trigger the use-after-free condition and potentially gain control over the system.

The impact of this vulnerability can vary depending on the specific system and its configuration. Possible consequences include system crashes, privilege escalation, or arbitrary code execution. It is important to apply the recommended fix to mitigate the risk.

To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.12.4 or later. This will ensure that the use-after-free issue is addressed and the SPI device is properly handled during unbinding.

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