summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Tourrilhes <jt@hpl.hp.com>2006-04-04 15:53:43 -0700
committerJohn W. Linville <linville@tuxdriver.com>2006-04-19 17:25:38 -0400
commita417016d1a07e6df0621dbb2926da82642eca823 (patch)
tree96384d34c27abae25f37b5b15b03e327b4a1a796
parent3a1af6ffe4941497071125d3a8bb3e1feee45df1 (diff)
downloadlinux-a417016d1a07e6df0621dbb2926da82642eca823.tar.gz
linux-a417016d1a07e6df0621dbb2926da82642eca823.tar.bz2
linux-a417016d1a07e6df0621dbb2926da82642eca823.zip
[PATCH] wext: Fix IWENCODEEXT security permissions
Check the permissions when user-space try to read the encryption parameters via SIOCGIWENCODEEXT. This is trivial and probably should go in 2.6.17... Bug was found by Brian Eaton <eaton.lists@gmail.com>, thanks ! Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/core/dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 83231a27ae02..3bad1afc89fa 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2698,7 +2698,8 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
/* If command is `set a parameter', or
* `get the encoding parameters', check if
* the user has the right to do it */
- if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE) {
+ if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE
+ || cmd == SIOCGIWENCODEEXT) {
if (!capable(CAP_NET_ADMIN))
return -EPERM;
}