В ядре Linux устранена следующая уязвимость:
smb: клиент: восстановить смещение data_offset, привязанное в is_valid_oplock_break()
Зафиксируйте 83bfbd0bb902 («cifs: удалите заголовок RFC1002 из smb_hdr»)
изменилось количество, относительно которого измеряется эта граница. Раньше это было
srv->total_read минус 4-байтовая преамбула RFC1002, которая total_read, затем
включено, так что это была длина сообщения SMB. Тот же коммит остановлен
считая преамбулу и механическую замену
srv->total_read - srv->pdu_size оставил выражение, которое идентично
ноль: Standard_receive3() считывает MID_HEADER_SIZE() байты, а затем ровно
pdu_length — еще MID_HEADER_SIZE(), добавляя оба значения к total_read.
len, следовательно, равен 0, вычитание под ним переносится, и нет __u32
DataOffset может превышать результат, поэтому проверка из коммита 097f5863b1a0
(«cifs: переполнение чтения в is_valid_oplock_break()») больше не отклоняет
что угодно.
Используйте total_read, который теперь сам по себе является длиной сообщения.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: smb: client: restore the data_offset bound in is_valid_oplock_break() Commit 83bfbd0bb902 ("cifs: Remove the RFC1002 header from smb_hdr") changed the quantity this bound is measured against. It used to be srv->total_read minus the 4-byte RFC1002 preamble that total_read then included, so it was the SMB message length. The same commit stopped counting the preamble, and the mechanical substitution to srv->total_read - srv->pdu_size left an expression that is identically zero: standard_receive3() reads MID_HEADER_SIZE() bytes and then exactly pdu_length - MID_HEADER_SIZE() more, adding both to total_read. len is therefore 0, the subtraction below it wraps, and no __u32 DataOffset can exceed the result, so the check from commit 097f5863b1a0 ("cifs: read overflow in is_valid_oplock_break()") no longer rejects anything. Use total_read, which is now the message length on its own.
Характеристики атаки
Последствия
Строка CVSS v3.1