qcacld-3.0: Check privilege permission for SET_CHAR_GET_NONE
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_CHAR_GET_NONE IOCTLs, making sure user task has right permission to process the command. Change-Id: I7b060bcdc84f7016e8d301e994437a535533a260 CRs-Fixed: 930935
This commit is contained in:

committed by
Prakash Dhavali

parent
744420f213
commit
34777c6cf3
@@ -6121,6 +6121,12 @@ static int __iw_setchar_getnone(struct net_device *dev,
|
||||
#endif /* WLAN_FEATURE_VOWIFI */
|
||||
struct iw_point s_priv_data;
|
||||
|
||||
if (!capable(CAP_NET_ADMIN)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("permission check failed"));
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user