Commit b396966c authored by Phil Oester's avatar Phil Oester Committed by Pablo Neira Ayuso

netfilter: xt_TCPMSS: Fix missing fragmentation handling

Similar to commit bc6bcb59 ("netfilter: xt_TCPOPTSTRIP: fix
possible mangling beyond packet boundary"), add safe fragment
handling to xt_TCPMSS.
Signed-off-by: default avatarPhil Oester <kernel@linuxace.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 70d19f80
...@@ -57,6 +57,10 @@ tcpmss_mangle_packet(struct sk_buff *skb, ...@@ -57,6 +57,10 @@ tcpmss_mangle_packet(struct sk_buff *skb,
u16 newmss; u16 newmss;
u8 *opt; u8 *opt;
/* This is a fragment, no TCP header is available */
if (par->fragoff != 0)
return XT_CONTINUE;
if (!skb_make_writable(skb, skb->len)) if (!skb_make_writable(skb, skb->len))
return -1; return -1;
......
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