« Volver al listado

CVE-2022-50260

Estado: AnalizadaMedia (5.5)—

In the Linux kernel, the following vulnerability has been resolved:

drm/msm: Make .remove and .shutdown HW shutdown consistent

Drivers' .remove and .shutdown callbacks are executed on different code paths. The former is called when a device is removed from the bus, while the latter is called at system shutdown time to quiesce the device.

This means that some overlap exists between the two, because both have to take care of properly shutting down the hardware. But currently the logic used in these two callbacks isn't consistent in msm drivers, which could lead to kernel panic.

For example, on .remove the component is deleted and its .unbind callback leads to the hardware being shutdown but only if the DRM device has been marked as registered.

Leer descripción completaMostrar menos

That check doesn't exist in the .shutdown logic and this can lead to the driver calling drm_atomic_helper_shutdown() for a DRM device that hasn't been properly initialized.

A situation like this can happen if drivers for expected sub-devices fail to probe, since the .bind callback will never be executed. If that is the case, drm_atomic_helper_shutdown() will attempt to take mutexes that are only initialized if drm_mode_config_init() is called during a device bind.

This bug was attempted to be fixed in commit 623f279c7781 ("drm/msm: fix shutdown hook in case GPU components failed to bind"), but unfortunately it still happens in some cases as the one mentioned above, i.e:

Detalles técnicos trazas, registros y código del informe original
  systemd-shutdown[1]: Powering off.
  kvm: exiting hardware virtualization
  platform wifi-firmware.0: Removing from iommu group 12
  platform video-firmware.0: Removing from iommu group 10
  ------------[ cut here ]------------
  WARNING: CPU: 6 PID: 1 at drivers/gpu/drm/drm_modeset_lock.c:317 drm_modeset_lock_all_ctx+0x3c4/0x3d0
  ...
  Hardware name: Google CoachZ (rev3+) (DT)
  pstate: a0400009 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
  pc : drm_modeset_lock_all_ctx+0x3c4/0x3d0
  lr : drm_modeset_lock_all_ctx+0x48/0x3d0
  sp : ffff80000805bb80
  x29: ffff80000805bb80 x28: ffff327c00128000 x27: 0000000000000000
  x26: 0000000000000000 x25: 0000000000000001 x24: ffffc95d820ec030
  x23: ffff327c00bbd090 x22: ffffc95d8215eca0 x21: ffff327c039c5800
  x20: ffff327c039c5988 x19: ffff80000805bbe8 x18: 0000000000000034
  x17: 000000040044ffff x16: ffffc95d80cac920 x15: 0000000000000000
  x14: 0000000000000315 x13: 0000000000000315 x12: 0000000000000000
  x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
  x8 : ffff80000805bc28 x7 : 0000000000000000 x6 : 0000000000000000
  x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
  x2 : ffff327c00128000 x1 : 0000000000000000 x0 : ffff327c039c59b0
  Call trace:
   drm_modeset_lock_all_ctx+0x3c4/0x3d0
   drm_atomic_helper_shutdown+0x70/0x134
   msm_drv_shutdown+0x30/0x40
   platform_shutdown+0x28/0x40
   device_shutdown+0x148/0x350
   kernel_power_off+0x38/0x80
   __do_sys_reboot+0x288/0x2c0
   __arm64_sys_reboot+0x28/0x34
   invoke_syscall+0x48/0x114
   el0_svc_common.constprop.0+0x44/0xec
   do_el0_svc+0x2c/0xc0
   el0_svc+0x2c/0x84
   el0t_64_sync_handler+0x11c/0x150
   el0t_64_sync+0x18c/0x190
  ---[ end trace 0000000000000000 ]---
  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000018
  Mem abort info:
    ESR = 0x0000000096000004
    EC = 0x25: DABT (current EL), IL = 32 bits
    SET = 0, FnV = 0
    EA = 0, S1PTW = 0
    FSC = 0x04: level 0 translation fault
  Data abort info:
    ISV = 0, ISS = 0x00000004
    CM = 0, WnR = 0
  user pgtable: 4k pages, 48-bit VAs, pgdp=000000010eab1000
  [0000000000000018] pgd=0000000000000000, p4d=0000000000000000
  Internal error: Oops: 96000004 [#1] PREEMPT SMP
  ...
  Hardware name: Google CoachZ (rev3+) (DT)
  pstate: a0400009 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
  pc : ww_mutex_lock+0x28/0x32c
  lr : drm_modeset_lock_all_ctx+0x1b0/0x3d0
  sp : ffff80000805bb50
  x29: ffff80000805bb50 x28: ffff327c00128000 x27: 0000000000000000
  x26: 00000
---truncated---

CVSS

Probabilidad de explotación (EPSS)

EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).

Tecnologías afectadas (1)

CWE

Referencias

JSON original (NVD)

