{"id":"CVE-2021-47119","state":"PUBLISHED","title":"ext4: fix memory leak in ext4_fill_super","description":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix memory leak in ext4_fill_super\n\nBuffer head references must be released before calling kill_bdev();\notherwise the buffer head (and its page referenced by b_data) will not\nbe freed by kill_bdev, and subsequently that bh will be leaked.\n\nIf blocksizes differ, sb_set_blocksize() will kill current buffers and\npage cache by using kill_bdev(). And then super block will be reread\nagain but using correct blocksize this time. sb_set_blocksize() didn't\nfully free superblock page and buffer head, and being busy, they were\nnot freed and instead leaked.\n\nThis can easily be reproduced by calling an infinite loop of:\n\n  systemctl start <ext4_on_lvm>.mount, and\n  systemctl stop <ext4_on_lvm>.mount\n\n... since systemd creates a cgroup for each slice which it mounts, and\nthe bh leak get amplified by a dying memory cgroup that also never\ngets freed, and memory consumption is much more easily noticed.","publishedAt":"2024-03-15T20:14:25.901Z","updatedAt":"2026-05-11T13:48:25.026Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","status":"affected","lessThan":"01d349a481f0591230300a9171330136f9159bcd","versionType":"git"},{"version":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","status":"affected","lessThan":"1385b23396d511d5233b8b921ac3058b3f86a5e1","versionType":"git"},{"version":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","status":"affected","lessThan":"afd09b617db3786b6ef3dc43e28fe728cfea84df","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ext4/super.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.19","versionType":"semver"},{"version":"5.10.43","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.12.10","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ext4/super.c"]}],"references":["https://git.kernel.org/stable/c/01d349a481f0591230300a9171330136f9159bcd","https://git.kernel.org/stable/c/1385b23396d511d5233b8b921ac3058b3f86a5e1","https://git.kernel.org/stable/c/afd09b617db3786b6ef3dc43e28fe728cfea84df"],"weaknesses":[],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47119.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47119","state":"PUBLISHED","datePublished":"2024-03-15T20:14:25.901Z","dateUpdated":"2026-05-11T13:48:25.026Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-03-04T18:12:48.838Z"},"containers":{"cna":{"title":"ext4: fix memory leak in ext4_fill_super","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix memory leak in ext4_fill_super\n\nBuffer head references must be released before calling kill_bdev();\notherwise the buffer head (and its page referenced by b_data) will not\nbe freed by kill_bdev, and subsequently that bh will be leaked.\n\nIf blocksizes differ, sb_set_blocksize() will kill current buffers and\npage cache by using kill_bdev(). And then super block will be reread\nagain but using correct blocksize this time. sb_set_blocksize() didn't\nfully free superblock page and buffer head, and being busy, they were\nnot freed and instead leaked.\n\nThis can easily be reproduced by calling an infinite loop of:\n\n  systemctl start <ext4_on_lvm>.mount, and\n  systemctl stop <ext4_on_lvm>.mount\n\n... since systemd creates a cgroup for each slice which it mounts, and\nthe bh leak get amplified by a dying memory cgroup that also never\ngets freed, and memory consumption is much more easily noticed."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","status":"affected","lessThan":"01d349a481f0591230300a9171330136f9159bcd","versionType":"git"},{"version":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","status":"affected","lessThan":"1385b23396d511d5233b8b921ac3058b3f86a5e1","versionType":"git"},{"version":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","status":"affected","lessThan":"afd09b617db3786b6ef3dc43e28fe728cfea84df","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ext4/super.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.19","versionType":"semver"},{"version":"5.10.43","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.12.10","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ext4/super.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/01d349a481f0591230300a9171330136f9159bcd"},{"url":"https://git.kernel.org/stable/c/1385b23396d511d5233b8b921ac3058b3f86a5e1"},{"url":"https://git.kernel.org/stable/c/afd09b617db3786b6ef3dc43e28fe728cfea84df"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T13:48:25.026Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.19","versionEndExcluding":"5.10.43"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.19","versionEndExcluding":"5.12.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.19","versionEndExcluding":"5.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-07-23T13:37:32.763549Z","id":"CVE-2021-47119","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-07-23T13:37:45.432Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/01d349a481f0591230300a9171330136f9159bcd","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1385b23396d511d5233b8b921ac3058b3f86a5e1","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/afd09b617db3786b6ef3dc43e28fe728cfea84df","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:24:39.956Z"}}]}}}