diff options
author | Jerry Lee <jerrylee@broadcom.com> | 2016-04-15 12:57:05 -0700 |
---|---|---|
committer | Simon Shields <keepcalm444@gmail.com> | 2016-06-08 19:17:31 +1000 |
commit | d37f93f0308351614ce5bf06a2eb9fd655f96c5a (patch) | |
tree | 2537c773f445b2c8aac4cdf2d86182c0b8810f33 | |
parent | ba951bfe89181e1565eb2921e0ca545302840c0e (diff) | |
download | kernel_samsung_smdk4412-d37f93f0308351614ce5bf06a2eb9fd655f96c5a.zip kernel_samsung_smdk4412-d37f93f0308351614ce5bf06a2eb9fd655f96c5a.tar.gz kernel_samsung_smdk4412-d37f93f0308351614ce5bf06a2eb9fd655f96c5a.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.c | 4 |
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 7ac8f56..12f7b1d 100644 --- a/drivers/net/wireless/bcmdhd/wl_android.c +++ b/drivers/net/wireless/bcmdhd/wl_android.c @@ -2906,6 +2906,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; |