В ядре Linux устранена следующая уязвимость:
scsi: isci: исправлено использование после освобождения в пути удаления устройства. Тасклет завершения ISCI инициализируется в isci_host_alloc().
(drivers/scsi/isci/init.c:496) и запланировано как из MSI-X, так и из устаревшей версии.
обработчики прерываний (drivers/scsi/isci/host.c:223,613).
isci_host_deinit() останавливает контроллер и ожидает завершения остановки,
но он никогда не убивает завершение_tasklet до продолжения демонтажа. А
Top-of-function Tasklet_kill() здесь недостаточен: прерывания
отключено только при запуске isci_host_stop_complete(), поэтому до тех пор, пока
wait_for_stop() возвращает обработчики IRQ, которые все еще могут запросить
тасклет.
Обратный вызов тасклета также повторно разрешает прерывания после очистки.
завершений, поэтому уничтожение тасклета до того, как источник будет стабилизирован, оставляет
та же гонка открыта. После возврата wait_for_stop() дальнейшее планирование на основе IRQ невозможно.
произойти. Убейте завершение_tasklet там, чтобы демонтаж не мог участвовать в гонке в очереди
тасклет, работающий на мертвом ihost.
При удалении или выгрузке устаревший обратный вызов
в противном случае можно разыменовать ihost и нажать ihost->smu_registers после
Срок службы хоста заканчивается. Аналог UML+KASAN воспроизвел класс отказа как без
Tasklet_kill() и Tasklet_kill(), помещенные перед приостановкой исходного кода, и
остался чистым после того, как произошло убийство после приостановки планирования
источник. Это отражает коммит f6ab594672d4 («scsi: aic94xx: fix use-after-free в
путь удаления устройства"), но ISCI требуется уничтожение после wait_for_stop().
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: scsi: isci: Fix use-after-free in device removal path The ISCI completion tasklet is initialized in isci_host_alloc() (drivers/scsi/isci/init.c:496) and scheduled from both MSI-X and legacy interrupt handlers (drivers/scsi/isci/host.c:223,613). isci_host_deinit() stops the controller and waits for stop completion, but it never kills completion_tasklet before teardown continues. A top-of-function tasklet_kill() is not sufficient here: interrupts are only disabled when isci_host_stop_complete() runs, so until wait_for_stop() returns the IRQ handlers can still requeue the tasklet. The tasklet callback also re-enables interrupts after draining completions, so killing the tasklet before the source is quiesced leaves the same race open. Once wait_for_stop() returns, no further IRQ-driven scheduling can occur. Kill completion_tasklet there so teardown cannot race a queued tasklet running on a dead ihost. On remove or unload, the stale callback can otherwise dereference ihost and touch ihost->smu_registers after the host lifetime ends. A UML + KASAN analogue reproduced the failure class both with no tasklet_kill() and with tasklet_kill() placed before source quiesce, and stayed clean once the kill happened after quiescing the scheduling source. This mirrors commit f6ab594672d4 ("scsi: aic94xx: fix use-after-free in device removal path"), but ISCI needs the kill after wait_for_stop().
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 14
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.0.1
|
5.10.258
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.209
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.175
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.142
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.92
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.34
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.11
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:3.0:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:3.0:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:3.0:rc7:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc4:*:*:*:*:*:*
|
— | — |