Bug #4530
closedDOS Quadratic complexity when having too many transactions
Description
Kind of found by oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35195
This is true for protocols such as MQTT, Modbus or HTTP2, where each packet/PDU has a transaction identifier (called stream for HTTP2), and we loop over our whole list of transactions to find the right one.
Attack si to start many requests, and do not finish them, so that Suricata keeps them.
There may be more protocols
Updated by Philippe Antoine over 3 years ago
- Private changed from Yes to No
Updated by Philippe Antoine about 3 years ago
- Related to Task #4721: http2: enable by default added
Updated by Philippe Antoine about 3 years ago
See https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39774 for MQTT variant
Updated by Philippe Antoine about 3 years ago
Another fix could be to have a hash table instead of a list for transactions for MQTT and such...
Updated by Shivani Bhardwaj almost 3 years ago
Philippe Antoine wrote in #note-5:
Another fix could be to have a hash table instead of a list for transactions for MQTT and such...
I remember having come up with this and then Jeff also suggested it long ago. Don't recall the reason why it was not considered though. Maybe Jeff does..
Updated by Philippe Antoine almost 3 years ago
https://github.com/OISF/suricata/pull/6906 got merged
Now, we still need to add this check to the fuzz target and fix the other protocols cf https://github.com/OISF/suricata/pull/6863
Updated by Philippe Antoine almost 3 years ago
- Status changed from In Review to Closed
Finished with https://github.com/OISF/suricata/pull/7005
Updated by Philippe Antoine over 2 years ago
- Related to Security #5399: mqtt: DOS by quadratic with too many transactions in one parse added