Skip to content

Commit

Permalink
econet: fix CVE-2010-3850
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Phil Blundell authored and David S. Miller committed Nov 24, 2010
1 parent fa0e846 commit 16c4174
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/econet/af_econet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 16c4174

Please sign in to comment.