]> www.infradead.org Git - users/jedix/linux-maple.git/commit
netfilter: x_tables: validate all offsets and sizes in a rule
authorFlorian Westphal <fw@strlen.de>
Fri, 1 Apr 2016 12:17:29 +0000 (14:17 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 30 Sep 2016 06:05:45 +0000 (23:05 -0700)
commite89f33af509bc678338c1b14dee09e2f91ece3a5
treecd5b02e7a31e58d6f47bca358dba71f2f1527d63
parent5ca4f85e2387fd97d8685637a3ab796bfcc2a36a
netfilter: x_tables: validate all offsets and sizes in a rule

Orabug: 24690280
CVE: CVE-2016-3134

[ Upstream commit 13631bfc604161a9d69cd68991dff8603edd66f9 ]

Validate that all matches (if any) add up to the beginning of
the target and that each match covers at least the base structure size.

The compat path should be able to safely re-use the function
as the structures only differ in alignment; added a
BUILD_BUG_ON just in case we have an arch that adds padding as well.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit a605e7476c66a13312189026e6977bad6ed3050d)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
net/netfilter/x_tables.c