CVE-2024-49985

Source
https://cve.org/CVERecord?id=CVE-2024-49985
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-49985.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-49985
Downstream
Related
Published
2024-10-21T18:02:29.827Z
Modified
2026-03-20T12:39:30.013043Z
Summary
i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resume
Details

In the Linux kernel, the following vulnerability has been resolved:

i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resume

In case there is any sort of clock controller attached to this I2C bus controller, for example Versaclock or even an AIC32x4 I2C codec, then an I2C transfer triggered from the clock controller clkops .prepare callback may trigger a deadlock on drivers/clk/clk.c preparelock mutex.

This is because the clock controller first grabs the preparelock mutex and then performs the prepare operation, including its I2C access. The I2C access resumes this I2C bus controller via .runtimeresume callback, which calls clkprepareenable(), which attempts to grab the prepare_lock mutex again and deadlocks.

Since the clock are already prepared since probe() and unprepared in remove(), use simple clkenable()/clkdisable() calls to enable and disable the clock on runtime suspend and resume, to avoid hitting the prepare_lock mutex.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49985.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4e7bca6fc07bf9526d797b9787dcb21e40cd10cf
Fixed
d6f1250a4d5773f447740b9fe37b8692105796d4
Fixed
9b8bc33ad64192f54142396470cc34ce539a8940
Fixed
1883cad2cc629ded4a3556c0bbb8b42533ad8764
Fixed
c2024b1a583ab9176c797ea1e5f57baf8d5e2682
Fixed
22a1f8a5b56ba93d3e8b7a1dafa24e01c8bb48ba
Fixed
fac3c9f7784e8184c0338e9f0877b81e55d3ef1c
Fixed
894cd5f5fd9061983445bbd1fa3d81be43095344
Fixed
048bbbdbf85e5e00258dfb12f5e368f908801d7b

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-49985.json"