В ядре Linux устранена следующая уязвимость:
md: приостановить массив при обновлении RAID_disks через sysfs
В функции RAID1_reshape() функция Freeze_array() вызывается перед изменением файла r1bio.
пул памяти (conf->r1bio_pool) и conf->raid_disks, и
unfreeze_array() вызывается после завершения обновления. Однако метод Freeze_array() ждет только до тех пор, пока nr_sync_pending и
(nr_pending – nr_queued) всех сегментов достигает нуля. Когда ошибка ввода-вывода
происходит, nr_queued увеличивается и соответствующий r1bio ставится в очередь
либо retry_list, либо bio_end_io_list.
В результате метод Freeze_array() может
разблокируйте до выхода этих r1bios. Это может привести к ситуации, когда conf->raid_disks и мемпул
уже обновлен, пока стоит в очереди r1bios, выделенный вместе со старым
значение RAID_disks позже будут опубликованы. Следовательно, free_r1bio() может
получить доступ к памяти за пределами границ в put_all_bios() и освободить r1bios
неправильный размер нового мемпула, что потенциально может вызвать проблемы с
мемпул тоже.
Поскольку только обычный ввод-вывод может увеличить nr_queued при возникновении ошибки ввода-вывода,
приостановка массива позволяет избежать этой проблемы. Примечание. Обновление RAID_disks через ioctl SET_ARRAY_INFO уже приостанавливается.
массив.
Поэтому приостанавливаем массив при обновлении RAID_disks через sysfs, чтобы избежать этой проблемы.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: md: suspend array while updating raid_disks via sysfs In raid1_reshape(), freeze_array() is called before modifying the r1bio memory pool (conf->r1bio_pool) and conf->raid_disks, and unfreeze_array() is called after the update is completed. However, freeze_array() only waits until nr_sync_pending and (nr_pending - nr_queued) of all buckets reaches zero. When an I/O error occurs, nr_queued is increased and the corresponding r1bio is queued to either retry_list or bio_end_io_list. As a result, freeze_array() may unblock before these r1bios are released. This can lead to a situation where conf->raid_disks and the mempool have already been updated while queued r1bios, allocated with the old raid_disks value, are later released. Consequently, free_r1bio() may access memory out of bounds in put_all_bios() and release r1bios of the wrong size to the new mempool, potentially causing issues with the mempool as well. Since only normal I/O might increase nr_queued while an I/O error occurs, suspending the array avoids this issue. Note: Updating raid_disks via ioctl SET_ARRAY_INFO already suspends the array. Therefore, we suspend the array when updating raid_disks via sysfs to avoid this issue too.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 10
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.4.59
|
3.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.9.7
|
3.10
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
3.10.1
|
6.12.70
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.10
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:3.10:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:3.10:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:3.10:rc7:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
|
— | — |