netfilter: nft_masq: fix uninitialized range in nft_masq_{ipv4, ipv6}_eval
authorDaniel Borkmann <dborkman@redhat.com>
Fri, 7 Nov 2014 14:34:54 +0000 (15:34 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 10 Nov 2014 16:56:28 +0000 (17:56 +0100)
commit6b96686ecffcbea85dcb502e4584e4a20a2bfb29
tree666edf967cb68e4feb50b1ffc745c34abf9a4c9b
parentd52fdbb735c36a209f36a628d40ca9185b349ba7
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>
net/ipv4/netfilter/nft_masq_ipv4.c
net/ipv6/netfilter/nft_masq_ipv6.c