Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5454960rwj; Wed, 21 Dec 2022 02:58:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXs2YABZ0CBL+YklEu6jp+vm0PDsiSLXdQvGSZ1iLUKgj5lPG6IWcFzm6cNLKu/uOviuoBgm X-Received: by 2002:a05:6402:31e4:b0:46f:fb60:8bd6 with SMTP id dy4-20020a05640231e400b0046ffb608bd6mr1015372edb.24.1671620287282; Wed, 21 Dec 2022 02:58:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671620287; cv=none; d=google.com; s=arc-20160816; b=vJTdguadG5ELkWm5gyGg/ySLvp0z9Tnf4xwgMFV3H+jurn7RLk2XFIKwi45KuxXy9R yOqDjgT32OWMlyyLybYfGMTUHGYi57rXI37Ixy39um6NgWK8iL+yjq8/RH+/kfaZwHeB Rr2QZmgWAQBg1Wp4vlQXRCs474x6jlpWYiITvYQ8xDqUcWYwYueddRb/XmzlFSYpAica O35DSmW229pxFuhY5kKJ6zFtUX0iEwvoOYU947diZWKCa4FZPqpGgLueDrlVZ/v/2uJ3 uATswS0VXQByJ7H1/T2IzVS/fEtpw85VFxGcKr0Y9CCHosSwn5MAlwXgqXeuUXID8rX7 RvBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cODI84NCLVHKyJSIgg8Tva1vufH5mWjNRTg4PBlHe6k=; b=o1QISnvy3mBair8qPwhNOTRIV2kC4qtDTrvEe/01GP7Dq+zT7f5KKoIhOdwrFBamJk sCAE1M0ZJpA0tIDn8igUgeCONVW4+X/uM2vcAtSwANBcx++aRXGMx+VTgUvpsHQ2dRBW eLFiraeDMNah9d3fak9p+GHJqu8UI6YMl90XApUH1tQJMumNEYFl7GVbOsjfDnH9X73O ujIT2hHNqQ9oonSzZIWaAbjZKzUwkg0qejf4BEPHUEbn/cz5Vt6CLZdIUxBUHcqxUGaI qR5XnuMz5NstGUfYpN7G9sVGZgf7ymbH4K+CR00Q9cxs8Jq046M3K9B+vC0gae8kMhXe tO+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=k2e8TppG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp18-20020a170906c15200b007c093acadb0si4545260ejc.508.2022.12.21.02.57.51; Wed, 21 Dec 2022 02:58:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=k2e8TppG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234470AbiLUK4l (ORCPT + 66 others); Wed, 21 Dec 2022 05:56:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231245AbiLUK4X (ORCPT ); Wed, 21 Dec 2022 05:56:23 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4C0F3BA for ; Wed, 21 Dec 2022 02:56:22 -0800 (PST) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BL5tnlK015096; Wed, 21 Dec 2022 10:56:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=cODI84NCLVHKyJSIgg8Tva1vufH5mWjNRTg4PBlHe6k=; b=k2e8TppGii2w0NppBbsC+MtYhS3lORJZkVLGKRSDkj0M9g7gY+Ys90ydhs4rSX2a65oS L2fC4Dwg3bpnG2m2CUYBu5JLNqGEt7WNl0sXwTb2tG6ZKc5SUcxoZCej4o65LysM/2mY /X69T2n83KNu5GxQJk0entbWBrBwhn8/UVov45s2zOceti01X/FBwh6IjAjZCFiqmjnQ cxPHyJo0snZU1//XPRv8asyRo3F+aC/NFqhEirCLm38i66jfccl5M3A33ZExarBiPgKP U1HFTApWJv2BoY3ojuxksHDN9CogS/+ZsAPlfazfKVwlD7tK4yD3PZnTUxb+//QS/Rbl Jw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3mkkxcshgu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Dec 2022 10:56:21 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2BLAuKgJ030123 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Dec 2022 10:56:20 GMT Received: from tmariyap-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 21 Dec 2022 02:56:18 -0800 From: Thiraviyam Mariyappan To: CC: , Thiraviyam Mariyappan Subject: [PATCH 3/4] wifi: ath12k: dp_mon: Fix out of bounds clang warning Date: Wed, 21 Dec 2022 16:25:28 +0530 Message-ID: <20221221105529.19345-4-quic_tmariyap@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221221105529.19345-1-quic_tmariyap@quicinc.com> References: <20221221105529.19345-1-quic_tmariyap@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: gkTBx6vFKtUfJSLUJiEzCwImPs9IZ8p1 X-Proofpoint-ORIG-GUID: gkTBx6vFKtUfJSLUJiEzCwImPs9IZ8p1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-21_05,2022-12-21_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 spamscore=0 adultscore=0 impostorscore=0 malwarescore=0 suspectscore=0 mlxscore=0 mlxlogscore=697 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212210088 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Fix below out-of-bounds access warning while processing ppdu end user stats. The size of info array is 6 but storing 7 values, Fix this with increasing info array size to 7. Warning: drivers/net/wireless/ath/ath12k/dp_mon.c:623:3: warning: array index 6 is past the end of the array (that has type 'u32[6]' (aka 'unsigned int[6]')) [-Warray-bounds] Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-03171-QCAHKSWPL_SILICONZ-1 Reported-by: kernel test robot Signed-off-by: Thiraviyam Mariyappan --- drivers/net/wireless/ath/ath12k/dp_mon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c index 7e9759807c88..f6f2e83f8f8e 100644 --- a/drivers/net/wireless/ath/ath12k/dp_mon.c +++ b/drivers/net/wireless/ath/ath12k/dp_mon.c @@ -588,7 +588,7 @@ ath12k_dp_mon_rx_parse_status_tlv(struct ath12k_base *ab, u32 tlv_tag, u8 *tlv_data, u32 userid) { struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info; - u32 info[6]; + u32 info[7]; switch (tlv_tag) { case HAL_RX_PPDU_START: { -- 2.17.1