Kernel Stack Data Exposure in Linux Kernel - CVE-2021-47339

linux Updated 02 Oct 2025

Summary

21/05/2024
N/A
No i
Medium
5.5

CVE-2021-47339: In the Linux kernel, the following vulnerability has been resolved: media: v4l2-core: explicitly clear ioctl input data As seen from a recent syzbot bug report, mistakes in the compat ioctl implementation can lead to uni... Affects linux versions 5.10.103-1 – 6.9.9-1. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Linux kernel is the core component of many operating systems, responsible for managing hardware resources and providing essential services to software applications. It supports a wide range of functionalities, including process management, memory management, and device control. This vulnerability specifically affects the v4l2-core subsystem, which handles video devices and their interactions with user-space applications. The flaw arises from improper handling of ioctl input data, potentially leading to exposure of uninitialized kernel stack data.

Vulnerability Detail

CVE-2021-47339 is a vulnerability in the Linux kernel that was identified through a syzbot bug report. It stems from mistakes in the compatibility implementation of ioctl, which can result in uninitialized kernel stack data being used as input for driver ioctl handlers. Although the reported bug has been fixed, there is a risk that similar issues could exist or be introduced in the future. The potential impact is relatively low, as drivers are expected to validate user input; however, it could still lead to information leaks, compromising system security.

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 precautionary measure, always clear the entire ioctl buffer before invoking conversion handler functions that initialize them. This can be done in the driver code as follows:

memset(ioctl_buffer, 0, sizeof(ioctl_buffer));

This ensures that no uninitialized data is passed to the ioctl handlers.

Conclusion

CVE-2021-47339 is a significant vulnerability in the Linux kernel that can lead to the exposure of sensitive data due to improper handling of ioctl input. It is crucial for users to update their systems to the latest kernel versions and implement best practices in driver development to prevent similar issues. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

CVE-2021-47339 is a vulnerability in the Linux kernel that can lead to the exposure of uninitialized kernel stack data through improper handling of ioctl input data.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

The potential impacts include information leaks, which could compromise system security, although the overall risk is considered low.

To fix this vulnerability, update your Linux kernel to version 5.14.6-1 or later using the appropriate package management commands for your system.

If immediate updates are not possible, ensure that you clear the ioctl buffer in your driver code to mitigate the risk of uninitialized data exposure.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

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