summaryrefslogtreecommitdiff
path: root/net/econet
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2010-11-24 11:49:53 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-09 13:27:12 -0800
commit667b9703cf420799a25d816fdfd376a00e7ca0ae (patch)
tree0eca2929d95780a5a5a7962fee7ab42955c99b00 /net/econet
parent72013721bd096ae0bb46cec1db71d4161db32eac (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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/econet')
-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 be58cea9e165..85672e7cb69c 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -659,6 +659,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. */