From: Victor Julien Date: Wed, 25 Apr 2018 15:23:45 +0000 (+0200) Subject: hyperscan: don't abort on payloads > 64k X-Git-Tag: suricata-4.0.5~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4af55a586b01083bfff44dcebff0b58909abdfd7;p=thirdparty%2Fsuricata.git hyperscan: don't abort on payloads > 64k SPM API was recently updated to accept 32 bit length fields instead of 16 bits. This could trigger a BUG_ON in the hyperscan implementation. --- diff --git a/src/util-spm-hs.c b/src/util-spm-hs.c index b45dc8d936..747a5d423e 100644 --- a/src/util-spm-hs.c +++ b/src/util-spm-hs.c @@ -161,7 +161,6 @@ static uint8_t *HSScan(const SpmCtx *ctx, SpmThreadCtx *thread_ctx, } BUG_ON(match_offset < sctx->needle_len); - BUG_ON(match_offset > UINT16_MAX); /* haystack_len is a uint16_t */ /* Note: existing API returns non-const ptr */ return (uint8_t *)haystack + (match_offset - sctx->needle_len);