OPP: Fix race between OPP addition and lookup
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 1946ea2f6b3ec00e313c78e83fc196f1f6aba2a9, Kernel 2fb061a90898420d8ca1a0b9959ca977d90fa841, Kernel 46696b0b2123475d7f95909435c09808fc5ffd23 and 5 more.
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 ]
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | =4.11, >=7034764a1e4a6edbb60914e89aad8384e3fe5d17 <1946ea2f6b3ec00e313c78e83fc196f1f6aba2a9, >=7034764a1e4a6edbb60914e89aad8384e3fe5d17 <2fb061a90898420d8ca1a0b9959ca977d90fa841, >=7034764a1e4a6edbb60914e89aad8384e3fe5d17 <46696b0b2123475d7f95909435c09808fc5ffd23, >=7034764a1e4a6edbb60914e89aad8384e3fe5d17 <835b9b5b4d287a03c713680b0231d36ff599201b, >=7034764a1e4a6edbb60914e89aad8384e3fe5d17 <932ebfad767be1395946cbc1727a7c38eeee3d24, >=7034764a1e4a6edbb60914e89aad8384e3fe5d17 <bb75bd7d9ae7672034f73ce67a57e6ac89bb39e5, >=7034764a1e4a6edbb60914e89aad8384e3fe5d17 <e25be5d812ec8ca2615d23726b3861b04e2fff35, >=7034764a1e4a6edbb60914e89aad8384e3fe5d17 <f5e1cc9a284bff2510981643a5bca4bc4c21b81a | 1946ea2f6b3ec00e313c78e83fc196f1f6aba2a9, 2fb061a90898420d8ca1a0b9959ca977d90fa841, 46696b0b2123475d7f95909435c09808fc5ffd23, 835b9b5b4d287a03c713680b0231d36ff599201b, 932ebfad767be1395946cbc1727a7c38eeee3d24, bb75bd7d9ae7672034f73ce67a57e6ac89bb39e5, e25be5d812ec8ca2615d23726b3861b04e2fff35, f5e1cc9a284bff2510981643a5bca4bc4c21b81a |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket