CVE-2021-47342

ext4: fix possible UAF when remounting r/o a mmp-protected file system

No CVSS score yet EPSS 0.25%

Published 21 May 2024 Updated 23 May 2026 CNA: Linux

Check your servers for CVE-2021-47342

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47342 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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

ext4: fix possible UAF when remounting r/o a mmp-protected file system

After commit 618f003199c6 ("ext4: fix memory leak in ext4_fill_super"), after the file system is remounted read-only, there is a race where the kmmpd thread can exit, causing sbi->s_mmp_tsk to point at freed memory, which the call to ext4_stop_mmpd() can trip over.

Fix this by only allowing kmmpd() to exit when it is stopped via ext4_stop_mmpd().

Bug-Report-Link: <20210629143603.2166962-1-yebin10@huawei.com>

Exploitation

EPSS 0.25%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 16.8% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 28 May 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 5e4f5138bd8522ebe231a137682d3857209a2c07, before b663890d854403e566169f7e90aed5cd6ff64f6b
affected from eb7b40d9d3785f7a131fb0b1f89bb6efa46c1833, before 7ed572cdf11081f8f9e07abd4bea56a3f2c4edbd
affected from 618f003199c6188e01472b03cdbba227f1dc5f24, before 61bb4a1c417e5b95d9edb4f887f131de32e419cb
affected cecfdb9cf9a700d1037066173abac0617f6788df
affected from 5.12.18, before 5.13
Other versions: unaffected
Linux
affected from 5.10.51, before 5.10.77
Other versions: unaffected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47342 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47342

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2021-47342
trivy image --scanners vuln IMAGE | grep CVE-2021-47342

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2021-47342 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.