aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorPhil Oester <kernel@linuxace.com>2013-06-12 04:58:20 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2013-06-12 05:06:19 -0400
commitb396966c4688522863572927cb30aa874b3ec504 (patch)
tree2ab7edf42c311da4d04b33788c76cca272e730fa /net/netfilter
parent70d19f805f8c047fc0a28dec9306b3773971c8d9 (diff)
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: Phil Oester <kernel@linuxace.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/xt_TCPMSS.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
index 6640a224f9fb..7011c71646f0 100644
--- a/net/netfilter/xt_TCPMSS.c
+++ b/net/netfilter/xt_TCPMSS.c
@@ -57,6 +57,10 @@ tcpmss_mangle_packet(struct sk_buff *skb,
57 u16 newmss; 57 u16 newmss;
58 u8 *opt; 58 u8 *opt;
59 59
60 /* This is a fragment, no TCP header is available */
61 if (par->fragoff != 0)
62 return XT_CONTINUE;
63
60 if (!skb_make_writable(skb, skb->len)) 64 if (!skb_make_writable(skb, skb->len))
61 return -1; 65 return -1;
62 66