mirror of https://github.com/OISF/suricata
ssl: fix SSLv2 CLIENT_HELLO underflow
SSLv2Decode() consumed six fixed CLIENT_HELLO body bytes (version + cipher_spec_length + session_id_length) guarded only by input_len >= 6, which checks the buffer remainder but not the record itself. When an attacker sends a record whose declared record_length is < 7 (e.g. 1), bytes_processed advances past record_lengths_length + record_length, leading an integer underflow. Address by adding a record_length >= 7 check to the CLIENT_HELLO case. Also add another check: bail if bytes_processed > record_length + record_lengths_length. Ticket: #8853.pull/16192/head
parent
201ecd5618
commit
928ac01215
Loading…
Reference in New Issue