Andrei Popa wrote:
The oops is reproducible by this script (yyy are some IP addresses): ... #$IPT -I INPUT -p tcp --dport 80 -m string --algo bm --string "$MyNick" -j DROP
I could reproduce it with an empty string - is $MyNick defined? Please try this patch.
diff --git a/lib/ts_bm.c b/lib/ts_bm.c index d90822c..5adb3ff 100644 --- a/lib/ts_bm.c +++ b/lib/ts_bm.c @@ -142,6 +142,9 @@ static struct ts_config *bm_init(const void *pattern, unsigned int len, unsigned int prefix_tbl_len = len * sizeof(unsigned int); size_t priv_size = sizeof(*bm) + len + prefix_tbl_len; + if (len == 0) + return ERR_PTR(-EINVAL); + conf = alloc_ts_config(priv_size, gfp_mask); if (IS_ERR(conf)) return conf;