# CVE-2021-47119: ext4: fix memory leak in ext4\_fill\_super

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.25% (percentile 10, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2024-03-15T20:14:25.901Z
- **Modified:** 2026-06-17T04:16:32.600Z

## Who should check

- Anyone running Linux \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< 01d349a481f0591230300a9171330136f9159bcd; \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< 1385b23396d511d5233b8b921ac3058b3f86a5e1; \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< afd09b617db3786b6ef3dc43e28fe728cfea84df
- Anyone running Linux 2.6.19

## Description

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

ext4: fix memory leak in ext4\_fill\_super

Buffer head references must be released before calling kill\_bdev();
otherwise the buffer head (and its page referenced by b\_data) will not
be freed by kill\_bdev, and subsequently that bh will be leaked.

If blocksizes differ, sb\_set\_blocksize() will kill current buffers and
page cache by using kill\_bdev(). And then super block will be reread
again but using correct blocksize this time. sb\_set\_blocksize() didn't
fully free superblock page and buffer head, and being busy, they were
not freed and instead leaked.

This can easily be reproduced by calling an infinite loop of:

  systemctl start \<ext4\_on\_lvm\>.mount, and
  systemctl stop \<ext4\_on\_lvm\>.mount

... since systemd creates a cgroup for each slice which it mounts, and
the bh leak get amplified by a dying memory cgroup that also never
gets freed, and memory consumption is much more easily noticed.

## Affected and fixed versions

- Linux: \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< 01d349a481f0591230300a9171330136f9159bcd; \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< 1385b23396d511d5233b8b921ac3058b3f86a5e1; \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< afd09b617db3786b6ef3dc43e28fe728cfea84df (cvelist)
- Linux: 2.6.19 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47119. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47119.md
Affected: Linux >= ac27a0ec112a089f1a5102bc8dffc79c8c815571, < 01d349a481f0591230300a9171330136f9159bcd; >= ac27a0ec112a089f1a5102bc8dffc79c8c815571, < 1385b23396d511d5233b8b921ac3058b3f86a5e1; >= ac27a0ec112a089f1a5102bc8dffc79c8c815571, < afd09b617db3786b6ef3dc43e28fe728cfea84df; Linux 2.6.19
Fixed in: Linux 01d349a481f0591230300a9171330136f9159bcd, Linux 1385b23396d511d5233b8b921ac3058b3f86a5e1

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47119 being exploited?

There is no confirmed exploitation: CVE-2021-47119 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47119?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47119?

Linux \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< 01d349a481f0591230300a9171330136f9159bcd; \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< 1385b23396d511d5233b8b921ac3058b3f86a5e1; \>= ac27a0ec112a089f1a5102bc8dffc79c8c815571, \< afd09b617db3786b6ef3dc43e28fe728cfea84df; Linux 2.6.19.

### Is there a fix for CVE-2021-47119?

Yes. Fixed in Linux 01d349a481f0591230300a9171330136f9159bcd, Linux 1385b23396d511d5233b8b921ac3058b3f86a5e1. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-47119?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/01d349a481f0591230300a9171330136f9159bcd>
- patch: <https://git.kernel.org/stable/c/1385b23396d511d5233b8b921ac3058b3f86a5e1>
- patch: <https://git.kernel.org/stable/c/afd09b617db3786b6ef3dc43e28fe728cfea84df>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47119>

HTML: <https://flawdb.com/CVE-2021-47119> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47119>
