From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4CC922FF2B; Tue, 17 Jun 2025 16:19:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750177185; cv=none; b=t5DTgx6nNVX9OjZqGgAxooqSCDuQ/Z1wVkPOwAC7vws39c4hhGd58BGvRR+jiV9WSna4ysbmmBITbZtes/P/qGWva1mYc5NMmelVXvQbU90ZLB56CKbrogvl6N9N+j1pMrRASwU4wl+CHHSntRjf37nIsh569zMe7vrqMRHgIk4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750177185; c=relaxed/simple; bh=gIfvMX1BGxsHzlcW0XmPE11M3CP6bNdTT/ugIuiZp70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hav+RVMlz7firLNDg90nD8CFrCMWvvNJuAd3vm5xyaEmb2qbpHcp7XmhcZ0IIPj69pwhXxEbrAZz8hzwu8S/am5Iu+SY1ihsDQ3PQMIPKJGG4u/Ieebct/UUODKq4KDy6mYnKFlKniEVzJMvuRWSI3ZDMVyLnR78zbucAa3mrek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VZjDN3nE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VZjDN3nE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 224A5C4CEE3; Tue, 17 Jun 2025 16:19:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750177185; bh=gIfvMX1BGxsHzlcW0XmPE11M3CP6bNdTT/ugIuiZp70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VZjDN3nEuuqN3r2BGWVs1e33ijK9jnjamfHko4Aje6JyhbCvbod/7JW7ValmFtqR2 XSGSJa58aVtmTq/TySoNRunRvw5zJHhVwy8koIILb4EwN1dKlwCVHo8jZiSORFlN+Y ZGKN7yVRsxwehZPQ9qwU4xIVA6P1fIYKHN6jD6fI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alexey Kodanev , Ping-Ke Shih , Sasha Levin Subject: [PATCH 6.15 269/780] wifi: rtw88: fix the para buffer size to avoid reading out of bounds Date: Tue, 17 Jun 2025 17:19:37 +0200 Message-ID: <20250617152502.419944936@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617152451.485330293@linuxfoundation.org> References: <20250617152451.485330293@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alexey Kodanev [ Upstream commit 4c2c372de2e108319236203cce6de44d70ae15cd ] Set the size to 6 instead of 2, since 'para' array is passed to 'rtw_fw_bt_wifi_control(rtwdev, para[0], ¶[1])', which reads 5 bytes: void rtw_fw_bt_wifi_control(struct rtw_dev *rtwdev, u8 op_code, u8 *data) { ... SET_BT_WIFI_CONTROL_DATA1(h2c_pkt, *data); SET_BT_WIFI_CONTROL_DATA2(h2c_pkt, *(data + 1)); ... SET_BT_WIFI_CONTROL_DATA5(h2c_pkt, *(data + 4)); Detected using the static analysis tool - Svace. Fixes: 4136214f7c46 ("rtw88: add BT co-existence support") Signed-off-by: Alexey Kodanev Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20250513121304.124141-1-aleksei.kodanev@bell-sw.com Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw88/coex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/coex.c b/drivers/net/wireless/realtek/rtw88/coex.c index c929db1e53ca6..64904278ddad7 100644 --- a/drivers/net/wireless/realtek/rtw88/coex.c +++ b/drivers/net/wireless/realtek/rtw88/coex.c @@ -309,7 +309,7 @@ static void rtw_coex_tdma_timer_base(struct rtw_dev *rtwdev, u8 type) { struct rtw_coex *coex = &rtwdev->coex; struct rtw_coex_stat *coex_stat = &coex->stat; - u8 para[2] = {0}; + u8 para[6] = {}; u8 times; u16 tbtt_interval = coex_stat->wl_beacon_interval; -- 2.39.5