aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerry Lee <jerrylee@broadcom.com>2016-04-15 12:57:05 -0700
committerZiyan <jaraidaniel@gmail.com>2016-10-29 01:34:14 +0200
commit418c398e20bddb649fe1e844ddea4c781753f70a (patch)
tree8b3d9b539b9e960072c3723a351631b8abd7c9a9
parent2846046f71d9d10b70b5b4a660f33c92022d66c8 (diff)
downloadkernel_samsung_tuna-418c398e20bddb649fe1e844ddea4c781753f70a.zip
kernel_samsung_tuna-418c398e20bddb649fe1e844ddea4c781753f70a.tar.gz
kernel_samsung_tuna-418c398e20bddb649fe1e844ddea4c781753f70a.tar.bz2
net: wireless: bcmdhd: check privilege on priv cmd
check net admin capability for ioctl calls BUG=26425765 Change-Id: Idae75c9fc530add3ead3508d25e994bbfec9a6de
-rw-r--r--drivers/net/wireless/bcmdhd/wl_android.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcmdhd/wl_android.c b/drivers/net/wireless/bcmdhd/wl_android.c
index 742d873..e345183 100644
--- a/drivers/net/wireless/bcmdhd/wl_android.c
+++ b/drivers/net/wireless/bcmdhd/wl_android.c
@@ -843,6 +843,10 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
ret = -EINVAL;
goto exit;
}
+ if (!capable(CAP_NET_ADMIN)) {
+ ret = -EPERM;
+ goto exit;
+ }
if (copy_from_user(&priv_cmd, ifr->ifr_data, sizeof(android_wifi_priv_cmd))) {
ret = -EFAULT;
goto exit;