]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fuzz: remove check about max transactions
authorPhilippe Antoine <pantoine@oisf.net>
Thu, 16 Jun 2022 08:58:42 +0000 (10:58 +0200)
committerVictor Julien <vjulien@oisf.net>
Thu, 25 Aug 2022 10:42:52 +0000 (12:42 +0200)
Suricata can indeed pipeline many HTTP1 transactions

src/tests/fuzz/fuzz_applayerparserparse.c

index b1bfdbdee1534458137104f32407df9b7465a7e6..a7c7653673de4a3802d9f8ee290c74b499376c3a 100644 (file)
@@ -170,31 +170,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
             }
 
             AppLayerParserTransactionsCleanup(f);
-
-            if (f->alstate && f->alparser) {
-                // check if we have too many open transactions
-                const uint64_t total_txs = AppLayerParserGetTxCnt(f, f->alstate);
-                uint64_t min = 0;
-                AppLayerGetTxIterState state;
-                memset(&state, 0, sizeof(state));
-                uint64_t nbtx = 0;
-                AppLayerGetTxIteratorFunc IterFunc = AppLayerGetTxIterator(f->proto, f->alproto);
-                while (1) {
-                    AppLayerGetTxIterTuple ires =
-                            IterFunc(f->proto, f->alproto, f->alstate, min, total_txs, &state);
-                    if (ires.tx_ptr == NULL)
-                        break;
-                    min = ires.tx_id + 1;
-                    nbtx++;
-                    if (nbtx > ALPROTO_MAXTX) {
-                        printf("Too many open transactions for protocol %s\n",
-                                AppProtoToString(f->alproto));
-                        printf("Assertion failure: %s\n", AppProtoToString(f->alproto));
-                        fflush(stdout);
-                        abort();
-                    }
-                }
-            }
         }
         alsize -= alnext - albuffer + 4;
         albuffer = alnext + 4;