]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
econet: fix CVE-2010-3850
authorPhil Blundell <philb@gnu.org>
Wed, 24 Nov 2010 19:49:53 +0000 (11:49 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:27:12 +0000 (13:27 -0800)
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>
net/econet/af_econet.c

index be58cea9e165e9392d4d790ace77dcc7e3f882a8..85672e7cb69cbbc9a9b071d02501ca5eda27d261 100644 (file)
@@ -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. */