В ядре Linux устранена следующая уязвимость:
dmaengine: idxd: исправлено двойное освобождение от структур wq, engine и group. Обратные вызовы релиза для wq, engine и групповых устройств.
(idxd_conf_wq_release, idxd_conf_engine_release,
idxd_conf_group_release) каждый вызов kfree() во включающей структуре. Пути ошибок установки и функции очистки также вызывают kfree().
явно после put_device(), производя двойное освобождение всякий раз, когда
put_device() сбрасывает счетчик ссылок до нуля и запускает выпуск.
В функциях настройки перед этим вызывается device_initialize().
device_add(), поэтому счетчик ссылок равен ровно 1 на сайтах с ошибками.
put_device() безоговорочно запускает выпуск, который освобождает структуру;
последующий явный вызов kfree() работает с освобожденной памятью. Для idxd_setup_wqs() обратный вызов выпуска wq также владеет opcap_bmap.
и wqcfg. Ошибка очистки также явно освободила эти поля.
перед вызовом put_device(), вызывая дальнейшее двойное освобождение обоих.
Удалите избыточные явные вызовы kfree() из всех путей ошибок установки.
и функции очистки для структур wq, engine и group, делегирование
единоличное владение этими распределениями для обратных вызовов выпуска.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: dmaengine: idxd: fix double free of wq, engine, and group structs The release callbacks for wq, engine, and group devices (idxd_conf_wq_release, idxd_conf_engine_release, idxd_conf_group_release) each call kfree() on the enclosing struct. The setup error paths and cleanup functions also call kfree() explicitly after put_device(), producing a double free whenever put_device() drops the reference count to zero and fires the release. In the setup functions, device_initialize() is called before device_add(), so the reference count is exactly 1 at the error sites. put_device() unconditionally fires the release, which frees the struct; the subsequent explicit kfree() then operates on freed memory. For idxd_setup_wqs(), the wq release callback also owns opcap_bmap and wqcfg. The error unwind additionally freed those fields explicitly before calling put_device(), causing further double frees on both. Remove the redundant explicit kfree() calls from all setup error paths and cleanup functions for wq, engine, and group structs, delegating sole ownership of those allocations to the release callbacks.