From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 31C5B3B811F; Mon, 17 Aug 2026 14:09:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786975772; cv=none; b=a4/swP//QrCm5riFp3rp2QETEuQqK3uKHVC+yt7lBeYtkIHeJ3wYkvbQV4fQsUXdNAUDz27RXvoq7gwgHl1f0oOO3MIh+upRw4q00vniVl2ZtMF7QIFFD/wNVfWu816Zwq4m+q5cYHLD+OWa3hHXirCyuMYSqK8BrkxIRShLojE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786975772; c=relaxed/simple; bh=9ZDAKy5Bn2gM2lJuB8BfqF+6NvS61z9/5iFaz0RIAHQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fbGlchFxDjEO003M+ZGzxLWCAjy4Oh7m47DKxux5pRiu4jLuH302S5caz5KENvIew0r9thiT5J6aNI84tYS0wqeWaURBXswg+xXA3gypAAkt7WPQMb5TPDSX35Vhug20XmF5TQpSh0Hl0/2gdEbafrbyUew+FV1qeZsZ3KzR9V0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=z8GC0iQx; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="z8GC0iQx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B4AE1F000E9; Mon, 17 Aug 2026 14:09:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786975771; bh=9064xOlIJRIgzfQOHyQoFaYP2uOhUZ+KGlMr7eDwn1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=z8GC0iQxAgGZ5nDEdFA2eEXlvpHvnsP6CqBhIw+W0sZO0TqvRCt426jtA/ozrl9Vs pANuoTB1/mSQjuR53J6U0/2vMkMHubmI6ijdKelD8vYZc4HOExAylhju/My2NjZT+o hz3BSgdcGK4Lb39tOJ8uvwcxay4eCzOzftRm86pU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vasanthakumar Thiagarajan , Tristan Madani , Jeff Johnson Subject: [PATCH 5.10 142/389] wifi: ath6kl: fix OOB access from firmware ADDBA window size Date: Mon, 17 Aug 2026 15:29:41 +0200 Message-ID: <20260817132544.696583284@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260817132538.796021292@linuxfoundation.org> References: <20260817132538.796021292@linuxfoundation.org> User-Agent: quilt/0.69 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 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tristan Madani commit 44126b6994eeb28f2103b638e698f40a1244f327 upstream. aggr_recv_addba_req_evt() logs a debug message when the firmware-supplied win_sz is outside [AGGR_WIN_SZ_MIN, AGGR_WIN_SZ_MAX] but does not return. The out-of-range win_sz is then used in TID_WINDOW_SZ() to compute a kzalloc size and stored in rxtid->hold_q_sz, leading to zero-size or overflowed allocations and subsequent out-of-bounds access. Clean up any previously active aggregation session for the TID first, then return early when win_sz is out of the valid range, instead of proceeding with a broken allocation size. Fixes: bdcd81707973 ("Add ath6kl cleaned up driver") Cc: stable@vger.kernel.org Reviewed-by: Vasanthakumar Thiagarajan Signed-off-by: Tristan Madani Link: https://patch.msgid.link/20260702005020.708717-1-tristmd@gmail.com Signed-off-by: Jeff Johnson Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath6kl/txrx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -1722,13 +1722,15 @@ void aggr_recv_addba_req_evt(struct ath6 rxtid = &aggr_conn->rx_tid[tid]; - if (win_sz < AGGR_WIN_SZ_MIN || win_sz > AGGR_WIN_SZ_MAX) - ath6kl_dbg(ATH6KL_DBG_WLAN_RX, "%s: win_sz %d, tid %d\n", - __func__, win_sz, tid); - if (rxtid->aggr) aggr_delete_tid_state(aggr_conn, tid); + if (win_sz < AGGR_WIN_SZ_MIN || win_sz > AGGR_WIN_SZ_MAX) { + ath6kl_dbg(ATH6KL_DBG_WLAN_RX, "%s: win_sz %d, tid %d\n", + __func__, win_sz, tid); + return; + } + rxtid->seq_next = seq_no; hold_q_size = TID_WINDOW_SZ(win_sz) * sizeof(struct skb_hold_q); rxtid->hold_q = kzalloc(hold_q_size, GFP_KERNEL);