mtd: Require Write Permissions for Locking and Badblock IOCTLs

Kernel Updated 02 Oct 2025

Summary

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

UVI-2021-1000290: mtd: require write permissions for locking and badblock ioctls. Affects Kernel versions >= f7e6b19bc76471ba03725fe58e0c218a3d6266c3, < a08799d3e8c8088640956237c183f83463c39668. 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 Kernel package is a fundamental component of the Linux operating system. It provides the core functionality and interfaces for various hardware devices, including memory technology devices (MTD). MTD is a subsystem that manages flash memory devices, such as NAND and NOR flash chips. It allows the kernel to interact with these devices and perform operations like reading, writing, erasing, and locking.

However, a vulnerability has been discovered in the MTD subsystem that allows unauthorized users to perform locking and badblock operations without requiring write permissions. This vulnerability can potentially lead to unauthorized modifications, data corruption, or denial of service attacks.

Vulnerability Detail

The vulnerability in the MTD subsystem arises from the lack of write permission requirements for locking and badblock IOCTLs (input/output control). These IOCTLs are used to control the behavior of MTD devices. By not enforcing write permissions, any user, including unprivileged ones, can invoke these IOCTLs and perform locking and badblock operations.

The impact of this vulnerability can be significant. Unauthorized locking of MTD devices can prevent legitimate users from accessing or modifying the flash memory. This can disrupt normal system operations and potentially lead to denial of service. Additionally, unauthorized badblock operations can corrupt data stored in the flash memory, leading to data loss or system instability.

The vulnerability was introduced in version v5.9 of the Linux Kernel and has been fixed in version v5.12.4.

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 temporary workaround, users can restrict access to the affected IOCTLs by modifying the permissions of the corresponding device files. By ensuring that only privileged users have write permissions to these files, the vulnerability can be mitigated. The specific device files and their permissions may vary depending on the system configuration. Here is an example of how to modify the permissions using the chmod command:

$ sudo chmod 600 /dev/mtdX

Replace /dev/mtdX with the appropriate device file path for your system.

Conclusion

The vulnerability in the MTD subsystem of the Linux Kernel allows unauthorized users to perform locking and badblock operations without requiring write permissions. This can lead to unauthorized modifications, data corruption, or denial of service attacks. It is recommended to update the Linux Kernel to version v5.12.4 or later to fix this vulnerability. In the meantime, users can apply a temporary workaround by modifying the permissions of the affected device files. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vulnerability allows unauthorized users to perform locking and badblock operations on MTD devices without requiring write permissions. This can lead to unauthorized modifications, data corruption, or denial of service attacks.

To fix this vulnerability, update the Linux Kernel to version v5.12.4 or later. This update enforces write permissions for locking and badblock IOCTLs in the MTD subsystem.

Yes, as a temporary workaround, you can restrict access to the affected IOCTLs by modifying the permissions of the corresponding device files. Ensure that only privileged users have write permissions to these files.

The vulnerability was introduced in version v5.9 of the Linux Kernel. Versions prior to v5.12.4 are affected.

You can obtain the updated Linux Kernel from the official Linux Kernel repository: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/

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