CVE-2025-40334 (GCVE-0-2025-40334)

Vulnerability from cvelistv5 – Published: 2025-12-09 04:09 – Updated: 2026-08-05 12:09
VLAI
Title
drm/amdgpu: validate userq buffer virtual address and size
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 CPE status
Linux Linux Affected: 5501117d24a38dadff3dbd8d3102559b27929668 , < 5a577de86c4a1c67ca405571d6ef84e65c6897d1 (git)
Affected: 5501117d24a38dadff3dbd8d3102559b27929668 , < 9e46b8bb0539d7bc9a9e7b3072fa4f6082490392 (git)
Affected: fbf136b932358da1c65eb6fedd064a33a7a96aaa , < 9e46b8bb0539d7bc9a9e7b3072fa4f6082490392 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.16
Unaffected: 0 , < 6.16 (semver)
Unaffected: 6.17.8 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed 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",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40334",
      "date": "2026-09-28",
      "epss": "0.00165",
      "percentile": "0.05049"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "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"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "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."
          }
        ],
        "id": "CVE-2025-40334",
        "lastModified": "2026-07-30T06:24:30.003",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.3,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "LOW",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.5,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2025-12-09T16:17:43.603",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/5a577de86c4a1c67ca405571d6ef84e65c6897d1"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/9e46b8bb0539d7bc9a9e7b3072fa4f6082490392"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-30T08:38:24+00:00",
      "cve": "CVE-2025-40334",
      "id": "CVE-2025-40334",
      "initial_release_date": "2025-12-09T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: drm/amdgpu: validate userq buffer virtual address and size",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40334.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-01T13:42:39Z",
      "cve": "CVE-2025-40334",
      "id": "CVE-2025-40334",
      "initial_release_date": "2025-12-10T00:26:38Z",
      "product_status:known_not_affected": "525",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40334",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-40334.json",
      "version": "11"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…