qcacld-3.0: Add Validation for WMA Handle and PSOC in Wake Event

Currently, the WOW wakeup event handler lacks validation for the
WMA handle and the PSOC pointer within the WMA handle. This omission
can lead to null pointer dereferences in the host.

To address this issue, null pointer checks for both the WMA handle
and the PSOC pointer have been added.

CRs-Fixed: 4107000
Change-Id: Iaf22d5adc14b65b778b0e1d78108eded0cccb8c9
This commit is contained in:
Kaushik K.N 2025-07-14 21:50:31 +05:30
commit 8be762469a

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -2813,6 +2813,9 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event, uint32_t len)
WMI_WOW_WAKEUP_HOST_EVENTID_param_tlvs *event_param;
WOW_EVENT_INFO_fixed_param *wake_info;
if (!wma || !wma->psoc)
return -EINVAL;
event_param = (WMI_WOW_WAKEUP_HOST_EVENTID_param_tlvs *)event;
if (!event_param) {
wma_err("Wake event data is null");