From nobody Wed Sep 02 22:40:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hZyP673Wsz6qpVd for ; Wed, 02 Sep 2026 22:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hZyP648Wtz41nH for ; Wed, 02 Sep 2026 22:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788388842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E3/2Zvx2bejJKmvsoBdj6FbXpswp4kp2tdtI0ocewHI=; b=P/znj5MDufMmaFHPZyiANCV4Ws9Msn6FyuI/Ms1iWkLJMjo014BCwY1cScg3IcERjjtAIL PHB5aNMld0RrMrwo9p/wBTAPaIIJvHOShyfcYNEqOVNizXOmNDuPw4RL362eaTr8I1dGpy Tnc7LhS3zbzX0foWO2AetEr88ydO2l6WNotjpw/gQNOmb7Z8eb81uix85JwcwT8G404TYd ZJeoHCH6snYV51y8UsFfbKfZiZeypQ10w+8vc/OkSouzQ/Uyjlb8LvxwiAJNSc37c0Aulx Eueg8Y75Gr8ugxn0cBwI8LnP1KmJikugat/y4d443rY9rHXWcJu9+Uh1GRKyIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1788388842; a=rsa-sha256; cv=none; b=xMtJu0H+RHpeM3PnmX3C/HoFyGeQqHZYb6qYdqonxPHPu7g3j0QmGMkSgbFg4vDZCu+CV/ SY33oob/nP9FIoupfu2khLdpvCmrOJDQh4jpOgXBodWoZtZSjCVK86E9nG0um0Ljkh0I5P Ajrz4zC2g+u3yTu+kEueisHr63X9ZFrW2EbpK648UKDrlV5X+B5ZtR9yT6aFQ1lZgWLmVR koKZ3fWT6qbylPEwzk9aCSp88+dLPrqwHDg7eacwUHfsQgJc6zmiuaa3ITcCZZt24riTVN Tz8BH4/Tzq1bNbK0kyOQZD+FqeiSId8AZW70Oc1d+hppz1yz3fHtC/0zliNFNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788388842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E3/2Zvx2bejJKmvsoBdj6FbXpswp4kp2tdtI0ocewHI=; b=vfsOUGBl9YAGMI4Kn0TlDqHagXchP/yHCwKE1vqK1673qN6i749xa04VnP04r0sNp4oP9x m+9m3KgtT09ArpGDkognvoiAVb2pvp+JApxuMVQKM64sbMGQxFKX/IUQh3n9XlSRLcLQ1L WRN/IR17I0q4vJGbDGwm2rmXykNoLe6Efe3yA96n4VJ9zannX6ei96ifs1UQxlCLY4L2Oa 9GShv0feWmGGATuuGJX6if0RdL93zBBsa7tvgpWXS8gRMenVYw4iZqlLQX+FqEjkhaOHNs 1AQ97+t2hALKy+OoevzEjSRLWETEcydqyQceq1Zh4DQyeBY+CcSOpDxY2nSuOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hZyP62kTkz12dX for ; Wed, 02 Sep 2026 22:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f8c2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 02 Sep 2026 22:40:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Andrew Griffiths From: Mark Johnston Subject: git: 6484d5547fb0 - stable/15 - mtw: fix zero-length queue array that can corrupt struct mtw_softc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6484d5547fb00aa65d5abdf203c21d4486ad771a Auto-Submitted: auto-generated Date: Wed, 02 Sep 2026 22:40:42 +0000 Message-Id: <6a98a5ea.3f8c2.5ef7eb83@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6484d5547fb00aa65d5abdf203c21d4486ad771a commit 6484d5547fb00aa65d5abdf203c21d4486ad771a Author: Andrew Griffiths AuthorDate: 2026-08-20 14:29:53 +0000 Commit: Mark Johnston CommitDate: 2026-09-02 17:40:28 +0000 mtw: fix zero-length queue array that can corrupt struct mtw_softc The mtw softc declares sc_epq with MTW_BULK_RX even though MTW_BULK_RX is enum value 0, while initialization and queue handling index up to MTW_EP_QUEUES; attaching a matching USB WLAN device can drive writes past the absent array and corrupt adjacent softc fields. This suggested patch sizes sc_epq with MTW_EP_QUEUES so the softc contains the endpoint queues the driver initializes and uses. Fixes: c14b01624261 ("mt7601U: Importing if_mtw from OpenBSD") Reviewed by: bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D58897 (cherry picked from commit 7e9e72bee359437b9f78c6a4056ef0a90337f341) --- sys/dev/usb/wlan/if_mtwvar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/wlan/if_mtwvar.h b/sys/dev/usb/wlan/if_mtwvar.h index 3cf4c4f9c94e..67b9291cefc2 100644 --- a/sys/dev/usb/wlan/if_mtwvar.h +++ b/sys/dev/usb/wlan/if_mtwvar.h @@ -320,7 +320,7 @@ struct mtw_softc { struct mtw_txd_fw *txd_fw[4]; int sc_sent; uint8_t sc_ivb_1[MTW_MCU_IVB_LEN]; - struct mtw_endpoint_queue sc_epq[MTW_BULK_RX]; + struct mtw_endpoint_queue sc_epq[MTW_EP_QUEUES]; uint8_t rfswitch; uint8_t ext_2ghz_lna; uint8_t ext_5ghz_lna;