mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Check privilege permission for SET_VAR_INTS_GETNONE
qcacld-2.0 to qcacld-3.0 propagation Kernel assumes all SET IOCTL commands are assigned with even numbers. But in our WLAN driver, some SET IOCTLS are assigned with odd numbers. This leads kernel fail to check, for some SET IOCTLs, whether user has the right permission to do SET operation. Hence, in driver, before processing SET_VAR_INTS_GETNONE, making sure user task has right permission to process the command. Change-Id: Icbdfe69c18c1ab3b75d63e046d5251307a794817 CRs-Fixed: 930942
This commit is contained in:
parent
a42b062623
commit
64a70e8c02
1 changed files with 6 additions and 0 deletions
|
|
@ -7883,6 +7883,12 @@ static int iw_hdd_set_var_ints_getnone(struct net_device *dev,
|
|||
int apps_args[MAX_VAR_ARGS] = {0};
|
||||
int ret, num_args;
|
||||
|
||||
if (!capable(CAP_NET_ADMIN)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("permission check failed"));
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
/* Helper function to get iwreq_data with compat handling. */
|
||||
if (hdd_priv_get_data(&u_priv_wrqu.data, wrqu))
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue