]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1792 in SNORT/snort3 from ~DERAMADA/snort3:h2i_abort_bad_preface...
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Mon, 14 Oct 2019 14:55:33 +0000 (10:55 -0400)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Mon, 14 Oct 2019 14:55:33 +0000 (10:55 -0400)
Squashed commit of the following:

commit fbb4311a964018530e8880d0b5080be3238ae2cf
Author: deramada <deramada@cisco.com>
Date:   Wed Oct 9 13:39:12 2019 -0400

    http2_inspect: Abort on bad connection preface

src/service_inspectors/http2_inspect/http2_stream_splitter_impl.cc

index eae9fcb60cea9c935cb65a9013b98a2afb4a5762..cca653ebaacac9bd27565e722d287dbe586ba173 100644 (file)
@@ -88,10 +88,7 @@ StreamSplitter::Status implement_scan(Http2FlowData* session_data, const uint8_t
                 break;
             case V_BAD:
                 session_data->events[source_id]->create_event(EVENT_PREFACE_MATCH_FAILURE);
-                // FIXIT-H: Workaround till abort is implemented
-                if((session_data->octets_seen[source_id] + length) >= 24)
-                    break;
-                // Falls through
+                return StreamSplitter::ABORT;
             case V_TBD:
                 session_data->octets_seen[source_id] += length;
                 return StreamSplitter::SEARCH;