Security Vulnerability Report
中文
CVE-2025-71298 CVSS 5.5 MEDIUM

CVE-2025-71298

Published: 2026-05-08 14:16:31
Last Modified: 2026-05-14 19:21:09
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: drm/tests: shmem: Hold reservation lock around madvise Acquire and release the GEM object's reservation lock around calls to the object's madvide operation. The tests use drm_gem_shmem_madvise_locked(), which led to errors such as show below. [ 58.339389] WARNING: CPU: 1 PID: 1352 at drivers/gpu/drm/drm_gem_shmem_helper.c:499 drm_gem_shmem_madvise_locked+0xde/0x140 Only export the new helper drm_gem_shmem_madvise() for Kunit tests. This is not an interface for regular drivers.

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 (Git commit 07cfcab370da06f26c273306571cbb0bfa3b9c52 之前版本)
Linux Kernel (Git commit 607d07d8cc0b835a8701259f08a03dc149b79b4f 之前版本)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * PoC Concept: Triggering the lock warning in drm_gem_shmem_madvise_locked * This requires a local environment with the vulnerable kernel configuration. */ #include <linux/module.h> #include <drm/drm_gem_shmem_helper.h> // Simulating the test condition that triggers the vulnerability static int __init poc_init(void) { struct drm_gem_shmem_object *shmem; int ret; // Allocate a shmem object (simplified) // In a real scenario, this involves interacting with the DRM subsystem // to create an object and then calling madvise without the lock. // The vulnerable call path: // drm_gem_shmem_madvise_locked(shmem, 0); // This would trigger the warning: // "WARNING: CPU: x PID: x at drivers/gpu/drm/drm_gem_shmem_helper.c:499" return 0; } static void __exit poc_exit(void) { } module_init(poc_init); module_exit(poc_exit); MODULE_LICENSE("GPL");

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-71298", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-05-08T14:16:31.153", "lastModified": "2026-05-14T19:21:09.073", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/tests: shmem: Hold reservation lock around madvise\n\nAcquire and release the GEM object's reservation lock around calls\nto the object's madvide operation. The tests use\ndrm_gem_shmem_madvise_locked(), which led to errors such as show below.\n\n[ 58.339389] WARNING: CPU: 1 PID: 1352 at drivers/gpu/drm/drm_gem_shmem_helper.c:499 drm_gem_shmem_madvise_locked+0xde/0x140\n\nOnly export the new helper drm_gem_shmem_madvise() for Kunit tests.\nThis is not an interface for regular drivers."}], "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": "NVD-CWE-noinfo"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.16", "versionEndExcluding": "6.18.16", "matchCriteriaId": "B4562EDA-AFEA-4C62-97CC-C83E109A5F19"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "6.19.6", "matchCriteriaId": "373EEEDA-FAA1-4FB4-B6ED-DB4DD99DBE67"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/07cfcab370da06f26c273306571cbb0bfa3b9c52", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/607d07d8cc0b835a8701259f08a03dc149b79b4f", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/9cc77691b5fd615625955cedf726da57543088f1", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}