В ядре Linux была устранена следующая уязвимость: i2c: atr: fix dangling adapter pointer on add failure i2c_atr_add_adapter() хранит atr->adapter[chan_id] перед i2c_add_adapter(), чтобы уведомитель шины I2C мог совпадать с дочерними клиентами при регистрации. При отказе канал освобождается, но слот был оставлен, указывая на свободную память, что может привести к use-after-free в i2c_atr_del_adapter () / очистке, а также блокировать повторное использование с -EEXIST. Очистите слот на пути ошибки i2c_add_adapter (), прежде чем освобождать chan.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: i2c: atr: fix dangling adapter pointer on add failure i2c_atr_add_adapter() stores atr->adapter[chan_id] before i2c_add_adapter() so that the I2C bus notifier can match child clients during registration. On failure the channel is freed but the slot was left pointing at freed memory, which can lead to use-after-free in i2c_atr_del_adapter() / cleanup and also block reuse with -EEXIST. Clear the slot on the i2c_add_adapter() error path before freeing chan.