summaryrefslogtreecommitdiff
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:24:21 -0800
commit4cdc2eff54305fe4ac976f091ab2ad8952100f1a (patch)
tree3dac302737d8fe8c2dc12c0bfdf6ca78efeb9694
parentb13ca1096cc1e5563fbf551d4ffb27798e0d731e (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>
-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 2b6c4dc29acf..2aa178658531 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. */