]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
defrag: don't use trackers marked for removal
authorJason Ish <ish@unx.ca>
Mon, 15 Jun 2015 17:06:50 +0000 (11:06 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 8 Oct 2015 08:35:45 +0000 (10:35 +0200)
These trackers are likely for completed fragments, but have
not been cleaned up. If a packet on the same flow with an
already seen IP ID is seen, it could be reused prior to
being properly reinitialized.

src/defrag-hash.c

index 9cb377e5b3f2e3bf535b88da02d7152309aaa967..be2fd456ac84a629ff7cc059648984e3f002535d 100644 (file)
@@ -526,7 +526,7 @@ DefragTracker *DefragGetTrackerFromHash (Packet *p)
     dt = hb->head;
 
     /* see if this is the tracker we are looking for */
-    if (DefragTrackerCompare(dt, p) == 0) {
+    if (dt->remove || DefragTrackerCompare(dt, p) == 0) {
         DefragTracker *pdt = NULL; /* previous tracker */
 
         while (dt) {