]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
kerberos: fix probing parser tag condition
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 11 Mar 2021 15:12:36 +0000 (16:12 +0100)
committerShivani Bhardwaj <shivanib134@gmail.com>
Thu, 29 Apr 2021 10:00:31 +0000 (15:30 +0530)
according to the comment

(cherry picked from commit cb150e97d09baea09a738388426eafad3cccff2a)

rust/src/krb/krb5.rs

index 5c5975ef6f24870056e8fb63694291daccbdd1ba..323d429792c7853c0f33ff12f437214208b4d08b 100644 (file)
@@ -423,7 +423,7 @@ pub extern "C" fn rs_krb5_probing_parser(_flow: *const Flow,
             // Kerberos messages start with an APPLICATION header
             if hdr.class != BerClass::Application { return unsafe{ALPROTO_FAILED}; }
             // Tag number should be <= 30
-            if hdr.tag.0 >= 30 { return unsafe{ALPROTO_FAILED}; }
+            if hdr.tag.0 > 30 { return unsafe{ALPROTO_FAILED}; }
             // Kerberos messages contain sequences
             if rem.is_empty() || rem[0] != 0x30 { return unsafe{ALPROTO_FAILED}; }
             // Check kerberos version