cve-2023-52792
Vulnerability from cvelistv5
Published
2024-05-21 15:31
Modified
2024-11-04 14:52
Severity ?
Summary
cxl/region: Do not try to cleanup after cxl_region_setup_targets() fails
Impacted products
Vendor Product Version
Linux Linux Version: 6.0
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-52792",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-06-11T15:19:10.363547Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-11T15:19:25.796Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T23:11:35.979Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/90db4c1d5ebaf574d3c3065c055977982c378a83"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/9090c5537c93cd0811ab7bfbd925b57addfffb60"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/07ffcd8ec79cf7383e1e45815f4842fd357991c2"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0718588c7aaa7a1510b4de972370535b61dddd0d"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/cxl/core/region.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "90db4c1d5eba",
              "status": "affected",
              "version": "5e42bcbc3fef",
              "versionType": "git"
            },
            {
              "lessThan": "9090c5537c93",
              "status": "affected",
              "version": "5e42bcbc3fef",
              "versionType": "git"
            },
            {
              "lessThan": "07ffcd8ec79c",
              "status": "affected",
              "version": "5e42bcbc3fef",
              "versionType": "git"
            },
            {
              "lessThan": "0718588c7aaa",
              "status": "affected",
              "version": "5e42bcbc3fef",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/cxl/core/region.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.0"
            },
            {
              "lessThan": "6.0",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.64",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.5.*",
              "status": "unaffected",
              "version": "6.5.13",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.7",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncxl/region: Do not try to cleanup after cxl_region_setup_targets() fails\n\nCommit 5e42bcbc3fef (\"cxl/region: decrement -\u003enr_targets on error in\ncxl_region_attach()\") tried to avoid \u0027eiw\u0027 initialization errors when\n-\u003enr_targets exceeded 16, by just decrementing -\u003enr_targets when\ncxl_region_setup_targets() failed.\n\nCommit 86987c766276 (\"cxl/region: Cleanup target list on attach error\")\nextended that cleanup to also clear cxled-\u003epos and p-\u003etargets[pos]. The\ninitialization error was incidentally fixed separately by:\nCommit 8d4285425714 (\"cxl/region: Fix port setup uninitialized variable\nwarnings\") which was merged a few days after 5e42bcbc3fef.\n\nBut now the original cleanup when cxl_region_setup_targets() fails\nprevents endpoint and switch decoder resources from being reused:\n\n1) the cleanup does not set the decoder\u0027s region to NULL, which results\n   in future dpa_size_store() calls returning -EBUSY\n2) the decoder is not properly freed, which results in future commit\n   errors associated with the upstream switch\n\nNow that the initialization errors were fixed separately, the proper\ncleanup for this case is to just return immediately. Then the resources\nassociated with this target get cleanup up as normal when the failed\nregion is deleted.\n\nThe -\u003enr_targets decrement in the error case also helped prevent\na p-\u003etargets[] array overflow, so add a new check to prevent against\nthat overflow.\n\nTested by trying to create an invalid region for a 2 switch * 2 endpoint\ntopology, and then following up with creating a valid region."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-04T14:52:50.117Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/90db4c1d5ebaf574d3c3065c055977982c378a83"
        },
        {
          "url": "https://git.kernel.org/stable/c/9090c5537c93cd0811ab7bfbd925b57addfffb60"
        },
        {
          "url": "https://git.kernel.org/stable/c/07ffcd8ec79cf7383e1e45815f4842fd357991c2"
        },
        {
          "url": "https://git.kernel.org/stable/c/0718588c7aaa7a1510b4de972370535b61dddd0d"
        }
      ],
      "title": "cxl/region: Do not try to cleanup after cxl_region_setup_targets() fails",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-52792",
    "datePublished": "2024-05-21T15:31:07.633Z",
    "dateReserved": "2024-05-21T15:19:24.241Z",
    "dateUpdated": "2024-11-04T14:52:50.117Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-52792\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-21T16:15:17.857\",\"lastModified\":\"2024-11-21T08:40:35.870\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncxl/region: Do not try to cleanup after cxl_region_setup_targets() fails\\n\\nCommit 5e42bcbc3fef (\\\"cxl/region: decrement -\u003enr_targets on error in\\ncxl_region_attach()\\\") tried to avoid \u0027eiw\u0027 initialization errors when\\n-\u003enr_targets exceeded 16, by just decrementing -\u003enr_targets when\\ncxl_region_setup_targets() failed.\\n\\nCommit 86987c766276 (\\\"cxl/region: Cleanup target list on attach error\\\")\\nextended that cleanup to also clear cxled-\u003epos and p-\u003etargets[pos]. The\\ninitialization error was incidentally fixed separately by:\\nCommit 8d4285425714 (\\\"cxl/region: Fix port setup uninitialized variable\\nwarnings\\\") which was merged a few days after 5e42bcbc3fef.\\n\\nBut now the original cleanup when cxl_region_setup_targets() fails\\nprevents endpoint and switch decoder resources from being reused:\\n\\n1) the cleanup does not set the decoder\u0027s region to NULL, which results\\n   in future dpa_size_store() calls returning -EBUSY\\n2) the decoder is not properly freed, which results in future commit\\n   errors associated with the upstream switch\\n\\nNow that the initialization errors were fixed separately, the proper\\ncleanup for this case is to just return immediately. Then the resources\\nassociated with this target get cleanup up as normal when the failed\\nregion is deleted.\\n\\nThe -\u003enr_targets decrement in the error case also helped prevent\\na p-\u003etargets[] array overflow, so add a new check to prevent against\\nthat overflow.\\n\\nTested by trying to create an invalid region for a 2 switch * 2 endpoint\\ntopology, and then following up with creating a valid region.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: cxl/region: no intente realizar la limpieza despu\u00e9s de que cxl_region_setup_targets() falle. Confirme 5e42bcbc3fef (\\\"cxl/region: decrement -\u0026gt;nr_targets on error in cxl_region_attach()\\\") intent\u00f3 evitar \u0027 Los mismos errores de inicializaci\u00f3n cuando -\u0026gt;nr_targets excedieron 16, simplemente disminuyendo -\u0026gt;nr_targets cuando cxl_region_setup_targets() fall\u00f3. La confirmaci\u00f3n 86987c766276 (\\\"cxl/region: Limpiar lista de objetivos al adjuntar error\\\") extendi\u00f3 esa limpieza para borrar tambi\u00e9n cxled-\u0026gt;pos y p-\u0026gt;targets[pos]. El error de inicializaci\u00f3n se solucion\u00f3 por separado mediante: Commit 8d4285425714 (\\\"cxl/region: Reparar advertencias de variables no inicializadas de configuraci\u00f3n de puerto\\\") que se fusion\u00f3 unos d\u00edas despu\u00e9s de 5e42bcbc3fef. Pero ahora la limpieza original cuando falla cxl_region_setup_targets() impide que se reutilicen los recursos del decodificador de conmutador y punto final: 1) la limpieza no establece la regi\u00f3n del decodificador en NULL, lo que da como resultado que futuras llamadas a dpa_size_store() devuelvan -EBUSY 2) el decodificador no liberado correctamente, lo que resulta en futuros errores de confirmaci\u00f3n asociados con el conmutador ascendente. Ahora que los errores de inicializaci\u00f3n se solucionaron por separado, la limpieza adecuada para este caso es simplemente regresar inmediatamente. Luego, los recursos asociados con este objetivo se limpian normalmente cuando se elimina la regi\u00f3n fallida. La disminuci\u00f3n de -\u0026gt;nr_targets en el caso de error tambi\u00e9n ayud\u00f3 a evitar un desbordamiento de la matriz p-\u0026gt;targets[], as\u00ed que agregue una nueva verificaci\u00f3n para evitar ese desbordamiento. Probado intentando crear una regi\u00f3n no v\u00e1lida para una topolog\u00eda de 2 conmutadores * 2 puntos finales y luego creando una regi\u00f3n v\u00e1lida.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0718588c7aaa7a1510b4de972370535b61dddd0d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/07ffcd8ec79cf7383e1e45815f4842fd357991c2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9090c5537c93cd0811ab7bfbd925b57addfffb60\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/90db4c1d5ebaf574d3c3065c055977982c378a83\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/0718588c7aaa7a1510b4de972370535b61dddd0d\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/07ffcd8ec79cf7383e1e45815f4842fd357991c2\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/9090c5537c93cd0811ab7bfbd925b57addfffb60\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/90db4c1d5ebaf574d3c3065c055977982c378a83\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}"
  }
}


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.