CVE-2023-52981 (GCVE-0-2023-52981)
Vulnerability from cvelistv5
Published
2025-03-27 16:43
Modified
2025-05-04 07:46
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/i915: Fix request ref counting during error capture & debugfs dump When GuC support was added to error capture, the reference counting around the request object was broken. Fix it up. The context based search manages the spinlocking around the search internally. So it needs to grab the reference count internally as well. The execlist only request based search relies on external locking, so it needs an external reference count but within the spinlock not outside it. The only other caller of the context based search is the code for dumping engine state to debugfs. That code wasn't previously getting an explicit reference at all as it does everything while holding the execlist specific spinlock. So, that needs updaing as well as that spinlock doesn't help when using GuC submission. Rather than trying to conditionally get/put depending on submission model, just change it to always do the get/put. v2: Explicitly document adding an extra blank line in some dense code (Andy Shevchenko). Fix multiple potential null pointer derefs in case of no request found (some spotted by Tvrtko, but there was more!). Also fix a leaked request in case of !started and another in __guc_reset_context now that intel_context_find_active_request is actually reference counting the returned request. v3: Add a _get suffix to intel_context_find_active_request now that it grabs a reference (Daniele). v4: Split the intel_guc_find_hung_context change to a separate patch and rename intel_context_find_active_request_get to intel_context_get_active_request (Tvrtko). v5: s/locking/reference counting/ in commit message (Tvrtko) (cherry picked from commit 3700e353781e27f1bc7222f51f2cc36cbeb9b4ec)
Impacted products
Vendor Product Version
Linux Linux Version: 573ba126aef37c8315e5bb68d2dad515efa96994
Version: 573ba126aef37c8315e5bb68d2dad515efa96994
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/i915/gt/intel_context.c",
            "drivers/gpu/drm/i915/gt/intel_context.h",
            "drivers/gpu/drm/i915/gt/intel_engine_cs.c",
            "drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c",
            "drivers/gpu/drm/i915/i915_gpu_error.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "9467397f417dd7b5d0db91452f0474e79716a527",
              "status": "affected",
              "version": "573ba126aef37c8315e5bb68d2dad515efa96994",
              "versionType": "git"
            },
            {
              "lessThan": "86d8ddc74124c3fdfc139f246ba6da15e45e86e3",
              "status": "affected",
              "version": "573ba126aef37c8315e5bb68d2dad515efa96994",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/i915/gt/intel_context.c",
            "drivers/gpu/drm/i915/gt/intel_context.h",
            "drivers/gpu/drm/i915/gt/intel_engine_cs.c",
            "drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c",
            "drivers/gpu/drm/i915/i915_gpu_error.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.15"
            },
            {
              "lessThan": "5.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.11",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/i915: Fix request ref counting during error capture \u0026 debugfs dump\n\nWhen GuC support was added to error capture, the reference counting\naround the request object was broken. Fix it up.\n\nThe context based search manages the spinlocking around the search\ninternally. So it needs to grab the reference count internally as\nwell. The execlist only request based search relies on external\nlocking, so it needs an external reference count but within the\nspinlock not outside it.\n\nThe only other caller of the context based search is the code for\ndumping engine state to debugfs. That code wasn\u0027t previously getting\nan explicit reference at all as it does everything while holding the\nexeclist specific spinlock. So, that needs updaing as well as that\nspinlock doesn\u0027t help when using GuC submission. Rather than trying to\nconditionally get/put depending on submission model, just change it to\nalways do the get/put.\n\nv2: Explicitly document adding an extra blank line in some dense code\n(Andy Shevchenko). Fix multiple potential null pointer derefs in case\nof no request found (some spotted by Tvrtko, but there was more!).\nAlso fix a leaked request in case of !started and another in\n__guc_reset_context now that intel_context_find_active_request is\nactually reference counting the returned request.\nv3: Add a _get suffix to intel_context_find_active_request now that it\ngrabs a reference (Daniele).\nv4: Split the intel_guc_find_hung_context change to a separate patch\nand rename intel_context_find_active_request_get to\nintel_context_get_active_request (Tvrtko).\nv5: s/locking/reference counting/ in commit message (Tvrtko)\n\n(cherry picked from commit 3700e353781e27f1bc7222f51f2cc36cbeb9b4ec)"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T07:46:46.399Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/9467397f417dd7b5d0db91452f0474e79716a527"
        },
        {
          "url": "https://git.kernel.org/stable/c/86d8ddc74124c3fdfc139f246ba6da15e45e86e3"
        }
      ],
      "title": "drm/i915: Fix request ref counting during error capture \u0026 debugfs dump",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-52981",
    "datePublished": "2025-03-27T16:43:20.111Z",
    "dateReserved": "2025-03-27T16:40:15.740Z",
    "dateUpdated": "2025-05-04T07:46:46.399Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-52981\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-03-27T17:15:45.313\",\"lastModified\":\"2025-03-28T18:11:49.747\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndrm/i915: Fix request ref counting during error capture \u0026 debugfs dump\\n\\nWhen GuC support was added to error capture, the reference counting\\naround the request object was broken. Fix it up.\\n\\nThe context based search manages the spinlocking around the search\\ninternally. So it needs to grab the reference count internally as\\nwell. The execlist only request based search relies on external\\nlocking, so it needs an external reference count but within the\\nspinlock not outside it.\\n\\nThe only other caller of the context based search is the code for\\ndumping engine state to debugfs. That code wasn\u0027t previously getting\\nan explicit reference at all as it does everything while holding the\\nexeclist specific spinlock. So, that needs updaing as well as that\\nspinlock doesn\u0027t help when using GuC submission. Rather than trying to\\nconditionally get/put depending on submission model, just change it to\\nalways do the get/put.\\n\\nv2: Explicitly document adding an extra blank line in some dense code\\n(Andy Shevchenko). Fix multiple potential null pointer derefs in case\\nof no request found (some spotted by Tvrtko, but there was more!).\\nAlso fix a leaked request in case of !started and another in\\n__guc_reset_context now that intel_context_find_active_request is\\nactually reference counting the returned request.\\nv3: Add a _get suffix to intel_context_find_active_request now that it\\ngrabs a reference (Daniele).\\nv4: Split the intel_guc_find_hung_context change to a separate patch\\nand rename intel_context_find_active_request_get to\\nintel_context_get_active_request (Tvrtko).\\nv5: s/locking/reference counting/ in commit message (Tvrtko)\\n\\n(cherry picked from commit 3700e353781e27f1bc7222f51f2cc36cbeb9b4ec)\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drm/i915: Arreglar el conteo de referencias de solicitud durante la captura de errores y el volcado de debugfs Cuando se agreg\u00f3 soporte para GuC a la captura de errores, el conteo de referencias alrededor del objeto de solicitud se rompi\u00f3. Arr\u00e9glenlo. La b\u00fasqueda basada en contexto administra el bloqueo de giro alrededor de la b\u00fasqueda internamente. Por lo tanto, tambi\u00e9n necesita obtener el conteo de referencias internamente. La b\u00fasqueda basada en solicitud solo de execlist se basa en el bloqueo externo, por lo que necesita un conteo de referencias externo pero dentro del bloqueo de giro, no fuera de \u00e9l. El \u00fanico otro llamador de la b\u00fasqueda basada en contexto es el c\u00f3digo para volcar el estado del motor a debugfs. Ese c\u00f3digo anteriormente no obten\u00eda una referencia expl\u00edcita en absoluto, ya que hace todo mientras mantiene el bloqueo de giro espec\u00edfico de execlist. Por lo tanto, eso necesita actualizarse, ya que el bloqueo de giro no ayuda cuando se usa el env\u00edo de GuC. En lugar de intentar obtener/poner condicionalmente dependiendo del modelo de env\u00edo, simplemente c\u00e1mbielo para que siempre haga obtener/poner. v2: Documentar expl\u00edcitamente agregar una l\u00ednea en blanco adicional en alg\u00fan c\u00f3digo denso (Andy Shevchenko). Se corrigen varias posibles desreferencias de puntero nulo en caso de no encontrarse ninguna solicitud (algunas detectadas por Tvrtko, \u00a1pero hab\u00eda m\u00e1s!). Tambi\u00e9n se corrigen una solicitud filtrada en caso de !started y otra en __guc_reset_context, ahora que intel_context_find_active_request cuenta las referencias de la solicitud devuelta. v3: Se a\u00f1ade el sufijo _get a intel_context_find_active_request ahora que obtiene una referencia (Daniele). v4: Se divide el cambio de intel_guc_find_hung_context en un parche independiente y se cambia el nombre de intel_context_find_active_request_get a intel_context_get_active_request (Tvrtko). v5: s/locking/reference counting/ en el mensaje de confirmaci\u00f3n (Tvrtko) (seleccionado del commit 3700e353781e27f1bc7222f51f2cc36cbeb9b4ec).\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/86d8ddc74124c3fdfc139f246ba6da15e45e86e3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9467397f417dd7b5d0db91452f0474e79716a527\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


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…