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 F179A27A476; Thu, 30 Jul 2026 14:28:05 +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=1785421687; cv=none; b=gqSszwWpa43j5GUqyxmS52i3yvT/uwc7a0I69rxSCafiNjHANM+LU0ridzmrjqgmLxU52gPHtTJ88KeeDg3NikC9kSVjYxqSvoVAvvLgSXmwTfZF88bK/gP+8r9VMXRIXRYr6uewIsipImGDwRKGJO/I9r0N08OTR/TCQbhtoIg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785421687; c=relaxed/simple; bh=avXVuUQm8FBD8MhPhlaaf/21TPjd3/wV9IA3xILiGN4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RpHzzo5ubZjiqp+dTiOs/0eyy6SW5W18zUnwsGTBU322wCnJJleLLTC4U3x9Rl3JZ4lIgeU+iILaqWwVHvT5AW+8sDoCJvKWBpl4b2OABugr5zNx6oumTWDeYPUx5fEaE1te3YGgPzI6vPetd+qzJCnvecOhtDNiFN+58Zw3Crs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DpvGuz4L; 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="DpvGuz4L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51B431F00A3A; Thu, 30 Jul 2026 14:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785421685; bh=KmbxJSTuo+bmwZqC81MG6/DqHb19vCkoYtMTcT8tQnM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DpvGuz4LsKP7QPjll0z6H9+QrfJq1AmEhQthTXGCFaUGpSz1hMcjjiFs+c/bzjTEk H/Kg111f8be3eC7+3xwc3Lrk6bgCls8P1bkn3zK0iikUfrFKiZwQXnHq5skXsv8ikk zf4cvvHGRlv1oRbB10SGNy7Zy2bw5SsS5E0/ZbFI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tristan Madani , Vasanthakumar Thiagarajan , Jeff Johnson , Sasha Levin Subject: [PATCH 7.1 188/744] wifi: ath6kl: fix OOB read from firmware IE lengths in connect event Date: Thu, 30 Jul 2026 16:07:41 +0200 Message-ID: <20260730141448.281295490@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141444.267951807@linuxfoundation.org> References: <20260730141444.267951807@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 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tristan Madani [ Upstream commit 6b47b29730de3232b919d8362749f6814c5f2a33 ] The firmware-controlled beacon_ie_len, assoc_req_len, and assoc_resp_len fields in ath6kl_wmi_connect_event_rx() are not validated against the buffer length. Their sum (up to 765) can exceed the actual WMI event data, causing out-of-bounds reads during IE parsing and state corruption of wmi->is_wmm_enabled. Add a check that the total IE length fits within the buffer. Fixes: bdcd81707973 ("Add ath6kl cleaned up driver") Signed-off-by: Tristan Madani Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20260421135009.348084-3-tristmd@gmail.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath6kl/wmi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 7e65a03be0b7bb..2b0c5038ae0403 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -874,6 +874,14 @@ static int ath6kl_wmi_connect_event_rx(struct wmi *wmi, u8 *datap, int len, ev = (struct wmi_connect_event *) datap; + if (len < sizeof(*ev) + ev->beacon_ie_len + + ev->assoc_req_len + ev->assoc_resp_len) { + ath6kl_dbg(ATH6KL_DBG_WMI, + "connect event: IE lengths %u+%u+%u exceed buffer %d\n", + ev->beacon_ie_len, ev->assoc_req_len, + ev->assoc_resp_len, len); + return -EINVAL; + } if (vif->nw_type == AP_NETWORK) { /* AP mode start/STA connected event */ struct net_device *dev = vif->ndev; -- 2.53.0