В ядре Linux устранена следующая уязвимость: smb: клиент: отклонить короткие ответы SESSION_SETUP smb2_check_message() принимает кадры короче, чем struct smb2_pdu, когда статус SMB2 не равен нулю, до проверки minimum-PDU, добавленной b4694f269e66d. Таким образом, 64-байтовый ответ STATUS_MORE_PROCESSING_REQUIRED SESSION_SETUP принимается, даже если он не может содержать поля SecurityBufferOffset и SecurityBufferLength. Затем анализатор считывает эти поля из устаревших байтов, оставленных в повторно используемом буфере приема более ранним кадром.
С длинным устаревшим SecurityBufferLength, decode_ntlmssp_challenge() копирует до 64 KB из-за пределов объекта приема и отправляет данные обратно на сервер в целевой информации NTLMv2 AUTHENTICATE. Отклоните короткие ответы MPR SESSION_SETUP перед коротким путем ошибки и проверьте SecurityBufferOffset + SecurityBufferLength на полученную длину ответа перед декодированием задачи. Обход заказа не нов: раннее возвращение с короткой ошибкой предшествует b4694f269e66d, а неподтвержденное чтение SecurityBufferLength предшествует необработанному разделению NTLMSSP 2016 года в 166cea4dc3a4, поэтому все поддерживаемые стабильные деревья затронуты.
Воспроизводится на 6.6.87.2; путь неизменён на магистрали.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: smb: client: reject short SESSION_SETUP responses smb2_check_message() accepts frames shorter than struct smb2_pdu when the SMB2 status is non-zero, before the minimum-PDU check added by b4694f269e66d. A 64-byte STATUS_MORE_PROCESSING_REQUIRED SESSION_SETUP response is therefore accepted even though it cannot contain the SecurityBufferOffset and SecurityBufferLength fields. The parser then reads those fields from stale bytes left in the reused receive buffer by an earlier frame. With a long stale SecurityBufferLength, decode_ntlmssp_challenge() copies up to about 64 KB from beyond the receive object and sends the data back to the server in the NTLMv2 AUTHENTICATE target info. Reject short MPR SESSION_SETUP responses before the short-error path, and validate SecurityBufferOffset + SecurityBufferLength against the received response length before decoding the challenge. The ordering bypass is not new: the short-error early return predates b4694f269e66d, and the unvalidated SecurityBufferLength read predates the 2016 raw NTLMSSP split in 166cea4dc3a4, so all supported stable trees are affected. Reproduced on 6.6.87.2; the path is unchanged on mainline.