OPP: Fix race between OPP addition and lookup
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.6.160, 6.12.114, 6.18.40, 7.1.5
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: OPP: Fix race between OPP addition and lookup A race exists between dev_pm_opp_add_dynamic() and dev_pm_opp_find_freq_exact(): CPU0 (add) CPU1 (lookup) ------------------------------- ------------------------------ _opp_add() mutex_lock() list_add(&new_opp->node, head) mutex_unlock() _opp_table_find_key() mutex_lock() dev_pm_opp_get(opp) kref_get() mutex_unlock() kref_init(&new_opp->kref) dev_pm_opp_put() kref_put_mutex() The newly added OPP is inserted into the list before its kref is initialized. A concurrent lookup can find this OPP and increment its reference count while it is still uninitialized, leading to refcount corruption and a potential premature free. Fix this by initializing ->kref and ->opp_table before making the OPP visible via list_add(). This ensures any concurrent lookup observes a fully initialized object. [ Viresh: Updated commit log ]
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 7034764a1e4a6edbb60914e89aad8384e3fe5d17 · fixed in 932ebfad767be1395946cbc1727a7c38eeee3d24; From 7034764a1e4a6edbb60914e89aad8384e3fe5d17 · fixed in 1946ea2f6b3ec00e313c78e83fc196f1f6aba2a9; From 7034764a1e4a6edbb60914e89aad8384e3fe5d17 · fixed in 46696b0b2123475d7f95909435c09808fc5ffd23; From 7034764a1e4a6edbb60914e89aad8384e3fe5d17 · fixed in bb75bd7d9ae7672034f73ce67a57e6ac89bb39e5; From 7034764a1e4a6edbb60914e89aad8384e3fe5d17 · fixed in f5e1cc9a284bff2510981643a5bca4bc4c21b81a
- Linux Linux
4.11
- KernelLinux
From 4.11.0 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.114; From 6.13.0 · fixed in 6.18.40; From 6.19.0 · fixed in 7.1.5