summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2010-11-24 11:49:53 -0800
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-04-17 16:15:59 -0400
commit623da35398c12085a237fc985613c7fe2b0a5a1a (patch)
tree78ed877f92939e8b7c9485f4fad99cf88628cca2 /net
parent4b26a9cc1ed74cb87c24830de097aebb08234b81 (diff)
econet: fix CVE-2010-3850
commit 16c41745c7b92a243d0874f534c1655196c64b74 upstream. Add missing check for capable(CAP_NET_ADMIN) in SIOCSIFADDR operation. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/econet/af_econet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 8170acbe280d..cd62e27035ef 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -661,6 +661,9 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
err = 0;
switch (cmd) {
case SIOCSIFADDR:
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
+
edev = dev->ec_ptr;
if (edev == NULL) {
/* Magic up a new one. */