CVE-2021-47119
Vulnerability from cvelistv5
Published
2024-03-15 20:14
Modified
2024-12-19 07:35
Severity ?
Summary
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.
Impacted products
Vendor Product Version
Linux Linux Version: ac27a0ec112a089f1a5102bc8dffc79c8c815571
Version: ac27a0ec112a089f1a5102bc8dffc79c8c815571
Version: ac27a0ec112a089f1a5102bc8dffc79c8c815571
Create a notification for this product.
   Linux Linux Version: 2.6.19
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-47119",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-07-23T13:37:32.763549Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-07-23T13:37:45.432Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:24:39.956Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "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"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/super.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "01d349a481f0591230300a9171330136f9159bcd",
              "status": "affected",
              "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
              "versionType": "git"
            },
            {
              "lessThan": "1385b23396d511d5233b8b921ac3058b3f86a5e1",
              "status": "affected",
              "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
              "versionType": "git"
            },
            {
              "lessThan": "afd09b617db3786b6ef3dc43e28fe728cfea84df",
              "status": "affected",
              "version": "ac27a0ec112a089f1a5102bc8dffc79c8c815571",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/super.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.19"
            },
            {
              "lessThan": "2.6.19",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.43",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.12.*",
              "status": "unaffected",
              "version": "5.12.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "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\u0027t\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 \u003cext4_on_lvm\u003e.mount, and\n  systemctl stop \u003cext4_on_lvm\u003e.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."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T07:35:35.013Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
        }
      ],
      "title": "ext4: fix memory leak in ext4_fill_super",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-47119",
    "datePublished": "2024-03-15T20:14:25.901Z",
    "dateReserved": "2024-03-04T18:12:48.838Z",
    "dateUpdated": "2024-12-19T07:35:35.013Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2021-47119\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-03-15T21:15:07.013\",\"lastModified\":\"2025-01-07T17:31:16.383\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"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\u0027t\\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 \u003cext4_on_lvm\u003e.mount, and\\n  systemctl stop \u003cext4_on_lvm\u003e.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.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ext4: corrige la p\u00e9rdida de memoria en ext4_fill_super Las referencias del encabezado del b\u00fafer deben liberarse antes de llamar a kill_bdev(); de lo contrario, kill_bdev no liberar\u00e1 el encabezado del b\u00fafer (y su p\u00e1gina a la que hace referencia b_data) y, posteriormente, se filtrar\u00e1 ese bh. Si los tama\u00f1os de los bloques difieren, sb_set_blocksize() eliminar\u00e1 los b\u00faferes actuales y el cach\u00e9 de la p\u00e1gina usando kill_bdev(). Y luego el superbloque se volver\u00e1 a leer, pero esta vez utilizando el tama\u00f1o de bloque correcto. sb_set_blocksize() no liber\u00f3 completamente la p\u00e1gina del superbloque y el encabezado del b\u00fafer y, al estar ocupados, no se liberaron y en su lugar se filtraron. Esto se puede reproducir f\u00e1cilmente 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\u00e1s f\u00e1cilmente.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-401\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"2.6.19\",\"versionEndExcluding\":\"5.10.43\",\"matchCriteriaId\":\"4FE3AE47-9FE6-4BF7-A39E-A283BD97BE7B\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.12.10\",\"matchCriteriaId\":\"27384800-AB48-4C08-891E-34B66F5FC4AA\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.13:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"0CBAD0FC-C281-4666-AB2F-F8E6E1165DF7\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.13:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"96AC23B2-D46A-49D9-8203-8E1BEDCA8532\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.13:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"DA610E30-717C-4700-9F77-A3C9244F3BFD\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.13:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"1ECD33F5-85BE-430B-8F86-8D7BD560311D\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/01d349a481f0591230300a9171330136f9159bcd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/1385b23396d511d5233b8b921ac3058b3f86a5e1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/afd09b617db3786b6ef3dc43e28fe728cfea84df\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/01d349a481f0591230300a9171330136f9159bcd\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/1385b23396d511d5233b8b921ac3058b3f86a5e1\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/afd09b617db3786b6ef3dc43e28fe728cfea84df\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"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\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-04T05:24:39.956Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2021-47119\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-07-23T13:37:32.763549Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-07-23T13:37:39.919Z\"}}], \"cna\": {\"title\": \"ext4: fix memory leak in ext4_fill_super\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"ac27a0ec112a089f1a5102bc8dffc79c8c815571\", \"lessThan\": \"01d349a481f0591230300a9171330136f9159bcd\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"ac27a0ec112a089f1a5102bc8dffc79c8c815571\", \"lessThan\": \"1385b23396d511d5233b8b921ac3058b3f86a5e1\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"ac27a0ec112a089f1a5102bc8dffc79c8c815571\", \"lessThan\": \"afd09b617db3786b6ef3dc43e28fe728cfea84df\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/ext4/super.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"2.6.19\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"2.6.19\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.10.43\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.10.*\"}, {\"status\": \"unaffected\", \"version\": \"5.12.10\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.12.*\"}, {\"status\": \"unaffected\", \"version\": \"5.13\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/ext4/super.c\"], \"defaultStatus\": \"affected\"}], \"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\"}], \"x_generator\": {\"engine\": \"bippy-5f407fcff5a0\"}, \"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\u0027t\\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 \u003cext4_on_lvm\u003e.mount, and\\n  systemctl stop \u003cext4_on_lvm\u003e.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.\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-12-19T07:35:35.013Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2021-47119\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-12-19T07:35:35.013Z\", \"dateReserved\": \"2024-03-04T18:12:48.838Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-03-15T20:14:25.901Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.