mirror of https://github.com/OISF/suricata
detect/firewall: sweep defaults up to progress
When the tx progress crosses more than one app state and the last rule for a direction sits below the current progress, the no-match path set fw_next_progress_missing but never applied the default policies of the states in between (only the match path did). With the hello phase now entered at the start of the message, the record that completes a hello walks over hello -> cert: without the missing-state policies a packet whose last rule was at a lower hook was decided by the packet default policy even though the app policy for the current state says accept. Apply the missing-state policies up to the final state on the no-match path as well, mirroring the match path - but only when the policy of the current hook does not already carry the verdict: an accept with tx or flow scope has decided the flow, and sweeping the config-less states above it would hit the implicit drop:flow default and kill a flow the rule just accepted. Bound the sweep at the state the packet actually reached (tx_progress), at both call sites: a state beyond the current progress was not walked over, so its configured default must not decide this packet. Also make a drop from the no-match sweep end the walk, like a policy drop at the current hook does. Ticket: #9047.pull/16368/head
parent
fa695d3563
commit
76f7871783
Loading…
Reference in New Issue