netfilter: nft_compat: check match/targetinfo attr size
authorFlorian Westphal <fw@strlen.de>
Tue, 8 Mar 2016 23:04:21 +0000 (00:04 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 11 Mar 2016 10:37:56 +0000 (11:37 +0100)
commitf0716cd6eb89f769bff3b37120219720c994bb7e
treedfc12f5f0d234f4f6a8efb9e8b0299d485e29ea3
parentd387eaf51f8c869a41d90474d3599d1e89826254
netfilter: nft_compat: check match/targetinfo attr size

We copy according to ->target|matchsize, so check that the netlink attribute
(which can include padding and might be larger) contains enough data.

Reported-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_compat.c