Commit 5288b17e authored by David S. Miller's avatar David S. Miller

[NETFILTER]: Fix off-by-one test error in ip_tables.c

Bug noticed by Ysauyuki Kozakai.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a7a21b4d
......@@ -1534,7 +1534,7 @@ tcp_match(const struct sk_buff *skb,
IPT_TCP_INV_FLAGS))
return 0;
if (tcpinfo->option) {
if (th->doff * 4 < sizeof(_tcph)) {
if (th->doff * 4 <= sizeof(_tcph)) {
*hotdrop = 1;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment