net: wireless: bcmdhd: check privilege on priv cmd

(cherry pick from commit 7b4bd6e41ed514dddf9e403472b1fb6f808d3f4b)

check net admin capability for ioctl calls

Signed-off-by: Jerry Lee <jerrylee@broadcom.com>
Bug: 26425765
Bug: 27997075
Change-Id: Iae1b53aa62fdc24530bb1b85cb69740c87d182e9
CVE-2016-2475
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
This commit is contained in:
Jerry Lee
2019-08-06 12:17:43 +02:00
committed by Francescodario Cuzzocrea
parent 1e34588d49
commit ef2ddd6756
+5
View File
@@ -3574,6 +3574,11 @@ int wl_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit;
}
if (!capable(CAP_NET_ADMIN)) {
ret = -EPERM;
goto exit;
}
#ifdef CONFIG_COMPAT
if (is_compat_task()) {
compat_android_wifi_priv_cmd compat_priv_cmd;