]> git.karo-electronics.de Git - karo-tx-linux.git/commit
netfilter: ipt_CLUSTERIP: fix buffer overflow
authorVasiliy Kulikov <segoon@openwall.com>
Sun, 20 Mar 2011 14:42:52 +0000 (15:42 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 14 Mar 2012 14:57:03 +0000 (10:57 -0400)
commit8bccc04c25e602cc26f1ba84af4b6b12dc50835f
treeeb439e4b118df16d3518fbe82b039463f69ff74b
parent27bd93e2e7df17970903d9f658964d6415fd25a6
netfilter: ipt_CLUSTERIP: fix buffer overflow

commit 961ed183a9fd080cf306c659b8736007e44065a5 upstream.

'buffer' string is copied from userspace.  It is not checked whether it is
zero terminated.  This may lead to overflow inside of simple_strtoul().
Changli Gao suggested to copy not more than user supplied 'size' bytes.

It was introduced before the git epoch.  Files "ipt_CLUSTERIP/*" are
root writable only by default, however, on some setups permissions might be
relaxed to e.g. network admin user.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/ipv4/netfilter/ipt_CLUSTERIP.c