{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-52586",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-52586"
  ],
  "published": "2024-03-06T06:46:18Z",
  "summary": "drm/msm/dpu: Add mutex lock in control vblank irq",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/msm/dpu: Add mutex lock in control vblank irq\n\nAdd a mutex lock to control vblank irq to synchronize vblank\nenable/disable operations happening from different threads to prevent\nrace conditions while registering/unregistering the vblank irq callback.\n\nv4: -Removed vblank_ctl_lock from dpu_encoder_virt, so it is only a\n    parameter of dpu_encoder_phys.\n    -Switch from atomic refcnt to a simple int counter as mutex has\n    now been added\nv3: Mistakenly did not change wording in last version. It is done now.\nv2: Slightly changed wording of commit message\n\nPatchwork: https://patchwork.freedesktop.org/patch/571854/",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-52586"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/14f109bf74dd67e1d0469fed859c8e506b0df53f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/45284ff733e4caf6c118aae5131eb7e7cf3eea5a"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The bug is reached through local DRM primary-node ioctls (DRM_IOCTL_WAIT_VBLANK / CRTC sequence and modeset/kickoff paths) into dpu_encoder_*_control_vblank_irq on Qualcomm MSM DPU hardware; there is no network or adjacent-protocol reachability.\nAC:L - An attacker who can open the DRM card node can drive both sides of the race\u2014concurrent WAIT_VBLANK enable/disable (queued via msm vblank work) and irq_control from atomic kickoff/idle-PC/stop\u2014so success does not depend on conditions outside attacker control.\nPR:L - WAIT_VBLANK and related sequence ioctls require only an open /dev/dri/cardN fd (no DRM_AUTH/MASTER/CAP_SYS_ADMIN), and DRM master for the modeset side is granted to the session/video-group user via logind without real root.\nUI:N - The attacker triggers both vblank and resource-control paths entirely through their own DRM ioctls and threads; no separate victim action is required.\nS:U - Impact remains within the host kernel\u2019s security authority; this is a standard kernel race/UAF, not a VM escape, IOMMU bypass, or other cross-boundary scope change.\nC:H - The race can leave a vblank IRQ callback registered with phys_enc after refcount hits zero and the encoder is later freed (destroy only kfree\u2019s phys without guaranteed unregister), yielding a use-after-free read of attacker-reclaimable heap via the IRQ handler.\nI:H - The same dangling IRQ callback UAF on phys_enc is heap-sprayable and provides a write/control-flow hijack primitive once the freed object is reused, consistent with scoring use-after-free as High integrity impact.\nA:H - Mismatched register/unregister also hits WARN_ON on double-register, NULL/stale dereferences in the IRQ callback, and kernel oops/panic on the dangling phys_enc path, fully disrupting availability."
    }
  }
}
