CVE-2025-40334 (GCVE-0-2025-40334)
Vulnerability from cvelistv5
Published
2025-12-09 04:09
Modified
2026-08-05 12:09
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: validate userq buffer virtual address and size It needs to validate the userq object virtual address to determine whether it is residented in a valid vm mapping.
Impacted products
Vendor Product Version
Linux Linux Version: 5501117d24a38dadff3dbd8d3102559b27929668
Version: 5501117d24a38dadff3dbd8d3102559b27929668
Version: fbf136b932358da1c65eb6fedd064a33a7a96aaa
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c",
            "drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h",
            "drivers/gpu/drm/amd/amdgpu/mes_userqueue.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "5a577de86c4a1c67ca405571d6ef84e65c6897d1",
              "status": "affected",
              "version": "5501117d24a38dadff3dbd8d3102559b27929668",
              "versionType": "git"
            },
            {
              "lessThan": "9e46b8bb0539d7bc9a9e7b3072fa4f6082490392",
              "status": "affected",
              "version": "5501117d24a38dadff3dbd8d3102559b27929668",
              "versionType": "git"
            },
            {
              "lessThan": "9e46b8bb0539d7bc9a9e7b3072fa4f6082490392",
              "status": "affected",
              "version": "fbf136b932358da1c65eb6fedd064a33a7a96aaa",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c",
            "drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h",
            "drivers/gpu/drm/amd/amdgpu/mes_userqueue.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.16"
            },
            {
              "lessThan": "6.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.8",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: validate userq buffer virtual address and size\n\nIt needs to validate the userq object virtual address to\ndetermine whether it is residented in a valid vm mapping."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.3,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The only path to the bug is `DRM_IOCTL_AMDGPU_USERQ` on a local amdgpu DRM node (`/dev/dri/renderD*`); `amdgpu_userq_ioctl()` has no network- or bus-facing entry point.\nAC:L - A single ioctl carrying attacker-chosen `queue_va`/`queue_size`/`rptr_va`/`eop_va`/`shadow_va`/`csa_va` deterministically bypasses the missing mapping-and-size check \u2014 no race, no memory-layout dependency, and user queues are on by default on shipping RDNA3/RDNA4 parts.\nPR:L - The ioctl is `DRM_AUTH|DRM_RENDER_ALLOW`, so any unprivileged local account, container, Android app or GPU cloud tenant holding a render-node fd (the default for logged-in desktop users) can reach it; no capability or DRM master rights are required.\nUI:N - The attacker issues the ioctl directly from its own process against its own DRM fd; no action by any other user is needed.\nS:U - All effects \u2014 corrupted firmware queue state, GPU VM faults and adapter reset \u2014 occur inside the kernel/GPU-driver security authority the ioctl already belongs to; no VM, IOMMU or sandbox boundary is crossed.\nC:L - Because neither the address nor the declared size is checked against a real VM mapping, the CP fetches ring packets and MQD state from GPU memory outside the intended buffer, and the kernel-reserved `seq64` aperture mapped into every client\u0027s VM can be read, disclosing other clients\u0027 user-queue fence/timeline values; the caller\u0027s own page tables still bound the read, so it is not an arbitrary kernel-memory read.\nI:H - With no bounds check on address+size, the GPU is made to write rptr and CP context-save/shadow/CSA data outside any validated mapping, including into the globally shared `adev-\u003eseq64` BO that userspace cannot otherwise map (`AMDGPU_VA_RESERVED_TOP` blocks it) and that `amdgpu_userq_fence_signaled()` reads to decide other processes\u0027 fence state \u2014 an out-of-bounds write primitive that lets an unprivileged client forge other clients\u0027 fence completions and break dma_resv synchronization.\nA:H - Unmapped or undersized queue/rptr/eop/shadow/CSA addresses make the CP fault as soon as the queue runs, hanging the queue and driving the driver\u0027s hang detection into `drm_dev_wedged_event()` and full GPU recovery, which wedges the adapter for every process on the system; any unprivileged user can repeat it in a loop."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:09:41.567Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/5a577de86c4a1c67ca405571d6ef84e65c6897d1"
        },
        {
          "url": "https://git.kernel.org/stable/c/9e46b8bb0539d7bc9a9e7b3072fa4f6082490392"
        }
      ],
      "title": "drm/amdgpu: validate userq buffer virtual address and size",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40334",
    "datePublished": "2025-12-09T04:09:51.022Z",
    "dateReserved": "2025-04-16T07:20:57.186Z",
    "dateUpdated": "2026-08-05T12:09:41.567Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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…