]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: remove useless U8_MAX validation
authorLiping Zhang <zlpnobody@gmail.com>
Sat, 29 Oct 2016 13:56:27 +0000 (21:56 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 1 Nov 2016 19:50:32 +0000 (20:50 +0100)
commitba9a01cdf1deb091a706ccbdaa96859528c0ada7
tree6228a3a577106b902c87388b18f603d5b733f41b
parent94919d09a7c7d4b285e82233611c177ff52c7716
netfilter: nf_tables: remove useless U8_MAX validation

After call nft_data_init, size is already validated and desc.len will
not exceed the sizeof(struct nft_data), i.e. 16 bytes. So it will never
exceed U8_MAX.

Furthermore, in nft_immediate_init, we forget to call nft_data_uninit
when desc.len exceeds U8_MAX, although this will not happen, but it's
a logical mistake.

Now remove these redundant validation introduced by commit 848a218f9363
("netfilter: nf_tables: validate maximum value of u32 netlink attributes")

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_cmp.c
net/netfilter/nft_immediate.c