]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_compat: do not dump private area
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 9 Oct 2018 18:06:36 +0000 (20:06 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 11 Oct 2018 09:29:53 +0000 (11:29 +0200)
commite1284e61bd5bc064496bda9659b6872be6c2fcdc
tree7a3d7c8160dda988d6c0f2b52f9cd6ca576dd15b
parent2a70ef05e275d779a59ee24eaca11c513623a912
netfilter: nft_compat: do not dump private area

Zero pad private area, otherwise we expose private kernel pointer to
userspace. This patch also zeroes the tail area after the ->matchsize
and ->targetsize that results from XT_ALIGN().

Fixes: ff4564a5c9cc ("netfilter: nf_tables: add compatibility layer for x_tables")
Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_compat.c