netfilter: ctnetlink: don't permit ct creation with random tuple
authorFlorian Westphal <fw@strlen.de>
Mon, 11 Feb 2013 23:22:38 +0000 (23:22 +0000)
committerPablo Neira Ayuso <pablo@gnumonks.org>
Tue, 12 Feb 2013 22:18:15 +0000 (23:18 +0100)
commit442fad9423b78319e0019a7f5047eddf3317afbc
tree7668d4cdb5ba8400065f8464d708b9541e61a073
parent547b4e718115eea74087e28d7fa70aec619200db
netfilter: ctnetlink: don't permit ct creation with random tuple

Userspace can cause kernel panic by not specifying orig/reply
tuple: kernel will create a tuple with random stack values.

Problem is that tuple.dst.dir will be random, too, which
causes nf_ct_tuplehash_to_ctrack() to return garbage.

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