]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: do not bug on tx data being NULL 13102/head 13110/head
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 28 Apr 2025 08:56:54 +0000 (10:56 +0200)
committerPhilippe Antoine <pantoine@oisf.net>
Mon, 28 Apr 2025 11:33:24 +0000 (13:33 +0200)
Ticket: 7610

As this can happen for HTTP1 in Suricata 7

This was fixed in Suricata 8 by f301cd370205af7e069680c286252304ab128214
and 833a738dd1429f63c79d95edf25bb86fcc15b51a from ticket 5739

src/detect-engine-state.c
src/detect-filestore.c

index 6fd7f96e58be0ad049d22c8ba1d3858a6c95fca5..2d7387b2c9ec21741a34f2bb3f050bfa26411562 100644 (file)
@@ -228,7 +228,6 @@ void DetectRunStoreStateTx(
         const uint16_t file_no_match)
 {
     AppLayerTxData *tx_data = AppLayerParserGetTxData(f->proto, f->alproto, tx);
-    BUG_ON(tx_data == NULL);
     if (tx_data == NULL) {
         SCLogDebug("No TX data for %" PRIu64, tx_id);
         return;
@@ -284,7 +283,6 @@ void DetectEngineStateResetTxs(Flow *f)
         void *inspect_tx = AppLayerParserGetTx(f->proto, f->alproto, alstate, inspect_tx_id);
         if (inspect_tx != NULL) {
             AppLayerTxData *txd = AppLayerParserGetTxData(f->proto, f->alproto, inspect_tx);
-            BUG_ON(txd == NULL);
             if (txd) {
                 ResetTxState(txd->de_state);
             }
index c905f9b88d48a16a4fcc1d90078c0c7c978ebaa0..d110efce7d2ee9148881e16f2b34c16a9adbb11f 100644 (file)
@@ -159,7 +159,6 @@ static int FilestorePostMatchWithOptions(Packet *p, Flow *f, const DetectFilesto
         DEBUG_VALIDATE_BUG_ON(txv == NULL);
         if (txv != NULL) {
             AppLayerTxData *txd = AppLayerParserGetTxData(f->proto, f->alproto, txv);
-            DEBUG_VALIDATE_BUG_ON(txd == NULL);
             if (txd != NULL) {
                 if (toclient_dir) {
                     txd->file_flags |= FLOWFILE_STORE_TC;