cve-2022-49895
Vulnerability from cvelistv5
Published
2025-05-01 14:10
Modified
2025-05-04 08:47
Severity ?
Summary
cxl/region: Fix decoder allocation crash
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "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": "c6813b5610ac53af73edd87a660d23a0511faa47",
              "status": "affected",
              "version": "384e624bb211b406db40edc900bb51af8bb267d0",
              "versionType": "git"
            },
            {
              "lessThan": "71ee71d7adcba648077997a29a91158d20c40b09",
              "status": "affected",
              "version": "384e624bb211b406db40edc900bb51af8bb267d0",
              "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.0.*",
              "status": "unaffected",
              "version": "6.0.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.8",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncxl/region: Fix decoder allocation crash\n\nWhen an intermediate port\u0027s decoders have been exhausted by existing\nregions, and creating a new region with the port in question in it\u0027s\nhierarchical path is attempted, cxl_port_attach_region() fails to find a\nport decoder (as would be expected), and drops into the failure / cleanup\npath.\n\nHowever, during cleanup of the region reference, a sanity check attempts\nto dereference the decoder, which in the above case didn\u0027t exist. This\ncauses a NULL pointer dereference BUG.\n\nTo fix this, refactor the decoder allocation and de-allocation into\nhelper routines, and in this \u0027free\u0027 routine, check that the decoder,\n@cxld, is valid before attempting any operations on it."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T08:47:59.142Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c6813b5610ac53af73edd87a660d23a0511faa47"
        },
        {
          "url": "https://git.kernel.org/stable/c/71ee71d7adcba648077997a29a91158d20c40b09"
        }
      ],
      "title": "cxl/region: Fix decoder allocation crash",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49895",
    "datePublished": "2025-05-01T14:10:37.707Z",
    "dateReserved": "2025-05-01T14:05:17.243Z",
    "dateUpdated": "2025-05-04T08:47:59.142Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-49895\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-05-01T15:16:14.517\",\"lastModified\":\"2025-05-02T13:52:51.693\",\"vulnStatus\":\"Undergoing Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncxl/region: Fix decoder allocation crash\\n\\nWhen an intermediate port\u0027s decoders have been exhausted by existing\\nregions, and creating a new region with the port in question in it\u0027s\\nhierarchical path is attempted, cxl_port_attach_region() fails to find a\\nport decoder (as would be expected), and drops into the failure / cleanup\\npath.\\n\\nHowever, during cleanup of the region reference, a sanity check attempts\\nto dereference the decoder, which in the above case didn\u0027t exist. This\\ncauses a NULL pointer dereference BUG.\\n\\nTo fix this, refactor the decoder allocation and de-allocation into\\nhelper routines, and in this \u0027free\u0027 routine, check that the decoder,\\n@cxld, is valid before attempting any operations on it.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: cxl/region: Fix decoder assignment crash Cuando los decodificadores de un puerto intermedio han sido agotados por las regiones existentes, y se intenta crear una nueva regi\u00f3n con el puerto en cuesti\u00f3n en su ruta jer\u00e1rquica, cxl_port_attach_region() no puede encontrar un decodificador de puerto (como ser\u00eda de esperar), y cae en la ruta de error/limpieza. Sin embargo, durante la limpieza de la referencia de la regi\u00f3n, una comprobaci\u00f3n de cordura intenta desreferenciar el decodificador, que en el caso anterior no exist\u00eda. Esto causa un ERROR de desreferencia de puntero NULL. Para corregir esto, refactorice la asignaci\u00f3n y desasignaci\u00f3n del decodificador en rutinas de ayuda, y en esta rutina \u0027libre\u0027, verifique que el decodificador, @cxld, sea v\u00e1lido antes de intentar cualquier operaci\u00f3n en \u00e9l.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/71ee71d7adcba648077997a29a91158d20c40b09\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c6813b5610ac53af73edd87a660d23a0511faa47\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...
  • 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.