DivestOS/Patches/Linux_CVEs/CVE-2015-0571/qcacld-2.0/0011.patch
2017-11-07 18:55:10 -05:00

39 lines
1.4 KiB
Diff

From 9eeafd788f53cc37c169b299f91ca9c558b228f9 Mon Sep 17 00:00:00 2001
From: Mukul Sharma <mukul@qti.qualcomm.com>
Date: Tue, 27 Oct 2015 23:54:05 +0530
Subject: wlan:Check priviledge permission for CLEAR_MCBC_FILTER IOCTL
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 CLEAR_MCBC_FILTER IOCTL, making
sure user task has right permission to process the command.
Change-Id: I9b50fcc0eeb1c1eb3493eab573f4421b52f0ea9a
CRs-Fixed: 930954
---
CORE/HDD/src/wlan_hdd_wext.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index b7448c3..c1ba718 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -9458,6 +9458,12 @@ static int __iw_clear_dynamic_mcbc_filter(struct net_device *dev,
tpSirWlanSetRxpFilters wlanRxpFilterParam;
ENTER();
+
+ if (!capable(CAP_NET_ADMIN)) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ FL("permission check failed"));
+ return -EPERM;
+ }
//Reset the filter to INI value as we have to clear the dynamic filter
pHddCtx->configuredMcastBcastFilter = pHddCtx->cfg_ini->mcastBcastFilterSetting;
--
cgit v1.1