mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
|
From 2f7ecc8b88843b3b53bd7d2328f0d53f3794f456 Mon Sep 17 00:00:00 2001
|
||
|
From: Amarnath Hullur Subramanyam <amarnath@codeaurora.org>
|
||
|
Date: Wed, 28 Oct 2015 21:17:28 -0700
|
||
|
Subject: wlan:Check priviledge permission for SET_THREE_INT_GET_NONE
|
||
|
|
||
|
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_THREE_INT_GET_NONE IOCTL,
|
||
|
making sure user task has right permission to process the command.
|
||
|
|
||
|
CRs-Fixed: 930948
|
||
|
Git-commit: aaeeed43f9597631982835481c7cf2621f6455f0
|
||
|
Bug: 25344453
|
||
|
Signed-off-by: Amarnath Hullur Subramanyam <amarnath@codeaurora.org>
|
||
|
---
|
||
|
drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c
|
||
|
index fc8c917..51b52f3 100644
|
||
|
--- a/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c
|
||
|
+++ b/drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_wext.c
|
||
|
@@ -6846,6 +6846,12 @@ int iw_set_three_ints_getnone(struct net_device *dev,
|
||
|
return -EBUSY;
|
||
|
}
|
||
|
|
||
|
+ if (!capable(CAP_NET_ADMIN)) {
|
||
|
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
|
||
|
+ FL("permission check failed"));
|
||
|
+ return -EPERM;
|
||
|
+ }
|
||
|
+
|
||
|
switch(sub_cmd) {
|
||
|
|
||
|
case WE_SET_WLAN_DBG:
|
||
|
--
|
||
|
cgit v1.1
|
||
|
|