В ядре Linux устранена следующая уязвимость:
блок: пересчитать nr_integrity_segments в blk_insert_cloned_request
blk_insert_cloned_request() уже пересчитывает nr_phys_segments
против нижней очереди, потому что «настройки очереди, связанные с
подсчет сегментов может отличаться от исходной очереди». То же самое
рассуждения применимы к сегментам целостности: в основе составного драйвера
очередь может иметь более жесткие virt_boundary_mask, seg_boundary_mask или
max_segment_size, чем верхняя очередь, и в этом случае
blk_rq_count_integrity_sg() для нижней очереди выдает
другое количество, чем унаследованное кэшированное rq->nr_integrity_segments
из исходного запроса с помощью blk_rq_prep_clone(). Когда счетчик кэширования меньше фактического счетчика нижней очереди,
blk_rq_map_integrity_sg() отключения
BUG_ON(сегменты > rq->nr_integrity_segments);
при отправке.
Те же семейства составных сетапов, которые мотивировали
существующие nr_phys_segments пересчитываются — dm-multipath разветвляется на
nvme-rdma, в частности, может это сделать. Зеркально отразить обработку nr_phys_segments: когда запрос выполняется
целостность, пересчитать nr_integrity_segments для нижней очереди
и отклонить запрос, если он превышает нижнюю очередь
max_integrity_segments. blk_rq_count_integrity_sg() и
очередь_max_integrity_segments() уже доступны через
<linux/blk-integrity.h>, который включает blk-mq.c. Это закрывает скрытый пробел в контракте стекирования и приносит
целостно-сегментный учет в соответствии с существующими
физ-сегментный учет.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: block: recompute nr_integrity_segments in blk_insert_cloned_request blk_insert_cloned_request() already recomputes nr_phys_segments against the bottom queue, because "the queue settings related to segment counting may differ from the original queue." The exact same reasoning applies to integrity segments: a stacked driver's underlying queue can have tighter virt_boundary_mask, seg_boundary_mask, or max_segment_size than the top queue, in which case blk_rq_count_integrity_sg() against the bottom queue produces a different count than the cached rq->nr_integrity_segments inherited from the source request by blk_rq_prep_clone(). When the cached count is lower than the bottom queue's actual count, blk_rq_map_integrity_sg() trips BUG_ON(segments > rq->nr_integrity_segments); on dispatch. The same families of stacked setups that motivated the existing nr_phys_segments recompute -- dm-multipath fanning out to nvme-rdma in particular -- can produce this. Mirror the nr_phys_segments handling: when the request carries integrity, recompute nr_integrity_segments against the bottom queue and reject the request if it exceeds the bottom queue's max_integrity_segments. blk_rq_count_integrity_sg() and queue_max_integrity_segments() are both already available via <linux/blk-integrity.h>, which blk-mq.c includes. This closes a latent gap in the stacking contract and brings the integrity-segment accounting in line with the existing phys-segment accounting.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.12
|
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: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:*:*:*:*:*:*
|
— | — |