В ядре Linux была устранена следующая уязвимость: scsi: qla2xxx: Reject non-SCSI SRB на быстром пути IOCB qla2x00_status_entry() отфильтровывает записи non-TYPE_SRB и типы SRB_NVME_CMD, SRB_BIDI_CMD и SRB_TM_CMD, а затем попадает на быстрый путь SCSI, который предполагает команду SRB_SCSI_CMD. Первое, что на этом пути, qla_chk_edif_rx_sa_delete_pending(), и последующая обработка обоих оценивают GET_CMD_SP(sp), то есть sp->u.scmd.cmd. Srb u union накладывает командный указатель SCSI на другие компоновки команд (bsg_job, iocb_cmd).
Если прошивка поставляет неожиданный STATUS_TYPE IOCB для не-SCSI-обработчика, sp->u.scmd.cmd может читать как не-NULL указатель на мусор, минуя проверки NULL в qla_chk_edif_rx_sa_delete_pending() и на тесте cp NULL, что приводит к удалению дикого указателя. Отклоните любой SRB, чей тип не SRB_SCSI_CMD, прежде чем войти в быстрый путь. Слот outstanding_cmds остается нетронутым, поэтому команда, действительно не относящаяся к SCSI, по-прежнему выполняется через свой собственный обработчик.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: scsi: qla2xxx: Reject non-SCSI SRB on status IOCB fast path qla2x00_status_entry() filters out non-TYPE_SRB entries and the SRB_NVME_CMD, SRB_BIDI_CMD and SRB_TM_CMD types, then falls through to a SCSI fast path that assumes the command is an SRB_SCSI_CMD. The first thing on that path, qla_chk_edif_rx_sa_delete_pending(), and the subsequent handling both evaluate GET_CMD_SP(sp), i.e. sp->u.scmd.cmd. The srb u union overlays the SCSI command pointer with other command layouts (bsg_job, iocb_cmd). If firmware delivers an unexpected STATUS_TYPE IOCB for a non-SCSI handle, sp->u.scmd.cmd can read as a non-NULL garbage pointer, bypassing the NULL checks in qla_chk_edif_rx_sa_delete_pending() and at the cp == NULL test, and leading to a wild pointer dereference. Reject any SRB whose type is not SRB_SCSI_CMD before entering the fast path. The outstanding_cmds slot is left untouched so a genuinely non-SCSI command still completes through its proper handler.
Характеристики атаки
Последствия
Строка CVSS v3.1