CVE-2022-49203 (GCVE-0-2022-49203)
Vulnerability from cvelistv5
Published
2025-02-26 01:55
Modified
2025-05-04 08:32
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: Fix double free during GPU reset on DC streams [Why] The issue only occurs during the GPU reset code path. We first backup the current state prior to commiting 0 streams internally from DM to DC. This state backup contains valid link encoder assignments. DC will clear the link encoder assignments as part of current state (but not the backup, since it was a copied before the commit) and free the extra stream reference it held. DC requires that the link encoder assignments remain cleared/invalid prior to commiting. Since the backup still has valid assignments we call the interface post reset to clear them. This routine also releases the extra reference that the link encoder interface held - resulting in a double free (and eventually a NULL pointer dereference). [How] We'll have to do a full DC commit anyway after GPU reset because the stream count previously went to 0. We don't need to retain the assignment that we had backed up, so just copy off of the now clean current state assignment after the reset has occcurred with the new link_enc_cfg_copy() interface.
Impacted products
Vendor Product Version
Linux Linux Version: 6d63fcc2a334f7bd15e4e9b1db50a19335d2af4f
Version: 6d63fcc2a334f7bd15e4e9b1db50a19335d2af4f
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c",
            "drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c",
            "drivers/gpu/drm/amd/display/dc/inc/link_enc_cfg.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "bbfcdd6289ba6f00f0cd7d496946dce9f6c600ac",
              "status": "affected",
              "version": "6d63fcc2a334f7bd15e4e9b1db50a19335d2af4f",
              "versionType": "git"
            },
            {
              "lessThan": "32685b32d825ca08c5dec826477332df886c4743",
              "status": "affected",
              "version": "6d63fcc2a334f7bd15e4e9b1db50a19335d2af4f",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c",
            "drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c",
            "drivers/gpu/drm/amd/display/dc/inc/link_enc_cfg.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.17"
            },
            {
              "lessThan": "5.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.17.*",
              "status": "unaffected",
              "version": "5.17.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.17.2",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18",
                  "versionStartIncluding": "5.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Fix double free during GPU reset on DC streams\n\n[Why]\nThe issue only occurs during the GPU reset code path.\n\nWe first backup the current state prior to commiting 0 streams\ninternally from DM to DC. This state backup contains valid link\nencoder assignments.\n\nDC will clear the link encoder assignments as part of current state\n(but not the backup, since it was a copied before the commit) and\nfree the extra stream reference it held.\n\nDC requires that the link encoder assignments remain cleared/invalid\nprior to commiting. Since the backup still has valid assignments we\ncall the interface post reset to clear them. This routine also\nreleases the extra reference that the link encoder interface held -\nresulting in a double free (and eventually a NULL pointer dereference).\n\n[How]\nWe\u0027ll have to do a full DC commit anyway after GPU reset because\nthe stream count previously went to 0.\n\nWe don\u0027t need to retain the assignment that we had backed up, so\njust copy off of the now clean current state assignment after the\nreset has occcurred with the new link_enc_cfg_copy() interface."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T08:32:16.815Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/bbfcdd6289ba6f00f0cd7d496946dce9f6c600ac"
        },
        {
          "url": "https://git.kernel.org/stable/c/32685b32d825ca08c5dec826477332df886c4743"
        }
      ],
      "title": "drm/amd/display: Fix double free during GPU reset on DC streams",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49203",
    "datePublished": "2025-02-26T01:55:44.214Z",
    "dateReserved": "2025-02-26T01:49:39.291Z",
    "dateUpdated": "2025-05-04T08:32:16.815Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-49203\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-02-26T07:00:57.357\",\"lastModified\":\"2025-03-18T20:12:03.890\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndrm/amd/display: Fix double free during GPU reset on DC streams\\n\\n[Why]\\nThe issue only occurs during the GPU reset code path.\\n\\nWe first backup the current state prior to commiting 0 streams\\ninternally from DM to DC. This state backup contains valid link\\nencoder assignments.\\n\\nDC will clear the link encoder assignments as part of current state\\n(but not the backup, since it was a copied before the commit) and\\nfree the extra stream reference it held.\\n\\nDC requires that the link encoder assignments remain cleared/invalid\\nprior to commiting. Since the backup still has valid assignments we\\ncall the interface post reset to clear them. This routine also\\nreleases the extra reference that the link encoder interface held -\\nresulting in a double free (and eventually a NULL pointer dereference).\\n\\n[How]\\nWe\u0027ll have to do a full DC commit anyway after GPU reset because\\nthe stream count previously went to 0.\\n\\nWe don\u0027t need to retain the assignment that we had backed up, so\\njust copy off of the now clean current state assignment after the\\nreset has occcurred with the new link_enc_cfg_copy() interface.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drm/amd/display: Arreglar doble liberaci\u00f3n durante el reinicio de la GPU en flujos de DC [Por qu\u00e9] El problema solo ocurre durante la ruta del c\u00f3digo de reinicio de la GPU. Primero hacemos una copia de seguridad del estado actual antes de confirmar 0 flujos internamente desde DM a DC. Esta copia de seguridad del estado contiene asignaciones de codificador de enlace v\u00e1lidas. DC borrar\u00e1 las asignaciones de codificador de enlace como parte del estado actual (pero no la copia de seguridad, ya que se copi\u00f3 antes de el commit) y liberar\u00e1 la referencia de flujo adicional que ten\u00eda. DC requiere que las asignaciones de codificador de enlace permanezcan borradas/inv\u00e1lidas antes de el commit. Dado que la copia de seguridad a\u00fan tiene asignaciones v\u00e1lidas, llamamos a la interfaz post reset para borrarlas. Esta rutina tambi\u00e9n libera la referencia adicional que ten\u00eda la interfaz de codificador de enlace, lo que da como resultado una doble liberaci\u00f3n (y eventualmente una desreferencia de puntero NULL). [C\u00f3mo] Tendremos que hacer una confirmaci\u00f3n de DC completa de todos modos despu\u00e9s de reiniciar la GPU porque el conteo de transmisiones anteriormente lleg\u00f3 a 0. No necesitamos conservar la asignaci\u00f3n que hab\u00edamos respaldado, as\u00ed que simplemente copiamos la asignaci\u00f3n del estado actual ahora limpio despu\u00e9s de que se haya producido el reinicio con la nueva interfaz link_enc_cfg_copy().\"}],\"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-415\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.17\",\"versionEndExcluding\":\"5.17.2\",\"matchCriteriaId\":\"210C679C-CF84-44A3-8939-E629C87E54BF\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/32685b32d825ca08c5dec826477332df886c4743\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/bbfcdd6289ba6f00f0cd7d496946dce9f6c600ac\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}"
  }
}


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.


Loading…

Loading…