ipt_SYNPROXY: kernel panic caused by nullpointer dereference
Subsystems (2)
hi,
when activating ipt_SYNPROXY with:
iptables -t raw -A PREROUTING -p tcp -d 1.2.3.4 --dport 80 --tcp-flags SYN,ACK,RST,FIN SYN -j SYNPROXY
and sending a SYN packet to port 80:
hping3 -S -d 64 1.2.3.4 -p 80
I get kernel panic:
http://goo.gl/L6dCz6
I'm using kernel v3.12.2 and iptables v1.4.21. Am I doing something wrong, or is it a bug?
thank you for help beforehand :)
greetings,
nicki
Pablo Neira Ayuso
maintainerQuoted 6 lines · Nicki P.
hi,
when activating
ipt_SYNPROXYwith:
iptables -t raw -A PREROUTING -p tcp -d 1.2.3.4 --dport 80 --tcp-flags SYN,ACK,RST,FIN SYN -j SYNPROXY
Quoted 8 lines
and sending a SYN packet to port 80:
hping3 -S -d 64 1.2.3.4 -p 80I get kernel panic:
http://goo.gl/L6dCz6I'm using kernel v3.12.2 and iptables v1.4.21. Am I doing something wrong, or is it a bug?
You have to run this from the INPUT/FORWARD chain, SYNPROXY needs the routing information to work.
Quoted 10 lines · Pablo Neira Ayuso
Quoted 9 lines · Nicki P.
hi,
when activating
ipt_SYNPROXYwith:
iptables -t raw -A PREROUTING -p tcp -d 1.2.3.4 --dport 80 --tcp-flags SYN,ACK,RST,FIN SYN -j SYNPROXYand sending a SYN packet to port 80:
hping3 -S -d 64 1.2.3.4 -p 80
Quoted 8 lines
Quoted 5 lines
I get kernel panic:
http://goo.gl/L6dCz6I'm using kernel v3.12.2 and iptables v1.4.21. Am I doing something wrong, or is it a bug?
You have to run this from the INPUT/FORWARD chain, SYNPROXY needs the routing information to work.
Let's fix that:
Quoted 1 line
From
e5b31e75df3c3f9629900016a95336c04165d13fMon Sep 17 00:00:00 2001
From: Patrick McHardy <[email protected]>
Date: Sun, 8 Dec 2013 16:49:36 +0000
Subject: [PATCH] netfilter: SYNPROXY target: restrict to INPUT/FORWARD
Fix a crash in synproxy_send_tcp() when using the SYNPROXY target in the PREROUTING chain caused by missing routing information.
--- net/ipv4/netfilter/ipt_SYNPROXY.c | 1 + net/ipv6/netfilter/ip6t_SYNPROXY.c | 1 + 2 files changed, 2 insertions(+)
net/ipv4/netfilter/ipt_SYNPROXY.c +1 -0
@@ -423,6 +423,7 @@ static void synproxy_tg4_destroy(const struct xt_tgdtor_param *par)static struct xt_target synproxy_tg4_reg__read_mostly = { .name ="SYNPROXY" , .family =NFPROTO_IPV4 , + .hooks = (1 <<NF_INET_LOCAL_IN ) | (1 <<NF_INET_FORWARD ), .target = synproxy_tg4, .targetsize =sizeof (struct xt_synproxy_info ), .checkentry = synproxy_tg4_check,
net/ipv6/netfilter/ip6t_SYNPROXY.c +1 -0
@@ -446,6 +446,7 @@ static void synproxy_tg6_destroy(const struct xt_tgdtor_param *par)static struct xt_target synproxy_tg6_reg__read_mostly = { .name ="SYNPROXY" , .family =NFPROTO_IPV6 , + .hooks = (1 <<NF_INET_LOCAL_IN ) | (1 <<NF_INET_FORWARD ), .target = synproxy_tg6, .targetsize =sizeof (struct xt_synproxy_info ), .checkentry = synproxy_tg6_check,
Signature · 1 line
1.8.3.1
Quoted 22 lines · Patrick McHardy
Quoted 10 lines · Pablo Neira Ayuso
Quoted 9 lines · Nicki P.
hi,
when activating
ipt_SYNPROXYwith:
iptables -t raw -A PREROUTING -p tcp -d 1.2.3.4 --dport 80 --tcp-flags SYN,ACK,RST,FIN SYN -j SYNPROXYand sending a SYN packet to port 80:
hping3 -S -d 64 1.2.3.4 -p 80Quoted 8 lines
Quoted 5 lines
I get kernel panic:
http://goo.gl/L6dCz6I'm using kernel v3.12.2 and iptables v1.4.21. Am I doing something wrong, or is it a bug?
You have to run this from the INPUT/FORWARD chain, SYNPROXY needs the routing information to work.
Let's fix that:
Quoted 7 lines
From
e5b31e75df3c3f9629900016a95336c04165d13fMon Sep 17 00:00:00 2001
From: Patrick McHardy <[email protected]>
Date: Sun, 8 Dec 2013 16:49:36 +0000
Subject: [PATCH] netfilter: SYNPROXY target: restrict to INPUT/FORWARDFix a crash in
synproxy_send_tcp()when using the SYNPROXY target in the PREROUTING chain caused by missing routing information.
Applied, thanks Patrick!