netfilter: x_tables: introduce and use xt_copy_counters_from_user 29/154929/2
authorFlorian Westphal <fw@strlen.de>
Fri, 1 Apr 2016 13:37:59 +0000 (15:37 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 11 Oct 2017 11:56:21 +0000 (11:56 +0000)
commit2d0539cd6b7e4f6a315fa8cccf7586ba126edae8
treef5e6e5d56e667885835c9cef37e1987daa492213
parentd97f9b7c10460a4f7568f33f911885b827e7ada0
netfilter: x_tables: introduce and use xt_copy_counters_from_user

commit 63ecb81aadf1c823c85c70a2bfd1ec9df3341a72 upstream.

commit d7591f0c41ce3e67600a982bab6989ef0f07b3ce upstream

The three variants use same copy&pasted code, condense this into a
helper and use that.

Make sure info.name is 0-terminated.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[sw0312.kim: cherry-pick from linux-3.10.y to apply CVE]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I64d4524e176a4abd43a3ba4a80a8e29668434bbc
include/linux/netfilter/x_tables.h
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/x_tables.c