From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB3B23E3D90 for ; Fri, 10 Jul 2026 10:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783680280; cv=none; b=UK1DuOU5iZktlk96OTdSEs1WLH/DuwZCZV9UzTPYhiPqCcBf4lyz0CqVsk6nenFn1C+FjJ9xOCX6JwtTxv702RG+PlhjsXLQXUOlPLFUxS+sTwHMKKQNl7vL2FryNLcjpBEn54qyC79W1JxQDeDul7hBY2qN5JwGViY9PKjF+cU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783680280; c=relaxed/simple; bh=yXlFq89Ny8qj90p1Uvqrah41kJAxuXF8ZeG/cqe/ZqA=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=FgywmLvSxtUVGsdp6muuhIz3ePh1kY3+xnYJQ7ZEUK154byk8DoQGIIHUt2xluxB5KX/265sqC7Wd1gZJj2Yn3G+LFjg3FbxbEOAOQx5q1HTK8uY5onnrFGHGZ3GMKnkKyeZ6OdYsQSo7eoxzJeTyPqXuvwEvu1rpAx/eLiBRuA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GxLHJ983; arc=none smtp.client-ip=209.85.216.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GxLHJ983" Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-381b831d535so1126945a91.0 for ; Fri, 10 Jul 2026 03:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783680278; x=1784285078; darn=vger.kernel.org; h=content-type:mime-version:subject:references:in-reply-to:message-id :cc:to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yXlFq89Ny8qj90p1Uvqrah41kJAxuXF8ZeG/cqe/ZqA=; b=GxLHJ983BEy57FH2ZtuQrGWNJEW4CJalwNAub9nFhP9fOC66tPdoS/CFYiBuw68/KX 68Y6GZ7IIO9w225vGa+ReZGrQL5/7WDobml0IvOQQQdEr7Io+SJdtHUiJL0QNk3Lg1LO bfzXNwfRN8MpHcHOe36qpUoJOAa0kOtdY+ovd1MBV1G0xfsn8lzG2CbPQI7ihS425daQ LJZGs7uecTFwEDiHBzrWXK4aI7rfhPEj/JWsc+KSER7qHj1fHiHtREC/+68Rf64V+Ldx f8A6xbd3OIvVreHMRO7I8q5ZHyIZFMr8Wl+pWss6gCbJFzU/yRbtpWgFjS43EDT3grIM xmeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783680278; x=1784285078; h=content-type:mime-version:subject:references:in-reply-to:message-id :cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yXlFq89Ny8qj90p1Uvqrah41kJAxuXF8ZeG/cqe/ZqA=; b=q779wgyRfv2CBTHQQSd7nWt05h2APSO4ruyroOMZvYS+v3X5isS/qR1sT3pydDkn4N D2A8ihXcxueUvSz8qnDlJxdBfR2goOaJUt3F0lTcFkAmhxwaCuV4Cy6iNwI4X2p+Lcto 23x6RNahXCkKqaDsOGJm/vhJJRXAA/rYFoDpHYNsGfF4virSEHfW6jdqtmPn9GBOMO5G ONLwuIhxtGFBNX0vFNq/nFBcoCHCFGziu+vtdYpLakDFwNbiiCIjDEWWQS6MonYEJoRU crYL6oy6bUTTqTGtR5ydZfD9dvJSdGq/2bNiPjpBDoLmbkuyy6AsjeZFn2K08P7YDUGY zS6Q== X-Forwarded-Encrypted: i=1; AHgh+RqyzbSIr9/C4Tty6pKh2+zN9Mm3aau9MU0RFv0bcjg8F3mfZz7AukAm1lEiY0uHHS9aT0haTvbSkogd96E=@vger.kernel.org X-Gm-Message-State: AOJu0YxBY6NG6U+PfXe3Fb1kvXCwLW+guhyhxu1tBwQZDvMYUSmwUXuN yRvt+j2PyinRulIG4hdeAY1fr3Sck7Iu5eN4g2SoGumYgr1smB6+iocu X-Gm-Gg: AfdE7ckVeC1Wb7yS6DTan/JSMsZ+J3WLNsP4V1OG9eBziXGAinGO1JBg1pK9m7lFthA M8Fk2L3EwJpD1tl94gS5XizCF6merg04rsoQAz6cJ3DFW0/q6VKUbq93iTb5piLykKFQQnWnKLn oqbggcMgFH5HpjA0JmMYrNtZJh6KDfO2ub0CST76CDSMHEdrEgvieI279SzUZRdSxkWzMlnVibe EN5MYQ9z2TD3acug1OSlJSs32jSekS0ghyJKASlAcxQQgqiMVCO52qXQm4i0jTXtSEiCPRyE2Mn K+Amlq6sjfFeBFAfNtTjYfLoy7YHS7EAgvnvrzn29bs3UC4vpI2oG4ZBb96lMskICLwA+EknggB Pf/gjilB1/Xdft222UTz/dpNgt6F6v2KUqzQvVBHmpRg0J1SFqAygZyYBK35Cu1PM5Q7RBm+GiS znZ2R/NsOyr9sRJtsfFXgaoWQ2zg== X-Received: by 2002:a17:90b:3fc8:b0:384:a641:3fe with SMTP id 98e67ed59e1d1-38941cc4cffmr10480170a91.21.1783680277870; Fri, 10 Jul 2026 03:44:37 -0700 (PDT) Received: from [fd54:4::10:0] ([2602:fb95:18:520e::7790:520e]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-311b00048a3sm10156850eec.5.2026.07.10.03.44.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2026 03:44:37 -0700 (PDT) Date: Fri, 10 Jul 2026 19:44:27 +0900 From: skyexpoc To: Johannes Berg , Brian Norris , Francesco Dolcini Cc: Kees Cook , linux-kernel@vger.kernel.org, Kalle Valo , linux-wireless@vger.kernel.org, Miri Korenblit Message-ID: <8b98582b-1120-46ff-8fa6-fd30a6b13016@Canary> In-Reply-To: <1462bcdb0944bfd3ae7ac9618cc59ab6cf75dfc6.camel@sipsolutions.net> References: <20260629120333.94222-1-skyexpoc@gmail.com> <20260710072140.GA17790@francesco-nb> <1462bcdb0944bfd3ae7ac9618cc59ab6cf75dfc6.camel@sipsolutions.net> Subject: Re: [PATCH] wifi: mwifiex: bound uAP association event IEs to the event buffer Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="6a50cd0b_66334873_12d9"; protocol="application/pgp-signature" --6a50cd0b_66334873_12d9 Content-Type: multipart/alternative; boundary="6a50cd0b_643c9869_12d9" --6a50cd0b_643c9869_12d9 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > Should we consider the firmware trust-worthy or should we validate > everything we receive from it=3F Is there some agreement on this topic > in general=3F =46or mwifiex there's a concrete reason not to trust it: besides the SDIO/PCIe parts, mwifiex also drives USB dongles (8797/8801/8997), so the= =22firmware=22 can sit on a hot-pluggable, potentially attacker-supplied device. A malformed event from such a device is the same threat model as any other malicious USB peripheral, not just a hypothetical firmware bug.= There is also precedent inside mwifiex itself: commit 119585281617 (=22wifi: mwifiex: =46ix OOB and integer underflow when rx packets=22) al= ready added exactly these bounds checks to the receive-data path. This patch is= the same class of fix for the uAP event path, which that commit did not cover. So I'd say it's consistent with how the driver already treats firmware-reported lengths and agreed, worth fixing. Thanks, HE WEI=EF=BC=88=E3=82=AE=E3=82=AB=E3=82=AF=EF=BC=89 > On =46riday, Jul 10, 2026 at 4:41 PM, Johannes Berg wrote: > On =46ri, 2026-07-10 at 09:21 +0200, =46rancesco Dolcini wrote: > > I think we received a few patches that are validating the data receiv= ed > > from the firmware (including this one). > > > > I did not review any of them yet, what is your opinion on those=3F > > > > Should we consider the firmware trust-worth or should we validate > > everything we receive from it=3F Is there some agreement on this topi= c in > > general=3F > > I don't really know fully =22in general=22, but I/we generally treat th= ese > as issues. I'm not going to worry too much about them, but I think we > should fix them. > > johannes --6a50cd0b_643c9869_12d9 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <= meta name=3D=22viewport=22 content=3D=22width=3Ddevice-width, initial-sca= le=3D1.0, user-scalable=3Dno=22> 3D=22=22
> Should we consider the firmwar= e trust-worthy or should we validate
> everything we receive= from it=3F Is there some agreement on this topic
> in gener= al=3F

