summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2014-11-07 15:34:54 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-11-10 17:56:28 +0100
commit6b96686ecffcbea85dcb502e4584e4a20a2bfb29 (patch)
tree666edf967cb68e4feb50b1ffc745c34abf9a4c9b /net/ipv6
parentd52fdbb735c36a209f36a628d40ca9185b349ba7 (diff)
downloadlinux-6b96686ecffcbea85dcb502e4584e4a20a2bfb29.tar.gz
linux-6b96686ecffcbea85dcb502e4584e4a20a2bfb29.tar.bz2
linux-6b96686ecffcbea85dcb502e4584e4a20a2bfb29.zip
netfilter: nft_masq: fix uninitialized range in nft_masq_{ipv4, ipv6}_eval
When transferring from the original range in nf_nat_masquerade_{ipv4,ipv6}() we copy over values from stack in from min_proto/max_proto due to uninitialized range variable in both, nft_masq_{ipv4,ipv6}_eval. As we only initialize flags at this time from nft_masq struct, just zero out the rest. Fixes: 9ba1f726bec09 ("netfilter: nf_tables: add new nft_masq expression") Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/nft_masq_ipv6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/netfilter/nft_masq_ipv6.c b/net/ipv6/netfilter/nft_masq_ipv6.c
index 8a7ac685076d..529c119cbb14 100644
--- a/net/ipv6/netfilter/nft_masq_ipv6.c
+++ b/net/ipv6/netfilter/nft_masq_ipv6.c
@@ -25,6 +25,7 @@ static void nft_masq_ipv6_eval(const struct nft_expr *expr,
struct nf_nat_range range;
unsigned int verdict;
+ memset(&range, 0, sizeof(range));
range.flags = priv->flags;
verdict = nf_nat_masquerade_ipv6(pkt->skb, &range, pkt->out);