In the Linux kernel, the following vulnerability has been resolved: power: supply: sbs-battery: disable polling before supply teardown The managed poll-work cancellation is registered before the power supply, so cleanup unregisters the supply before draining polling. Отложенный или запущенный опрашиваемый может затем вызвать power_supply_changed() на выпущенном ресурсе. Commit 8d59cf3887fb («power: supply: sbs-battery: Fix use-after-free in power_supply_changed()») переместил запрос IRQ после регистрации поставки, но не изменил порядок отмены опросов-работ.
Добавьте позже управляемое действие, которое отключает и истощает опросы перед разрывом поставок. Его сохраненное отключенное состояние предотвращает обратные вызовы внешнего источника энергии от перевооружения работы опроса после того, как он был осушен. Сохраните оригинальную автоотмену, чтобы инициализировать работу до запуска обратного вызова поставки и покрыть неудачную регистрацию поставки.
Проблема с заказом на демонтаж была обнаружена статическим анализом.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: power: supply: sbs-battery: disable polling before supply teardown The managed poll-work cancellation is registered before the power supply, so cleanup unregisters the supply before draining polling. A pending or running poller can then call power_supply_changed() on the released supply. Commit 8d59cf3887fb ("power: supply: sbs-battery: Fix use-after-free in power_supply_changed()") moved the IRQ request after supply registration, but did not change the poll-work cancellation order. Add a later managed action that disables and drains polling before supply teardown. Its retained disabled state prevents external-power callbacks from rearming the poll work after it has been drained. Keep the original autocancel to initialize work before supply callbacks can run and to cover failed supply registration. The teardown ordering issue was found by static analysis.