=46or mwifiex there's a concrete reason no= t to trust it: besides the
SDIO/PCIe parts, mwifiex also drives= USB dongles (8797/8801/8997), so the
=22firmware=22 can sit on= a hot-pluggable, potentially attacker-supplied
device. A malfo= rmed event from such a device is the same threat model as
any o= ther malicious USB peripheral, not just a hypothetical firmware bug.

There is also precedent inside mwifiex itself: commi= t 119585281617
(=22wifi: mwifiex: =46ix OOB and integer underfl= ow when rx packets=22) already
added exactly these bounds check= s to the receive-data path. This patch is
the same class of fix= for the uAP event path, which that commit did not
cover.
=

So I'd say it's consistent with how the driver alread= y treats
firmware-reported lengths and agreed, worth fixing.

Thanks,
HE WEI=EF=BC=88=E3=82=AE=E3=82=AB= =E3=82=AF=EF=BC=89



<= div>On =46riday, Jul 10, 2026 at 4:41 PM, Johannes Berg <johannes=40sipsolutions.net>= wrote:
On =46ri, 2026-07-10 at 09:21 +0200, =46rancesco D= olcini wrote:
I think we received a few= patches that are validating the data received
from the firmware (inc= luding this one).

I did not review any of them yet, what is your= opinion on those=3F

