Description (CNA)
In the Linux kernel, the following vulnerability has been resolved: i2c: imx: Cancel hrtimer before clearing slave pointer In i2c_imx_unreg_slave(), the slave pointer is set to NULL after disabling interrupts. However, a pending interrupt might already have started the hrtimer (i2c_imx_slave_timeout) before the pointer was cleared. If the hrtimer fires after i2c_imx->slave is set to NULL, the timer callback i2c_imx_slave_finish_op() will call i2c_imx_slave_event() with a NULL slave pointer, which results in a use-after-free / NULL pointer dereference. Fix by canceling the hrtimer and waiting for it to complete after disabling interrupts, before clearing the slave pointer.
Affected (CNA)
| Vendor / product | Versions |
|---|---|
| Linux / Linux | affected f7414cd6923fd7f78e57086fc964ba2dc25db5c1 before e3da77bdb4015051656bb472c295656bbea03b6f; affected f7414cd6923fd7f78e57086fc964ba2dc25db5c1 before 470fe15fb3bb2eba6629be301ca7e991ee3cfb7e; affected f7414cd6923fd7f78e57086fc964ba2dc25db5c1 before a8a1f9ac3d763e721586f15479ef9140b216ddf3; affected f7414cd6923fd7f78e57086fc964ba2dc25db5c1 before 753060f2b77ff2f386addbd3ecadb95b9f90cddd; affected f7414cd6923fd7f78e57086fc964ba2dc25db5c1 before affd62f5719a78135b7441aa49c8cab3c3b5e838; affected f7414cd6923fd7f78e57086fc964ba2dc25db5c1 before dab4762ee7f3fd0a01980d5407ba48d0261d3bff; affected f7414cd6923fd7f78e57086fc964ba2dc25db5c1 before 6ac7702b6cc2b94aaed9ef2d95bfbefcdc90061f |
| Linux / Linux | affected 5.11; unaffected 0 before 5.11; unaffected 5.15.216 through 5.15.*; unaffected 6.1.183 through 6.1.*; unaffected 6.6.151 through 6.6.*; unaffected 6.12.103 through 6.12.*; unaffected 6.18.44 through 6.18.*; unaffected 7.1.8 through 7.1.*; unaffected 7.2 through * |
CWE
No CWE identifiers supplied.
References
- https://git.kernel.org/stable/c/e3da77bdb4015051656bb472c295656bbea03b6f
- https://git.kernel.org/stable/c/470fe15fb3bb2eba6629be301ca7e991ee3cfb7e
- https://git.kernel.org/stable/c/a8a1f9ac3d763e721586f15479ef9140b216ddf3
- https://git.kernel.org/stable/c/753060f2b77ff2f386addbd3ecadb95b9f90cddd
- https://git.kernel.org/stable/c/affd62f5719a78135b7441aa49c8cab3c3b5e838
- https://git.kernel.org/stable/c/dab4762ee7f3fd0a01980d5407ba48d0261d3bff
- https://git.kernel.org/stable/c/6ac7702b6cc2b94aaed9ef2d95bfbefcdc90061f
ADP enrichment
No English description supplied.
No references supplied.