mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
qcacld-3.0: Avoid illegal memory access
Currently In os_if_monitor_mode_configure API, tb attribute is getting accessed before parsing the data coming from userspace. This is leading to illegal memory access. Move tb attribute access after parsing userspace data with API wlan_cfg80211_nla_parse. Change-Id: Ia972ebb87e18ed82c6c3a2ff3ce2d10a4b9685b9 CRs-Fixed: 3241952
This commit is contained in:
parent
48d9d51bfa
commit
e07f7f3ccb
1 changed files with 4 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -74,10 +75,6 @@ QDF_STATUS os_if_monitor_mode_configure(struct hdd_adapter *adapter,
|
|||
QDF_STATUS status;
|
||||
|
||||
os_if_pkt_enter();
|
||||
|
||||
if (tb[SET_MONITOR_MODE_INVALID])
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
vdev = hdd_objmgr_get_vdev(adapter);
|
||||
if (!vdev)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
|
@ -89,6 +86,9 @@ QDF_STATUS os_if_monitor_mode_configure(struct hdd_adapter *adapter,
|
|||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (tb[SET_MONITOR_MODE_INVALID])
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
if (tb[SET_MONITOR_MODE_DATA_TX_FRAME_TYPE] &&
|
||||
nla_get_u32(tb[SET_MONITOR_MODE_DATA_TX_FRAME_TYPE]) <
|
||||
PACKET_CAPTURE_DATA_MAX_FILTER) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue