qcacmn: add psoc null pointer check to wlan_objmgr_get_peer_by_mac
Current code directly passes the result of wlan_vdev_get_psoc(vdev) to wlan_objmgr_get_peer_by_mac, without null pointer checking, which can result in null pointer dereferencing. To fix this issue, add checking of the psoc pointer before passing, and add verification inside wlan_objmgr_get_peer_by_mac. Change-Id: Iaf0e2535c3a584db788ddc621745c66c296fe08f CRs-Fixed: 3277651
Este cometimento está contido em:

cometido por
Madan Koyyalamudi

ascendente
aec62be3c7
cometimento
fa6e07082f
@@ -2166,6 +2166,8 @@ struct wlan_objmgr_peer *wlan_objmgr_get_peer_by_mac_debug(
|
||||
|
||||
if (!macaddr)
|
||||
return NULL;
|
||||
if (!psoc)
|
||||
return NULL;
|
||||
|
||||
/* psoc lock should be taken before peer list lock */
|
||||
wlan_psoc_obj_lock(psoc);
|
||||
@@ -2202,6 +2204,8 @@ struct wlan_objmgr_peer *wlan_objmgr_get_peer_by_mac(
|
||||
|
||||
if (!macaddr)
|
||||
return NULL;
|
||||
if (!psoc)
|
||||
return NULL;
|
||||
|
||||
/* psoc lock should be taken before peer list lock */
|
||||
wlan_psoc_obj_lock(psoc);
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador