From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 5D9FB232395 for ; Sat, 11 Jul 2026 14:39:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783780766; cv=none; b=qPc4l+Of7d+1sBUgzf9WEZgXS4jJU4q6umc+3ZjHKNcryHCBgxfzcJwNznI19lDIoM7JbHwDMjKZ5YhwzgybKGrY1DSEav7SNliBj2u7NxOS2Xtu79mO8cp7A0xE/5oSFAzFWG6FAkOsb1+cvS2ORVXR41AuYZG1jvyjZMaYh4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783780766; c=relaxed/simple; bh=bHJSREHLOyeJy4p6jBRHOGdQGuFnsieQsfyomvA9tug=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oysfIAp1KEfAxuFJy4T6ULIT8RmjN9kkT6UBnjPivVXoHjKCqokmjHJfLs4/9a4uq+2mvw/jjwbVbXC9JTmg4V9S93AkFKfeKZbAx0cPne/5Ss4+GdREZbPCulFPihTB2uqdnexCy0m/aVpdJEXifwSR8Ey3U0tLkVqsFnzCrDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=kZm3DDMD; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=SVVv7Q1m; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="kZm3DDMD"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="SVVv7Q1m" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66BEOPNd4163737 for ; Sat, 11 Jul 2026 14:39:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= JFcBrz+ATTEO32h1LBnAmASwgy9v0i/Zqwdy0coRdUs=; b=kZm3DDMDw6zlPf8G +52iH2A4kfZ+Y20FnRemYz572E319RGziefo+z9NRV2jvM/1Y7t49jOOuUM30GXn g/4lL/p/wLMgP3/PJRxCxIjq+rsCNNcyHTzjsnrSuoi7pAZIz5tbbHY8+s1H7yg9 1E1aQgKcMy0TtL/va+D/DTEHro8vXnm+3l63vQ8SizjjNXJFV3jE8o4EkcTVV1xJ oRvxEYwx/n8mh2lSBhsEEdm1ZByHCj+UlW8fpADqE9S3znKr5Ps8bQcCGDA+941y 8LdnEJHH0EDfAtQl4ju+Nkwt/U4irjVBi0roGJync+yehisIkGNrftdJbWzOjPuv kZgp6Q== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fbeaf8yrf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 11 Jul 2026 14:39:24 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-ca6bd8a190cso2693404a12.0 for ; Sat, 11 Jul 2026 07:39:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783780764; x=1784385564; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=JFcBrz+ATTEO32h1LBnAmASwgy9v0i/Zqwdy0coRdUs=; b=SVVv7Q1mR7D3/5GKSy6+PbwLgHVCf2rY94JM2uYsCu1EDDHMDJynPzg/NK907INq5U KcTsDItMdwjo1Vo4noGkrCF6FfuvjmQ2D5gpmp3ar/4Ia4a4c4iCJqKLsWYPCILR3IuO LyOR+MF6vlYZ8Mwxg+aXDhPY+Xc1UZbeu/udcrVNiPk7Z/N7kmU/JfgFLFLRo4RKLtO7 oz3OJAyZUmWS4iwFS7yUjzeb5/3KoBQyukrrLG/t1mj9oIzxVvZbyG8zpwatmFnbWmBE YY7kPJ9FeA7Lz1qzzeqKG1Lcagx/oDlfvNOPyN7C2ibuMG4vCD45Ff4muATsXtlJ65LR olgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783780764; x=1784385564; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JFcBrz+ATTEO32h1LBnAmASwgy9v0i/Zqwdy0coRdUs=; b=iibaDlEvHlsxAZlcrUu1rdlKAlxTaT6gNZ4KQRGdBPCu30jHiEWTX+VydWdH/miazR FPMmoighhNoEUri8N2lBSKyQwOArok9umODcMNxJ/Pbc/OB6V12QxWFkKsXMQulz8iss KbUoTW7/rj+N8FubjTM5Jc5KF0Kwwt6eZChIuFezYcwAm0qvwU2uUGRETeOomfrE2FW4 nZX4QJXsE3qVwc990mzfRvdJ68gYih5/lZuGKLdZ9H5RXuNVt6TzKxMBlMNd6jjfk3A9 SiC3g/aoHh7QrNCMyflISPCjVAeHlsVG55KwZDr/hhdm0igPw23J0cUDKqf8r5pHgKD+ FfZQ== X-Forwarded-Encrypted: i=1; AHgh+RoCLbSV2a83lJARgaerW7swSHMhyEIm6cEKHr8hDMtMWCkV4sHctXYbV7qgERHxd4IPlRuDSCgVMEAMdV4=@vger.kernel.org X-Gm-Message-State: AOJu0YwuqQeBsLebMeURXy/bib6VNJ2DuZE/0b0FEKaZEbzmDYOPNz9q T8zONFbgXY+067yLatGxpuidU8VUiudrzB2rDtTsKymc8RVn0PK1ZbXEkAqaM5bNTbGbuXqVdJv d30awm2bXgBIKmVONT8ziMUdwFcqQY5T4edq7FgD4i7OyJLklVnCM2UOAoGCIMMTOvVc= X-Gm-Gg: AfdE7ckEGSITJuG8CYw8joA1PgtJIPC9gIM79RLeoNwC98WrIt3Wg4YCCpm0zz5g4Iw xFXwhFeWf2zc5+98bAPHiI6CB2FVI+buQwj0idHfuZrVPEqDNBpb9T5efyeQk8zwEFezRH1BTY1 X1YPb8BPNjsJTKbc985bMOl/As4c/effohJ3tVLrQeEQoZEv6jtQsPcDJnkpeYEKvCpgYHaNkfZ w47/tvoAlT9Y2q1coeu4l18PSNr6CfsDIxmJPgnglfUTVFF/O5eDHtQrgqluk9hKFNxvakugEKI nca3OhYQwEJ+R4EuC5snXerhyZD/1hLhYgtucOyxkTWKllYPiQmwYOqQobaG7PzyAO0G0Llwa3l 1M/DlL+XL5poZJ1wOvCEBALRk96ze2q7IqOakUy8uzIdoIUeZprpio9b6fEIB029u7v7i X-Received: by 2002:a05:6a21:d83:b0:3bf:6c08:fb97 with SMTP id adf61e73a8af0-3c110a1b5b6mr3074963637.57.1783780763853; Sat, 11 Jul 2026 07:39:23 -0700 (PDT) X-Received: by 2002:a05:6a21:d83:b0:3bf:6c08:fb97 with SMTP id adf61e73a8af0-3c110a1b5b6mr3074849637.57.1783780761218; Sat, 11 Jul 2026 07:39:21 -0700 (PDT) Received: from [192.168.1.11] (15.sub-75-218-246.myvzw.com. [75.218.246.15]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13b8a5992c9sm11166393c88.4.2026.07.11.07.39.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Jul 2026 07:39:20 -0700 (PDT) Message-ID: <779ee099-5132-4752-bdb8-354dfdc53926@oss.qualcomm.com> Date: Sat, 11 Jul 2026 07:39:19 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: ath6kl: validate assoc info lengths in the WMI connect event To: Doruk Tan Ozturk , linux-wireless@vger.kernel.org Cc: Johannes Berg , Peddolla Harshavardhan Reddy , linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20260711071336.58324-1-doruk@0sec.ai> From: Jeff Johnson Content-Language: en-US In-Reply-To: <20260711071336.58324-1-doruk@0sec.ai> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: WW54I2EuS_Gk1xHLBgQYusb_WmxaKBWB X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzExMDE0NiBTYWx0ZWRfX1DTzDqauZFhX r9eFAULFE4MhkjlQ0i9QfyEiVXHlthFlQmvNMmD3ATc/eNXUXslIwk8ZNT76Rvj+Udse/ZGsa5h zV9iWhcPMXLuGDnmD1cBkXZg3Z05k3CPDwgPB12TIzPFlgXvi4g4Ct2lX0YxYCpwYB6fVG+iSkk F12fKW+6Rah/COoyO+GPuniHiGpnY2SpReVUd46sy9AXAe1kKzrgHMry3RSohNASn+yqJZDDBRh GU9bcuHUzNlWbyhLnb1Z/I5Dr4jC8MH4PujNDh1to7DN4pQySC4rCfey5u7j+I964vsufikinOH hJMxCUbMpSH+PNvYZdw3viC06bd0tEZxL2tQtBrvXyRvzu0CgY94eO+UIo+w03RxjqdjRlfTGVe jJSwJtvMB2BMKPLFwcTumEd+tFyDAlfn3tjjL+y+Ne8q3/S+QCi5lOiiMfnCA4McFvS8EOmkWmW +0EU3vEidmbMdL18AcA== X-Authority-Analysis: v=2.4 cv=O5MJeh9W c=1 sm=1 tr=0 ts=6a52559c cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=6VQYfvmiyQ8t40WkS/mQdw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=skqKI5o7AAAA:8 a=VwQbUJbxAAAA:8 a=pGLkceISAAAA:8 a=XR8jsSC4JSa_CXHFb9AA:9 a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22 a=Cs8KYam2t1nZR3VcZU7f:22 X-Proofpoint-GUID: WW54I2EuS_Gk1xHLBgQYusb_WmxaKBWB X-Proofpoint-Spam-Info: AW1haW4tMjYwNzExMDE0NiBTYWx0ZWRfXyFPPVX1wVWpo U4PNYXF3wQnvHLRtLagJXiRuI/oF5SFz39tBtn4EWfk+USIr+izTG+ToYdAanMpraCBQZ4d/vMI xyPVPKmnfeOTDqyne8nPoiA896hxEVs= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-11_04,2026-07-10_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607110146 On 7/11/2026 12:13 AM, Doruk Tan Ozturk wrote: > ath6kl_wmi_connect_event_rx() only checks that the received event is at > least sizeof(struct wmi_connect_event); it never checks that the trailing > beacon_ie_len + assoc_req_len + assoc_resp_len fields fit within the > received buffer. Those attacker/AP-influenced lengths then drive two > out-of-bounds accesses: > > - The WMM information-element scan builds > peie = assoc_info + beacon_ie_len + assoc_req_len + assoc_resp_len > and walks up to it, reading past the end of the event buffer when the > declared lengths exceed the buffer. The walk also dereferences > pie[1..6] and pie[1] (for the advance) without checking they stay > within peie. > > - ath6kl_cfg80211_connect_event() subtracts fixed offsets from > assoc_req_len (-= 4) and assoc_resp_len (-= 6), both u8, with no lower > bound. A short assoc request/response underflows the length to ~250, > which cfg80211_connect_result() / cfg80211_roamed() then treat as the > IE length and copy out of bounds from the small assoc_info buffer, > disclosing adjacent slab memory to user space via nl80211. > > Bound the declared IE lengths against the received buffer, bound the WMM > element reads against peie, and clamp the assoc request/response lengths > before the subtraction. The sibling wil6210 driver already performs the > equivalent length check for the same WMI connect event. > > Found by 0sec (https://0sec.ai) using automated source analysis; the > missing bounds are evident from source and cross-checked against the > sibling wil6210 driver. 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 Some aspects of your patch are already addressed by: https://lore.kernel.org/all/20260421135009.348084-3-tristmd@gmail.com So you will need to rebase once that lands. /jeff