В ядре Linux устранена следующая уязвимость:
atm: fore200e: исправлено использование после освобождения в тасклетах во время удаления устройства. При отсоединении адаптера PCA-200E или SBA-200E
освобождается. Однако tx_tasklet или rx_tasklet все еще могут работать.
или в ожидании, что приводит к ошибке использования после освобождения, когда уже освобожденный файл for200e
доступ к нему осуществляется снова в for200e_tx_tasklet() или fore200e_rx_tasklet().
Одно из состояний гонки может возникнуть следующим образом:
ЦП 0 (очистка) | ЦП 1 (тасклет)
fore200e_pca_remove_one() | fore200e_interrupt()
for200e_shutdown() | Tasklet_schedule()
kfree(fore200e) | fore200e_tx_tasklet()
| fore200e-> // UAF
Исправьте это, обеспечив правильную отмену tx_tasklet или rx_tasklet перед
выпущен fore200e. Добавьте Tasklet_kill() в fore200e_shutdown() в
синхронизироваться с любыми ожидающими или запущенными тасклетами. Более того, поскольку
fore200e_reset() может предотвратить дальнейшие прерывания или передачу данных,
Tasklet_kill() должен быть помещен после for200e_reset(), чтобы предотвратить
тасклет от перепланирования в for200e_interrupt().
Наконец,
ему нужно выполнить Tasklet_kill() только тогда, когда состояние for200e больше
больше или равно FORE200E_STATE_IRQ, поскольку тасклеты не инициализированы
в более ранних штатах. Короче говоря, Tasklet_kill() должен быть помещен в
ветвь FORE200E_STATE_IRQ в структуре switch...case. Эта ошибка была обнаружена посредством статического анализа.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: atm: fore200e: fix use-after-free in tasklets during device removal When the PCA-200E or SBA-200E adapter is being detached, the fore200e is deallocated. However, the tx_tasklet or rx_tasklet may still be running or pending, leading to use-after-free bug when the already freed fore200e is accessed again in fore200e_tx_tasklet() or fore200e_rx_tasklet(). One of the race conditions can occur as follows: CPU 0 (cleanup) | CPU 1 (tasklet) fore200e_pca_remove_one() | fore200e_interrupt() fore200e_shutdown() | tasklet_schedule() kfree(fore200e) | fore200e_tx_tasklet() | fore200e-> // UAF Fix this by ensuring tx_tasklet or rx_tasklet is properly canceled before the fore200e is released. Add tasklet_kill() in fore200e_shutdown() to synchronize with any pending or running tasklets. Moreover, since fore200e_reset() could prevent further interrupts or data transfers, the tasklet_kill() should be placed after fore200e_reset() to prevent the tasklet from being rescheduled in fore200e_interrupt(). Finally, it only needs to do tasklet_kill() when the fore200e state is greater than or equal to FORE200E_STATE_IRQ, since tasklets are uninitialized in earlier states. In a word, the tasklet_kill() should be placed in the FORE200E_STATE_IRQ branch within the switch...case structure. This bug was identified through static analysis.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 12
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
2.6.12.1
|
5.10.252
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.202
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.165
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.128
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.75
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.16
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
6.19.6
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*
|
— | — |