Project

General

Profile

Actions

Security #6299

closed

mqtt pcap with anomalies takes too long to process because of app-layer-event detection

Added by Philippe Antoine over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Target version:
Affected Versions:
Label:
CVE:
Git IDs:

9240ae250cc369306803740279df2ab3eca6b54a
5bb8800588e7b4a09e1770f049cd88be71e2d30b
2fb50598f23b112f14ec15330e11c40b74caa35f
89936b6530690c6d03869b2ad8b82f9f84776f94

Severity:
CRITICAL
Disclosure Date:
12/25/2023

Description

Cf time ./src/suricata -r .lol.pcap -c suricata.yaml -S rules/mqtt-events.rules -l log -k none

Analysis :
- About 1000 MQTT transactions are created and not completed from client to server (with an anomaly unintroduced message)
- Server sends many packets with a 2 bytes of payload
- Client finally ACKS these packets, which create many transactions, with anomalies, and also triggering the MQTT transactions flush mechanism

Some possible solutions ?
- Decreasing yaml mqtt.max-tx to 64 decreases the time from one minute to 6 seconds
- DetectRunTx should not inspect the transactions that have not been modified by the current packet

Victor, thoughts about this ?


Files

lol.pcap (1.43 MB) lol.pcap Philippe Antoine, 09/07/2023 08:10 AM
httpslow.pcap (1.35 MB) httpslow.pcap Philippe Antoine, 09/18/2023 11:26 AM

Subtasks 1 (0 open1 closed)

Security #6539: mqtt pcap with anomalies takes too long to process (7.0.x backport)ClosedPhilippe AntoineActions

Related issues 3 (0 open3 closed)

Related to Suricata - Security #5921: http1: configurable limit for maximum number of live transactions per flowClosedPhilippe AntoineActions
Related to Suricata - Optimization #4749: app-layer: track changed txs for detect and loggingClosedActions
Related to Suricata - Optimization #6728: detect: prefilter for events (decode, stream, app-layer, etc...)ClosedPhilippe AntoineActions
Actions

Also available in: Atom PDF