diff options
author | Phil Blundell <philb@gnu.org> | 2010-11-24 11:49:53 -0800 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-12-14 23:40:17 +0100 |
commit | 5a7ce7c10112832aa73745faaca297844656138b (patch) | |
tree | f7c45124d0e460eaae72bbe782a13cc88a6fe460 | |
parent | 973a11aa7810c40a80ad064211fa157dd1921b37 (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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | net/econet/af_econet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 8170acbe280..cd62e27035e 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. */ |