Mostrar
{
  "id": "CVE-2022-50260",
  "cveTags": [],
  "metrics": {
    "cvssMetricV31": [
      {
        "type": "Primary",
        "source": "nvd@nist.gov",
        "cvssData": {
          "scope": "UNCHANGED",
          "version": "3.1",
          "baseScore": 5.5,
          "attackVector": "LOCAL",
          "baseSeverity": "MEDIUM",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "integrityImpact": "NONE",
          "userInteraction": "NONE",
          "attackComplexity": "LOW",
          "availabilityImpact": "HIGH",
          "privilegesRequired": "LOW",
          "confidentialityImpact": "NONE"
        },
        "impactScore": 3.6,
        "exploitabilityScore": 1.8
      }
    ]
  },
  "affected": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "affectedData": [
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "9d5cbf5fe46e350715389d89d0c350d83289a102",
              "lessThan": "26f9a766f87b33c50ed400a9500cc1dc9aced953",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "9d5cbf5fe46e350715389d89d0c350d83289a102",
              "lessThan": "0e6649a2e31ac157c711d583ec8f5ec59da5de0e",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "9d5cbf5fe46e350715389d89d0c350d83289a102",
              "lessThan": "0a58d2ae572adaec8d046f8d35b40c2c32ac7468",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "3d516e369e3a563e7da39c72b06d78c7f1b09b1e",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "8bc5c9ba5a1d67aaf6957199b2ab8a24402741a9",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "19583b280801b6ba4a36172113db42413860d1c4",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "56ed34ea6cd73c2fd5384d03a9034e6f229a390a",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "4.14.197",
              "lessThan": "4.15",
              "versionType": "semver"
            },
            {
              "status": "affected",
              "version": "4.19.144",
              "lessThan": "4.20",
              "versionType": "semver"
            },
            {
              "status": "affected",
              "version": "5.4.64",
              "lessThan": "5.5",
              "versionType": "semver"
            },
            {
              "status": "affected",
              "version": "5.8.8",
              "lessThan": "5.9",
              "versionType": "semver"
            }
          ],
          "programFiles": [
            "drivers/gpu/drm/msm/msm_drv.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.9"
            },
            {
              "status": "unaffected",
              "version": "0",
              "lessThan": "5.9",
              "versionType": "semver"
            },
            {
              "status": "unaffected",
              "version": "5.19.17",
              "versionType": "semver",
              "lessThanOrEqual": "5.19.*"
            },
            {
              "status": "unaffected",
              "version": "6.0.3",
              "versionType": "semver",
              "lessThanOrEqual": "6.0.*"
            },
            {
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ],
          "programFiles": [
            "drivers/gpu/drm/msm/msm_drv.c"
          ],
          "defaultStatus": "affected"
        }
      ]
    }
  ],
  "published": "2025-09-15T14:15:36.873",
  "references": [
    {
      "url": "https://git.kernel.org/stable/c/0a58d2ae572adaec8d046f8d35b40c2c32ac7468",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/0e6649a2e31ac157c711d583ec8f5ec59da5de0e",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    },
    {
      "url": "https://git.kernel.org/stable/c/26f9a766f87b33c50ed400a9500cc1dc9aced953",
      "tags": [
        "Patch"
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "vulnStatus": "Analyzed",
  "weaknesses": [
    {
      "type": "Primary",
      "source": "nvd@nist.gov",
      "description": [
        {
          "lang": "en",
          "value": "NVD-CWE-noinfo"
        }
      ]
    }
  ],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/msm: Make .remove and .shutdown HW shutdown consistent\n\nDrivers' .remove and .shutdown callbacks are executed on different code\npaths. The former is called when a device is removed from the bus, while\nthe latter is called at system shutdown time to quiesce the device.\n\nThis means that some overlap exists between the two, because both have to\ntake care of properly shutting down the hardware. But currently the logic\nused in these two callbacks isn't consistent in msm drivers, which could\nlead to kernel panic.\n\nFor example, on .remove the component is deleted and its .unbind callback\nleads to the hardware being shutdown but only if the DRM device has been\nmarked as registered.\n\nThat check doesn't exist in the .shutdown logic and this can lead to the\ndriver calling drm_atomic_helper_shutdown() for a DRM device that hasn't\nbeen properly initialized.\n\nA situation like this can happen if drivers for expected sub-devices fail\nto probe, since the .bind callback will never be executed. If that is the\ncase, drm_atomic_helper_shutdown() will attempt to take mutexes that are\nonly initialized if drm_mode_config_init() is called during a device bind.\n\nThis bug was attempted to be fixed in commit 623f279c7781 (\"drm/msm: fix\nshutdown hook in case GPU components failed to bind\"), but unfortunately\nit still happens in some cases as the one mentioned above, i.e:\n\n  systemd-shutdown[1]: Powering off.\n  kvm: exiting hardware virtualization\n  platform wifi-firmware.0: Removing from iommu group 12\n  platform video-firmware.0: Removing from iommu group 10\n  ------------[ cut here ]------------\n  WARNING: CPU: 6 PID: 1 at drivers/gpu/drm/drm_modeset_lock.c:317 drm_modeset_lock_all_ctx+0x3c4/0x3d0\n  ...\n  Hardware name: Google CoachZ (rev3+) (DT)\n  pstate: a0400009 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n  pc : drm_modeset_lock_all_ctx+0x3c4/0x3d0\n  lr : drm_modeset_lock_all_ctx+0x48/0x3d0\n  sp : ffff80000805bb80\n  x29: ffff80000805bb80 x28: ffff327c00128000 x27: 0000000000000000\n  x26: 0000000000000000 x25: 0000000000000001 x24: ffffc95d820ec030\n  x23: ffff327c00bbd090 x22: ffffc95d8215eca0 x21: ffff327c039c5800\n  x20: ffff327c039c5988 x19: ffff80000805bbe8 x18: 0000000000000034\n  x17: 000000040044ffff x16: ffffc95d80cac920 x15: 0000000000000000\n  x14: 0000000000000315 x13: 0000000000000315 x12: 0000000000000000\n  x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000\n  x8 : ffff80000805bc28 x7 : 0000000000000000 x6 : 0000000000000000\n  x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000\n  x2 : ffff327c00128000 x1 : 0000000000000000 x0 : ffff327c039c59b0\n  Call trace:\n   drm_modeset_lock_all_ctx+0x3c4/0x3d0\n   drm_atomic_helper_shutdown+0x70/0x134\n   msm_drv_shutdown+0x30/0x40\n   platform_shutdown+0x28/0x40\n   device_shutdown+0x148/0x350\n   kernel_power_off+0x38/0x80\n   __do_sys_reboot+0x288/0x2c0\n   __arm64_sys_reboot+0x28/0x34\n   invoke_syscall+0x48/0x114\n   el0_svc_common.constprop.0+0x44/0xec\n   do_el0_svc+0x2c/0xc0\n   el0_svc+0x2c/0x84\n   el0t_64_sync_handler+0x11c/0x150\n   el0t_64_sync+0x18c/0x190\n  ---[ end trace 0000000000000000 ]---\n  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000018\n  Mem abort info:\n    ESR = 0x0000000096000004\n    EC = 0x25: DABT (current EL), IL = 32 bits\n    SET = 0, FnV = 0\n    EA = 0, S1PTW = 0\n    FSC = 0x04: level 0 translation fault\n  Data abort info:\n    ISV = 0, ISS = 0x00000004\n    CM = 0, WnR = 0\n  user pgtable: 4k pages, 48-bit VAs, pgdp=000000010eab1000\n  [0000000000000018] pgd=0000000000000000, p4d=0000000000000000\n  Internal error: Oops: 96000004 [#1] PREEMPT SMP\n  ...\n  Hardware name: Google CoachZ (rev3+) (DT)\n  pstate: a0400009 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)\n  pc : ww_mutex_lock+0x28/0x32c\n  lr : drm_modeset_lock_all_ctx+0x1b0/0x3d0\n  sp : ffff80000805bb50\n  x29: ffff80000805bb50 x28: ffff327c00128000 x27: 0000000000000000\n  x26: 00000\n---truncated---"
    }
  ],
  "lastModified": "2026-06-17T05:23:05.937",
  "configurations": [
    {
      "nodes": [
        {
          "negate": false,
          "cpeMatch": [
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "019FD122-B713-4607-B783-F100A84A6DF6",
              "versionEndExcluding": "4.15",
              "versionStartIncluding": "4.14.197"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "200A6A5D-DDD9-4B17-BED9-0BF5156070BA",
              "versionEndExcluding": "4.20",
              "versionStartIncluding": "4.19.144"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "53525D0E-0323-4A65-8B7F-9E122D05D69F",
              "versionEndExcluding": "5.5",
              "versionStartIncluding": "5.4.64"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "86E858BA-ECBE-4C7D-A495-5737C23F69C4",
              "versionEndExcluding": "5.9",
              "versionStartIncluding": "5.8.8"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "4B9692D8-FE66-45AF-8D09-486CDC2FE42F",
              "versionEndExcluding": "5.19.17",
              "versionStartIncluding": "5.9.1"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "5BCD8201-B847-4442-B894-70D430128DEF",
              "versionEndExcluding": "6.0.3",
              "versionStartIncluding": "6.0"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:5.9:-:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "F79A2EB6-623E-4749-AEE0-DCB58C4C42F8"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:5.9:rc3:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "A52A4ABE-5C24-4CD4-A348-E303B7F23C71"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:5.9:rc4:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "12019CF2-FD8E-4D59-BA4C-7093DF0BB091"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:5.9:rc5:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "9B1AB90E-C0C6-4027-B27D-BA214BE33561"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:5.9:rc6:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "103FE5BA-7315-4263-9C95-EABEAD7E174F"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:5.9:rc7:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "47E31D6A-31EC-4F63-9CAE-B7A52B58E149"
            },
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:5.9:rc8:*:*:*:*:*:*",
              "vulnerable": true,
              "matchCriteriaId": "3497462B-A3DA-47CC-A5DD-C1C2D2E6DFDE"
            }
          ],
          "operator": "OR"
        }
      ]
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}