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 83C062C11CA; Sat, 12 Sep 2026 17:09:30 +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=1789232977; cv=none; b=RJUwR4OUUSWsLNRRrjajvBhL3x/god3+8ruDIML/q6REJOuOp2HdSuIgD4W+al0VUgOBhyganAL/vHYAnPKvCuYk+jossWsyb06wbQtEtvEwEPEqCQrbFWyJjP8gyFTshtmzlmukoDXoVxGLW0PjaSPWW4mpC4/SyMVJSLfghF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789232977; c=relaxed/simple; bh=G0iFDzjZz21b0P9PzF14P07jvGYW3wdlaCAJhj2yBlo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zsfrr3oywvNXatUUwlFpcvFX6UYGZP8Y3jNWri2A+3yFO/Uuqux8auHy0Kpmf0cWWyL95i3mTJZq7xDPUSOrrxvwyhKcfCigniKLsVjZhpI4/BeT/jleTBks+y2KhwWC5ExIF8yX68L//bV+oy9RHiFKiT+NZEb8PcoJkqFNCs4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oySTE+JJ; 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="oySTE+JJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7224D1F000FF; Sat, 12 Sep 2026 17:09:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789232969; bh=VIFtonP/Sz4kYPe5rh+1N1OWR38bJHdW+oGBap9CJPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oySTE+JJhBSFW5atky4V71A4EmfTuS/h31CSNRdk22LFAgjnYXvdSFwYwCigO7eKK kK9Zl88rA6I+KQK2wsQd4WsrSf3y1OUpv4Ac1cSeG1HzT+OGhNvxooaztUGuzvPFtZ g1XAqNelaaHOz5eK2HV9aPsFQdjyQmBL0NBiNN+s= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Doruk Tan Ozturk , Jeff Johnson Subject: [PATCH 5.15 117/935] wifi: ath6kl: clamp assoc request/response lengths before subtracting IE offsets Date: Sat, 12 Sep 2026 08:52:27 +0200 Message-ID: <20260912065529.503992988@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065526.833703348@linuxfoundation.org> References: <20260912065526.833703348@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.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Doruk Tan Ozturk commit 3bbd05723d15dd06f0560bcd94fbf9a91b5f5613 upstream. ath6kl_cfg80211_connect_event() subtracts fixed IE offsets from assoc_req_len (-= 4) and assoc_resp_len (-= 6), both u8, with no lower bound. The aggregate check recently added to ath6kl_wmi_connect_event_rx() bounds the declared lengths from above (their sum must fit the received event), but an assoc request/response shorter than its fixed offset still underflows here: the u8 wraps to ~250, and cfg80211_connect_result() / cfg80211_roamed() then treat that wrapped value as the IE length and copy that many bytes out of the small assoc_info buffer to user space via nl80211, disclosing adjacent slab memory. Clamp both lengths to their offsets before subtracting. Found by 0sec (https://0sec.ai) using automated source analysis; the missing lower bound is evident from source. Compile-tested. Fixes: bdcd81707973 ("Add ath6kl cleaned up driver") Cc: stable@vger.kernel.org Assisted-by: 0sec:claude-opus-4-8 Signed-off-by: Doruk Tan Ozturk Link: https://patch.msgid.link/20260713213251.21161-1-doruk@0sec.ai Signed-off-by: Jeff Johnson Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -753,6 +753,11 @@ void ath6kl_cfg80211_connect_event(struc u8 *assoc_resp_ie = assoc_info + beacon_ie_len + assoc_req_len + assoc_resp_ie_offset; + if (assoc_req_len < assoc_req_ie_offset) + assoc_req_len = assoc_req_ie_offset; + if (assoc_resp_len < assoc_resp_ie_offset) + assoc_resp_len = assoc_resp_ie_offset; + assoc_req_len -= assoc_req_ie_offset; assoc_resp_len -= assoc_resp_ie_offset;