Security Vulnerability Report
中文
CVE-2023-53664 CVSS 5.5 MEDIUM

CVE-2023-53664

Published: 2025-10-07 16:15:50
Last Modified: 2026-02-26 23:13:05
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: OPP: Fix potential null ptr dereference in dev_pm_opp_get_required_pstate() "opp" pointer is dereferenced before the IS_ERR_OR_NULL() check. Fix it by removing the dereference to cache opp_table and dereference it directly where opp_table is used. This fixes the following smatch warning: drivers/opp/core.c:232 dev_pm_opp_get_required_pstate() warn: variable dereferenced before IS_ERR check 'opp' (see line 230)

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
Linux Kernel < 6.6 (受影响的稳定版本)
Linux Kernel 6.6.x 早期版本
Linux Kernel 6.1.x 早期版本
Linux Kernel 5.15.x 早期版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2023-53664 PoC - Trigger null pointer dereference in OPP subsystem // This PoC demonstrates how to trigger the vulnerability by calling // dev_pm_opp_get_required_pstate() with invalid conditions #include <linux/module.h> #include <linux/init.h> #include <linux/pm_opp.h> #include <linux/device.h> // Simulate the vulnerable code path // The original buggy code dereferences 'opp' before IS_ERR_OR_NULL() check static void trigger_vulnerable_path(struct device *dev) { struct dev_pm_opp *opp; unsigned int pstate; // This simulates the lookup that may return NULL or ERR_PTR opp = dev_pm_opp_find_freq_ceil(dev, 0); // BUG: 'opp' is dereferenced before the IS_ERR_OR_NULL() check // In the vulnerable version, something like this would happen: // pstate = opp->pstate; // NULL dereference if opp is NULL! // The fixed version should check first: if (IS_ERR_OR_NULL(opp)) { pr_err("OPP is invalid\n"); return; } pstate = dev_pm_opp_get_required_pstate(opp, 0); pr_info("Required pstate: %u\n", pstate); } static int __init poc_init(void) { pr_info("CVE-2023-53664 PoC module loaded\n"); // In a real scenario, this would be triggered by specific // device operations that invoke the OPP subsystem return 0; } static void __exit poc_exit(void) { pr_info("CVE-2023-53664 PoC module unloaded\n"); } module_init(poc_init); module_exit(poc_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("PoC for CVE-2023-53664");

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2023-53664", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2025-10-07T16:15:50.163", "lastModified": "2026-02-26T23:13:05.093", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nOPP: Fix potential null ptr dereference in dev_pm_opp_get_required_pstate()\n\n\"opp\" pointer is dereferenced before the IS_ERR_OR_NULL() check. Fix it by\nremoving the dereference to cache opp_table and dereference it directly\nwhere opp_table is used.\n\nThis fixes the following smatch warning:\n\ndrivers/opp/core.c:232 dev_pm_opp_get_required_pstate() warn: variable\ndereferenced before IS_ERR check 'opp' (see line 230)"}], "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": "CWE-476"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.5", "versionEndExcluding": "6.5.3", "matchCriteriaId": "880C803A-BEAE-4DA0-8A59-AC023F7B4EE3"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/25130b27e0352acb83e91c467853eb9afad3b644", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/7ddd8deb1c3c0363a7e14fafb5df26e2089a69a5", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}