---
id: CVE-2021-47055
title: |-
  In the Linux kernel, the following vulnerability has been resolved:

  mtd: require write permissions for locking and badblock ioctls

  MEMLOCK, MEMUNLOCK and OTPLOCK modify protection bits
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  mtd: require write permissions for locking and badblock ioctls

  MEMLOCK, MEMUNLOCK and OTPLOCK modify protection bits. Thus require
  write permission. Depending on the h…
severity: high
cvss: 7.1
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'
cwe:
  - CWE-667
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 4.4.233, < 4.4.269'
  - 'linux_kernel >= 4.9.233, < 4.9.269'
  - 'linux_kernel >= 4.14.194, < 4.14.233'
  - 'linux_kernel >= 4.19.139, < 4.19.191'
  - 'linux_kernel >= 5.4.58, < 5.4.119'
  - 'linux_kernel >= 5.9, < 5.10.37'
  - 'linux_kernel >= 5.11, < 5.11.21'
  - 'linux_kernel >= 5.12, < 5.12.4'
patched:
  - linux_kernel 5.12.4
published: '2024-02-29'
updated: '2026-08-04'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2021-47055'
references:
  - url: 'https://git.kernel.org/stable/c/077259f5e777c3c8821f6b41dee709fcda27306b'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/1e97743fd180981bef5f01402342bb54bf1c6366'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/5880afefe0cb9b2d5e801816acd58bfe91a96981'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/75ed985bd6c8ac1d4e673e93ea9d96c9908c1d37'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/7b6552719c0ccbbea29dde4be141da54fdb5877e'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/9625b00cac6630479c0ff4b9fafa88bee636e1f0'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/a08799d3e8c8088640956237c183f83463c39668'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/f4d28d8b9b0e7c4ae04214b8d7e0b0466ec6bcaf'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/f73b29819c6314c0ba8b7d5892dfb03487424bee'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/077259f5e777c3c8821f6b41dee709fcda27306b'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/1e97743fd180981bef5f01402342bb54bf1c6366'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/5880afefe0cb9b2d5e801816acd58bfe91a96981'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/75ed985bd6c8ac1d4e673e93ea9d96c9908c1d37'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/7b6552719c0ccbbea29dde4be141da54fdb5877e'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/9625b00cac6630479c0ff4b9fafa88bee636e1f0'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/a08799d3e8c8088640956237c183f83463c39668'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/f4d28d8b9b0e7c4ae04214b8d7e0b0466ec6bcaf'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://git.kernel.org/stable/c/f73b29819c6314c0ba8b7d5892dfb03487424bee'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00197
epssPercentile: 0.08349
ingestedAt: '2026-08-04T10:39:39.745Z'
---

## Overview

In the Linux kernel, the following vulnerability has been resolved:

mtd: require write permissions for locking and badblock ioctls

MEMLOCK, MEMUNLOCK and OTPLOCK modify protection bits. Thus require
write permission. Depending on the hardware MEMLOCK might even be
write-once, e.g. for SPI-NOR flashes with their WP# tied to GND. OTPLOCK
is always write-once.

MEMSETBADBLOCK modifies the bad block table.

## Affected

- `linux_kernel >= 4.4.233, < 4.4.269`
- `linux_kernel >= 4.9.233, < 4.9.269`
- `linux_kernel >= 4.14.194, < 4.14.233`
- `linux_kernel >= 4.19.139, < 4.19.191`
- `linux_kernel >= 5.4.58, < 5.4.119`
- `linux_kernel >= 5.9, < 5.10.37`
- `linux_kernel >= 5.11, < 5.11.21`
- `linux_kernel >= 5.12, < 5.12.4`

## Remediation

Upgrade past the affected range:

- `linux_kernel 5.12.4`
