Ad

CVE-2026-99681

NONE EPSS 0.21%
Обновлено 20 ноября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux устранена следующая уязвимость: blk-mq: fix out-of-bounds read in blk_mq_free_rqs A KASAN slab-out-of-bounds read может происходить в blk_mq_free_rqs(), когда существует несоответствие между количеством аппаратных очередей, выделенных для планировщика IO (et->nr_hw_queues), и количеством аппаратных очередей в наборе тегов блока (set->nr_hw_queues). Это несоответствие может произойти, если blk_mq_update_nr_hw_queues() терпит неудачу на полпути (например, из-за давления памяти во время blk_mq_prealloc_tag_set_tags()). На этом пути ошибки лифт восстанавливается с большим количеством очередей оборудования, чем набор тегов блока на самом деле.

Когда лифт позже освобождается, blk_mq_free_sched_tags() итерируется до нового et->nr_hw_queues и вызывает blk_mq_free_rqs(). В blk_mq_free_rqs(), он пытается получить доступ к set->tags[hctx_idx], чтобы получить теги драйвера. Поскольку set->nr_hw_queues не был обновлен из-за более раннего сбоя, set->tags по-прежнему имеет старый (меньший) размер, что приводит к чтению out-of-bounds.

BUG: KASAN: slab-out-of-bounds в blk_mq_free_rqs+0xde/0x680 Read размера 8 в addr ffff88818d67fc28 по задаче syz-executor117/5839 Call Trace: blk_mq_free_rqs+0xde/0x680 blk_mq_free_map_and_rqs+0x40/0xf0 blk_mq_free_sched_tags blk_mq_free_sched_res+0xeb/0x280 elevator_change_done+0x1d2/0x5c0 elevator_change+0x34f/0x480 elv_iosched_store+0x504/0x630 queue_attr_store+0x207/0x2b0 To исправить это, явно проверить, если hctx_idx < set->nr_hw_queues перед доступом к set->tags[hctx_idx]. Если hctx_idx set->nr_hw_queues, аппаратная очередь не существует в наборе тегов, то есть нет тегов драйверов для очистки отображений. В этом случае безопасно установите drv_tags на NULL.

Следующий вызов в blk_mq_clear_rq_mapping() уже обрабатывает указатель NULL drv_tags и безопасно возвращается.

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: blk-mq: fix out-of-bounds read in blk_mq_free_rqs A KASAN slab-out-of-bounds read can occur in blk_mq_free_rqs() when there is a mismatch between the number of hardware queues allocated for the IO scheduler (et->nr_hw_queues) and the number of hardware queues in the block tag set (set->nr_hw_queues). This mismatch can happen if blk_mq_update_nr_hw_queues() fails halfway through (e.g., due to memory pressure during blk_mq_prealloc_tag_set_tags()). In this error path, the elevator is restored with a larger number of hardware queues than the block tag set actually has. When the elevator is later freed, blk_mq_free_sched_tags() iterates up to the new et->nr_hw_queues and calls blk_mq_free_rqs(). In blk_mq_free_rqs(), it attempts to access set->tags[hctx_idx] to get the driver tags. Because set->nr_hw_queues was not updated due to the earlier failure, set->tags still has the old (smaller) size, leading to an out-of-bounds read. BUG: KASAN: slab-out-of-bounds in blk_mq_free_rqs+0xde/0x680 Read of size 8 at addr ffff88818d67fc28 by task syz-executor117/5839 Call Trace: blk_mq_free_rqs+0xde/0x680 blk_mq_free_map_and_rqs+0x40/0xf0 blk_mq_free_sched_tags blk_mq_free_sched_res+0xeb/0x280 elevator_change_done+0x1d2/0x5c0 elevator_change+0x34f/0x480 elv_iosched_store+0x504/0x630 queue_attr_store+0x207/0x2b0 To fix this, explicitly check if hctx_idx < set->nr_hw_queues before accessing set->tags[hctx_idx]. If hctx_idx >= set->nr_hw_queues, the hardware queue doesn't exist in the tag set, meaning there are no driver tags to clear mappings from. In this case, safely set drv_tags to NULL. The subsequent call to blk_mq_clear_rq_mapping() already handles a NULL drv_tags pointer and will safely return.