]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
netfilter: x_tables: check standard target size too
authorFlorian Westphal <fw@strlen.de>
Fri, 1 Apr 2016 12:17:27 +0000 (14:17 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 13 Apr 2016 22:30:37 +0000 (00:30 +0200)
commit7ed2abddd20cf8f6bd27f65bd218f26fa5bf7f44
tree28bbf09d58ac4eb90e1912e6f16d0bc7809516f7
parentfc1221b3a163d1386d1052184202d5dc50d302d1
netfilter: x_tables: check standard target size too

We have targets and standard targets -- the latter carries a verdict.

The ip/ip6tables validation functions will access t->verdict for the
standard targets to fetch the jump offset or verdict for chainloop
detection, but this happens before the targets get checked/validated.

Thus we also need to check for verdict presence here, else t->verdict
can point right after a blob.

Spotted with UBSAN while testing malformed blobs.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/x_tables.c