]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: ipt_CLUSTERIP: fix buffer overflow
authorVasiliy Kulikov <segoon@openwall.com>
Sun, 20 Mar 2011 14:42:52 +0000 (15:42 +0100)
committerPatrick McHardy <kaber@trash.net>
Sun, 20 Mar 2011 14:42:52 +0000 (15:42 +0100)
commitb9a688876363f85414dcba4177b15c7a17131202
tree7bf0a65c184a2c4fc0571ff9af8ce633efc73bcf
parentadabe6617e018da265434a9377f5d7ff68908cda
netfilter: ipt_CLUSTERIP: fix buffer overflow

'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>
net/ipv4/netfilter/ipt_CLUSTERIP.c