aboutsummaryrefslogtreecommitdiff
path: root/net/econet/af_econet.c
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2010-11-24 11:49:53 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-21 12:44:18 -0700
commite2ebf28f8733a1cc3539a02e6c07e08e9eff9962 (patch)
tree8a5ff279000b9084d04a9628740ab424178bb599 /net/econet/af_econet.c
parent8db8568ebd04b53744abdb0ecdbac41a4f866523 (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/af_econet.c')
-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 6153ec9a547..bc48a6b69cc 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -660,6 +660,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. */