{"id":"CVE-2021-47119","aliases":["CVE-2021-47119"],"related":[],"kind":"vulnerability","state":"published","title":"ext4: fix memory leak in ext4_fill_super","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ext4: corrige la pérdida de memoria en ext4_fill_super Las referencias del encabezado del búfer deben liberarse antes de llamar a kill_bdev(); de lo contrario, kill_bdev no liberará el encabezado del búfer (y su página a la que hace referencia b_data) y, posteriormente, se filtrará ese bh. Si los tamaños de los bloques difieren, sb_set_blocksize() eliminará los búferes actuales y el caché de la página usando kill_bdev(). Y luego el superbloque se volverá a leer, pero esta vez utilizando el tamaño de bloque correcto. sb_set_blocksize() no liberó completamente la página del superbloque y el encabezado del búfer y, al estar ocupados, no se liberaron y en su lugar se filtraron. Esto se puede reproducir fácilmente llamando a un bucle infinito de: systemctl start .mount, y systemctl stop .mount... ya que systemd crea un cgroup para cada segmento que monta, y la fuga de bh se amplifica con un grupo de memoria moribundo que tampoco se libera nunca, y el consumo de memoria se nota mucho más fácilmente.","source":"nvd"}],"published":"2024-03-15T20:14:25.901Z","modified":"2026-06-17T04:16:32.600Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-401"],"affected":[{"ranges":[{"type":"git","introduced":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","fixed":"01d349a481f0591230300a9171330136f9159bcd","status":"affected"},{"type":"git","introduced":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","fixed":"1385b23396d511d5233b8b921ac3058b3f86a5e1","status":"affected"},{"type":"git","introduced":"ac27a0ec112a089f1a5102bc8dffc79c8c815571","fixed":"afd09b617db3786b6ef3dc43e28fe728cfea84df","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.19","status":"unaffected"},{"type":"semver","introduced":"5.10.43","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.12.10","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.19","fixed":"5.10.43"},{"status":"affected","introduced":"5.11","fixed":"5.12.10"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/01d349a481f0591230300a9171330136f9159bcd","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1385b23396d511d5233b8b921ac3058b3f86a5e1","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/afd09b617db3786b6ef3dc43e28fe728cfea84df","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-23T13:37:32.763Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47119","url":"https://www.cve.org/CVERecord?id=CVE-2021-47119","licence":"CVE Terms of Use","modified":"2026-05-11T13:48:25.026Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47119","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47119","licence":"Public domain","modified":"2026-06-17T04:16:32.600Z"}],"updatedAt":"2026-11-25T22:58:08.670Z","epss":{"score":0.00252,"percentile":0.17766,"date":"2026-12-01T12:00:22.000Z"}}