From 8be762469ab18b40e4cea9223a1bf86fa203159d Mon Sep 17 00:00:00 2001 From: "Kaushik K.N" Date: Mon, 14 Jul 2025 21:50:31 +0530 Subject: [PATCH] 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 --- core/wma/src/wma_features.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 03a51f01fbd4..e5a234adc325 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -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");