Should we consider the firmware trust-worth= or should we validate
everything we receive from it=3F Is there some= agreement on this topic in
general=3F

I don't = really know fully =22in general=22, but I/we generally treat these
as= issues. I'm not going to worry too much about them, but I think we
s= hould fix them.

johannes
= --6a50cd0b_643c9869_12d9-- --6a50cd0b_66334873_12d9 Content-Type: application/pgp-signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: Canary PGP V3 iQJIBAADCgAyKxxIRSBXRUnvvIjjgq7jgqvjgq/vvIkgPHNreWV4cG9jQGdtYWls LmNvbT4FAmpQzQsACgkQ5NEvu1xWDZSFtBAA35DlSI0/f671BTHolH1N/yk57ao4 noO6uvbcuPBSzjrO+lqERQfNRF+Z2kcRAxQ9V8sYKnQGPg++jZezgOmvDnSbOgfj 0/9vgmhmNjkl8xSjISJ7jwBe1F6vztZdfWZSj1tpAA7Ibg10KRVqn7cRuVJSOn9T 0jdnPD9tJv0cXzUErPvph5/JOGoU+zz+4bNPFYuqsxNkKDrK6O5DBkRZDL8LQCgE ZLTqwuO2ERfSi7+19tHkAaLoajUdVXdtdlEUGkYGcLSUUMNCqOdZoP6Vwhrarqyj XFtAq4HCqaxtjbLJ/RmiBAQm9gzFK3so5sRTuPzaY3yL7SR8tOeWiFtptRjrrs37 2JVutQGKqzSri0xMnv3TvMMz2g4xBDOnnqCrEtZ+zrdoGHJCyrDrIAtXlU7KeLjj dKXJk80uCS43p/Aa5TzqywDP1/+KR9agb1J+34rLV9WUQA15spDdV2RR7VeYwfBs ZGz287k5EKYDZXUZ7aME7k/dCcPnsL6UJ2kHglPRwdmUzjzkosdPEL8rv17sjO/Q qopgh/65hKOvPYVmz8Dh/g21pk6xYQXqrh7bUOjL3W9E02DB+EfGUq3PAu9q2OJp /sdTG7Q6gXiy7ctZJazFjGGpKJXZ5qOqqdmILgefeYQ10Mi85sBXYikiitesY31U iK7d9uzjd84lflQ= =7EF6 -----END PGP SIGNATURE----- --6a50cd0b_66334873_12d9--