CVE-2021-39801: Use After Free Vulnerability in Linux Kernel

:linux_kernel: Updated 02 Oct 2025

Summary

01/04/2022
Yes i
High
Not published

CVE-2021-39801: In ion_ioctl of ion-ioctl.c, there is a possible use after free due to improper locking. Affects :linux_kernel: versions >= :0, < :2022-04-05. Fixed in :2022-04-05. 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 Linux Kernel is a widely used open-source operating system kernel that serves as the foundation for various Linux distributions. It provides essential functionality for managing system resources, such as memory, processes, and device drivers. The vulnerability identified as CVE-2021-39801 affects the Linux Kernel in the [upstream-linux-4.9.y] branch. This vulnerability arises due to a race condition between the ION_IOC_ALLOC and ION_IOC_FREE functions in the ion-ioctl.c file. Improper locking during these operations can result in a use after free scenario, potentially leading to local privilege escalation. Exploitation of this vulnerability does not require any additional execution privileges or user interaction.

Vulnerability Detail

The vulnerability in the Linux Kernel arises from a race condition between the ION_IOC_ALLOC and ION_IOC_FREE functions in the ion-ioctl.c file. This race condition occurs due to improper locking, which can result in a use after free scenario. An attacker could exploit this vulnerability to escalate their privileges locally without requiring any additional execution privileges or user interaction. The use after free scenario can lead to arbitrary code execution or other malicious activities, potentially compromising the security and integrity of the affected system.

How To Fix

Minimum fixed version

:2022-04-05

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

No specific workaround has been mentioned for this vulnerability.

Conclusion

The use after free vulnerability in the Linux Kernel, identified as CVE-2021-39801, poses a significant risk of local privilege escalation. It is crucial to update the Linux Kernel to a version that includes the necessary fixes to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for :linux_kernel: →

Share this vulnerability

FAQ

This vulnerability can lead to local privilege escalation, allowing an attacker to gain elevated privileges on the affected system.

No, user interaction is not required for exploitation of this vulnerability.

There are no known instances of this vulnerability being exploited in the wild at the time of this report.

The vulnerability affects the [upstream-linux-4.9.y] branch of the Linux Kernel.

Yes, the Linux Kernel community has released fixes for this vulnerability in the [upstream-linux-4.9.y] branch.

Related vulnerabilities

Recent vulnerabilities recorded for :linux_kernel:.

How To Fix

Minimum fixed version

:2022-04-05

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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