В ядре Linux устранена следующая уязвимость:
i2c: imx: отменить hrtimer перед очисткой подчиненного указателя
В i2c_imx_unreg_slave() указатель подчиненного устройства устанавливается в NULL после
отключение прерываний. Однако ожидающее прерывание может уже
запустили hrtimer (i2c_imx_slave_timeout) перед указателем
был очищен. Если hrtimer срабатывает после того, как для i2c_imx->slave установлено значение
NULL, обратный вызов таймера i2c_imx_slave_finish_op() вызовет
i2c_imx_slave_event() с нулевым указателем подчиненного устройства, что приводит к
разыменование указателя use-after-free/NULL.
Исправьте это, отменив hrtimer и дождавшись его завершения. отключение прерываний перед очисткой подчиненного указателя.
Показать оригинальное описание (EN)
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.
Характеристики атаки
Последствия
Строка CVSS v3.1