]> git.ipfire.org Git - thirdparty/suricata.git/commit
flow-timeout: fix memory errors on flow bypass 2367/head
authorVictor Julien <victor@inliniac.net>
Wed, 19 Oct 2016 10:52:46 +0000 (12:52 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 19 Oct 2016 10:58:19 +0000 (12:58 +0200)
commit7e54ee7d0e7dac51c7436724961fdba78af85561
treed360c50888fdf679dce654d09f10317686446e89
parentd1d618a668df1337cf1be268c640f5687f93fc6f
flow-timeout: fix memory errors on flow bypass

For flow bypass, the flow timeout handling is triggered which may
create up to 3 pseudo packets that hold a reference to the flow.
However, in the bypass case the code signaled to the timeout logic
that the flow can be freed unconditionally by returning 1. This
lead to packets going through the engine with a pointer to a now
freed/recycled flow.

This patch fixes the logic by removing the special bypass case,
which seemed redundant anyway. Effectively reverts 68d9677.

Bug #1928.
src/flow-manager.c