cve-2024-47736
Vulnerability from cvelistv5
Published
2024-10-21 12:14
Modified
2025-01-17 13:26
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: erofs: handle overlapped pclusters out of crafted images properly syzbot reported a task hang issue due to a deadlock case where it is waiting for the folio lock of a cached folio that will be used for cache I/Os. After looking into the crafted fuzzed image, I found it's formed with several overlapped big pclusters as below: Ext: logical offset | length : physical offset | length 0: 0.. 16384 | 16384 : 151552.. 167936 | 16384 1: 16384.. 32768 | 16384 : 155648.. 172032 | 16384 2: 32768.. 49152 | 16384 : 537223168.. 537239552 | 16384 ... Here, extent 0/1 are physically overlapped although it's entirely _impossible_ for normal filesystem images generated by mkfs. First, managed folios containing compressed data will be marked as up-to-date and then unlocked immediately (unlike in-place folios) when compressed I/Os are complete. If physical blocks are not submitted in the incremental order, there should be separate BIOs to avoid dependency issues. However, the current code mis-arranges z_erofs_fill_bio_vec() and BIO submission which causes unexpected BIO waits. Second, managed folios will be connected to their own pclusters for efficient inter-queries. However, this is somewhat hard to implement easily if overlapped big pclusters exist. Again, these only appear in fuzzed images so let's simply fall back to temporary short-lived pages for correctness. Additionally, it justifies that referenced managed folios cannot be truncated for now and reverts part of commit 2080ca1ed3e4 ("erofs: tidy up `struct z_erofs_bvec`") for simplicity although it shouldn't be any difference.
Impacted products
Vendor Product Version
Linux Linux Version: 8e6c8fa9f2e95c88a642521a5da19a8e31748846
Version: 8e6c8fa9f2e95c88a642521a5da19a8e31748846
Version: 8e6c8fa9f2e95c88a642521a5da19a8e31748846
Version: 8e6c8fa9f2e95c88a642521a5da19a8e31748846
Create a notification for this product.
   Linux Linux Version: 5.13
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-47736",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-10-21T12:59:50.164921Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-10-21T13:04:15.151Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/erofs/zdata.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "1bf7e414cac303c9aec1be67872e19be8b64980c",
              "status": "affected",
              "version": "8e6c8fa9f2e95c88a642521a5da19a8e31748846",
              "versionType": "git"
            },
            {
              "lessThan": "b9b30af0e86ffb485301ecd83b9129c9dfb7ebf8",
              "status": "affected",
              "version": "8e6c8fa9f2e95c88a642521a5da19a8e31748846",
              "versionType": "git"
            },
            {
              "lessThan": "9cfa199bcbbbba31cbf97b2786f44f4464f3f29a",
              "status": "affected",
              "version": "8e6c8fa9f2e95c88a642521a5da19a8e31748846",
              "versionType": "git"
            },
            {
              "lessThan": "9e2f9d34dd12e6e5b244ec488bcebd0c2d566c50",
              "status": "affected",
              "version": "8e6c8fa9f2e95c88a642521a5da19a8e31748846",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/erofs/zdata.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.13"
            },
            {
              "lessThan": "5.13",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.72",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.13",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.12",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: handle overlapped pclusters out of crafted images properly\n\nsyzbot reported a task hang issue due to a deadlock case where it is\nwaiting for the folio lock of a cached folio that will be used for\ncache I/Os.\n\nAfter looking into the crafted fuzzed image, I found it\u0027s formed with\nseveral overlapped big pclusters as below:\n\n Ext:   logical offset   |  length :     physical offset    |  length\n   0:        0..   16384 |   16384 :     151552..    167936 |   16384\n   1:    16384..   32768 |   16384 :     155648..    172032 |   16384\n   2:    32768..   49152 |   16384 :  537223168.. 537239552 |   16384\n...\n\nHere, extent 0/1 are physically overlapped although it\u0027s entirely\n_impossible_ for normal filesystem images generated by mkfs.\n\nFirst, managed folios containing compressed data will be marked as\nup-to-date and then unlocked immediately (unlike in-place folios) when\ncompressed I/Os are complete.  If physical blocks are not submitted in\nthe incremental order, there should be separate BIOs to avoid dependency\nissues.  However, the current code mis-arranges z_erofs_fill_bio_vec()\nand BIO submission which causes unexpected BIO waits.\n\nSecond, managed folios will be connected to their own pclusters for\nefficient inter-queries.  However, this is somewhat hard to implement\neasily if overlapped big pclusters exist.  Again, these only appear in\nfuzzed images so let\u0027s simply fall back to temporary short-lived pages\nfor correctness.\n\nAdditionally, it justifies that referenced managed folios cannot be\ntruncated for now and reverts part of commit 2080ca1ed3e4 (\"erofs: tidy\nup `struct z_erofs_bvec`\") for simplicity although it shouldn\u0027t be any\ndifference."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-01-17T13:26:59.000Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/1bf7e414cac303c9aec1be67872e19be8b64980c"
        },
        {
          "url": "https://git.kernel.org/stable/c/b9b30af0e86ffb485301ecd83b9129c9dfb7ebf8"
        },
        {
          "url": "https://git.kernel.org/stable/c/9cfa199bcbbbba31cbf97b2786f44f4464f3f29a"
        },
        {
          "url": "https://git.kernel.org/stable/c/9e2f9d34dd12e6e5b244ec488bcebd0c2d566c50"
        }
      ],
      "title": "erofs: handle overlapped pclusters out of crafted images properly",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-47736",
    "datePublished": "2024-10-21T12:14:06.530Z",
    "dateReserved": "2024-09-30T16:00:12.958Z",
    "dateUpdated": "2025-01-17T13:26:59.000Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-47736\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-10-21T13:15:03.737\",\"lastModified\":\"2025-01-17T14:15:31.577\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nerofs: handle overlapped pclusters out of crafted images properly\\n\\nsyzbot reported a task hang issue due to a deadlock case where it is\\nwaiting for the folio lock of a cached folio that will be used for\\ncache I/Os.\\n\\nAfter looking into the crafted fuzzed image, I found it\u0027s formed with\\nseveral overlapped big pclusters as below:\\n\\n Ext:   logical offset   |  length :     physical offset    |  length\\n   0:        0..   16384 |   16384 :     151552..    167936 |   16384\\n   1:    16384..   32768 |   16384 :     155648..    172032 |   16384\\n   2:    32768..   49152 |   16384 :  537223168.. 537239552 |   16384\\n...\\n\\nHere, extent 0/1 are physically overlapped although it\u0027s entirely\\n_impossible_ for normal filesystem images generated by mkfs.\\n\\nFirst, managed folios containing compressed data will be marked as\\nup-to-date and then unlocked immediately (unlike in-place folios) when\\ncompressed I/Os are complete.  If physical blocks are not submitted in\\nthe incremental order, there should be separate BIOs to avoid dependency\\nissues.  However, the current code mis-arranges z_erofs_fill_bio_vec()\\nand BIO submission which causes unexpected BIO waits.\\n\\nSecond, managed folios will be connected to their own pclusters for\\nefficient inter-queries.  However, this is somewhat hard to implement\\neasily if overlapped big pclusters exist.  Again, these only appear in\\nfuzzed images so let\u0027s simply fall back to temporary short-lived pages\\nfor correctness.\\n\\nAdditionally, it justifies that referenced managed folios cannot be\\ntruncated for now and reverts part of commit 2080ca1ed3e4 (\\\"erofs: tidy\\nup `struct z_erofs_bvec`\\\") for simplicity although it shouldn\u0027t be any\\ndifference.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: erofs: manejar pclusters superpuestos fuera de im\u00e1genes manipuladas correctamente syzbot inform\u00f3 un problema de bloqueo de tareas debido a un caso de interbloqueo donde est\u00e1 esperando el bloqueo de folio de un folio en cach\u00e9 que se usar\u00e1 para E/S de cach\u00e9. Despu\u00e9s de mirar la imagen difusa creada, encontr\u00e9 que est\u00e1 formada con varios pclusters grandes superpuestos como se muestra a continuaci\u00f3n: Ext: desplazamiento l\u00f3gico | longitud: desplazamiento f\u00edsico | longitud 0: 0.. 16384 | 16384: 151552.. 167936 | 16384 1: 16384.. 32768 | 16384: 155648.. 172032 | 16384 2: 32768.. 49152 | 16384 : 537223168.. 537239552 | 16384 ... Aqu\u00ed, las extensiones 0/1 est\u00e1n f\u00edsicamente superpuestas, aunque es completamente _impossible_ para las im\u00e1genes de sistemas de archivos normales generadas por mkfs. Primero, los folios administrados que contienen datos comprimidos se marcar\u00e1n como actualizados y luego se desbloquear\u00e1n inmediatamente (a diferencia de los folios locales) cuando se completen las E/S comprimidas. Si los bloques f\u00edsicos no se env\u00edan en el orden incremental, debe haber BIO separados para evitar problemas de dependencia. Sin embargo, el c\u00f3digo actual organiza mal z_erofs_fill_bio_vec() y el env\u00edo de BIO, lo que causa esperas inesperadas de BIO. En segundo lugar, los folios administrados se conectar\u00e1n a sus propios pclusters para realizar consultas entre consultas eficientes. Sin embargo, esto es algo dif\u00edcil de implementar f\u00e1cilmente si existen pclusters grandes superpuestos. Nuevamente, estos solo aparecen en im\u00e1genes difusas, por lo que simplemente retrocedamos a p\u00e1ginas temporales de corta duraci\u00f3n para que sean correctas. Adem\u00e1s, justifica que los folios administrados referenciados no se pueden truncar por ahora y revierte parte de el commit 2080ca1ed3e4 (\\\"erofs: ordenar `struct z_erofs_bvec`\\\") para simplificar, aunque no deber\u00eda haber ninguna diferencia.\"}],\"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-667\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.13\",\"versionEndExcluding\":\"6.10.13\",\"matchCriteriaId\":\"0FF7E6C3-354F-4036-93CB-2EE747BC3E8B\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.11\",\"versionEndExcluding\":\"6.11.2\",\"matchCriteriaId\":\"AB755D26-97F4-43B6-8604-CD076811E181\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1bf7e414cac303c9aec1be67872e19be8b64980c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9cfa199bcbbbba31cbf97b2786f44f4464f3f29a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9e2f9d34dd12e6e5b244ec488bcebd0c2d566c50\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/b9b30af0e86ffb485301ecd83b9129c9dfb7ebf8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-47736\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-10-21T12:59:50.164921Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-10-21T12:59:53.421Z\"}}], \"cna\": {\"title\": \"erofs: handle overlapped pclusters out of crafted images properly\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"8e6c8fa9f2e95c88a642521a5da19a8e31748846\", \"lessThan\": \"1bf7e414cac303c9aec1be67872e19be8b64980c\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"8e6c8fa9f2e95c88a642521a5da19a8e31748846\", \"lessThan\": \"b9b30af0e86ffb485301ecd83b9129c9dfb7ebf8\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"8e6c8fa9f2e95c88a642521a5da19a8e31748846\", \"lessThan\": \"9cfa199bcbbbba31cbf97b2786f44f4464f3f29a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"8e6c8fa9f2e95c88a642521a5da19a8e31748846\", \"lessThan\": \"9e2f9d34dd12e6e5b244ec488bcebd0c2d566c50\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/erofs/zdata.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.13\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.13\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.6.72\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10.13\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.10.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11.2\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.11.*\"}, {\"status\": \"unaffected\", \"version\": \"6.12\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/erofs/zdata.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/1bf7e414cac303c9aec1be67872e19be8b64980c\"}, {\"url\": \"https://git.kernel.org/stable/c/b9b30af0e86ffb485301ecd83b9129c9dfb7ebf8\"}, {\"url\": \"https://git.kernel.org/stable/c/9cfa199bcbbbba31cbf97b2786f44f4464f3f29a\"}, {\"url\": \"https://git.kernel.org/stable/c/9e2f9d34dd12e6e5b244ec488bcebd0c2d566c50\"}], \"x_generator\": {\"engine\": \"bippy-5f407fcff5a0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nerofs: handle overlapped pclusters out of crafted images properly\\n\\nsyzbot reported a task hang issue due to a deadlock case where it is\\nwaiting for the folio lock of a cached folio that will be used for\\ncache I/Os.\\n\\nAfter looking into the crafted fuzzed image, I found it\u0027s formed with\\nseveral overlapped big pclusters as below:\\n\\n Ext:   logical offset   |  length :     physical offset    |  length\\n   0:        0..   16384 |   16384 :     151552..    167936 |   16384\\n   1:    16384..   32768 |   16384 :     155648..    172032 |   16384\\n   2:    32768..   49152 |   16384 :  537223168.. 537239552 |   16384\\n...\\n\\nHere, extent 0/1 are physically overlapped although it\u0027s entirely\\n_impossible_ for normal filesystem images generated by mkfs.\\n\\nFirst, managed folios containing compressed data will be marked as\\nup-to-date and then unlocked immediately (unlike in-place folios) when\\ncompressed I/Os are complete.  If physical blocks are not submitted in\\nthe incremental order, there should be separate BIOs to avoid dependency\\nissues.  However, the current code mis-arranges z_erofs_fill_bio_vec()\\nand BIO submission which causes unexpected BIO waits.\\n\\nSecond, managed folios will be connected to their own pclusters for\\nefficient inter-queries.  However, this is somewhat hard to implement\\neasily if overlapped big pclusters exist.  Again, these only appear in\\nfuzzed images so let\u0027s simply fall back to temporary short-lived pages\\nfor correctness.\\n\\nAdditionally, it justifies that referenced managed folios cannot be\\ntruncated for now and reverts part of commit 2080ca1ed3e4 (\\\"erofs: tidy\\nup `struct z_erofs_bvec`\\\") for simplicity although it shouldn\u0027t be any\\ndifference.\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-01-17T13:26:59.000Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-47736\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-01-17T13:26:59.000Z\", \"dateReserved\": \"2024-09-30T16:00:12.958Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-10-21T12:14:06.530Z\", \"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.