From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=211.75.126.72 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796522728; b=F+VdhKi/kdRH9o0/ZP3yOgg7AkzcbsMXShVZbpHhEF5VIp0gEkpc8g3eLIyUmAh4frum Nnc1fp5uTitbNRvU1dOk13D4hd9idFEeAa9u2NUM7agSlkXqOlAKh9VBSYTjF+wV8GesQ LIQ4MBXtccbWqmk+yGYhb+Zp74KEWjJ50rxp9mZttYZz0+hlGpLga16B97FlE8OJBAPaQ K2w/1x/jEwcN+BtgiMen+cHlu7SGB4T4YiSF8m/dFBQZou+ZQkufRFloNj2fqnmUhbkmd PhWx1w15XStXIQZzaDVabRKkWzV/tt+FBaIv2gS6TG+ufYWq9HR4ppN4aaA4kYJ91cw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796522728; h=DMARC-Filter:X-SpamFilter-By:DKIM-Signature:Received:Received: Received:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID: References:In-Reply-To:Accept-Language:Content-Language: x-originating-ip:Content-Type:Content-Transfer-Encoding:MIME-Version; bh=VC45b1qclasvLhVQp6zGkmfH/evVFEiFfDzGWRbvDMU=; b=YwWf/bFDQldJDHnynl8lYbdfCztldOdr+5yNXcZpPWtRPJBqSpqpLs36R7/7upfKqEV/ 9iO+p78klgFZhpEybqHW1jWsz/T4DEvpfTau6rHSnjyGf+7GHrulBGTAcnlJVpEh8OcmH ANn1RQaWp2pgdqS9Jgo95xU5Ey6tunQLzYagErPmtpQnc6Ghw2xU7uDbCeK1dHMkY8Ixj YXjnI27dDvbaLgbNMfvmXD8HLGzmPJ53IfJ2g4jFm8jkKKczc6UbXlmmGBAJv8+bxuk/C rY03MxKtSg2OVgTLSqnHlgH0DkMOHXnWf1HXbY/zXKLmY2CwM3aq6k78pAVgAMIlXdg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; dkim=pass header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=EPWlaCz8; arc=none smtp.remote-ip=211.75.126.72 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11129606A31F for ; Sun, 6 Dec 2026 02:05:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 11129606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=EPWlaCz8 X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 6B625OmcC4037556, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim; t=1796522724; bh=VC45b1qclasvLhVQp6zGkmfH/evVFEiFfDzGWRbvDMU=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=EPWlaCz8ISuV4nnQaXhwrszGPbZC90K8qqYR9nBuSb/G67sTJDAFE1oQVnNrFJpHz xK630K9iPFJlYftW3e7+LOP+QJN957e7OjvYsxRCqB+dMyA8SzknWpj/HYR1BAyclK pIaL+R/cx+EqxUE93aD32820sG5GWY0xUadUwus3+4xhotJkWqGtuvdxN4UoxEixmt gm22tazSrooKd+YqaxNef0TONHqW16JEtBXrTkvNPKsDKnxGTzrpjjBOk0e1APghrk +xpIphY95Jdc17rPhKlBfOaP2EWOHTU9VgtvabYASh4F98mp/FtkYIG4M250zjjr13 kvI8yBSKhVl4w== Received: from mail.realtek.com (rtkexhmbs04.realtek.com.tw[10.21.1.54]) by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 6B625OmcC4037556 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 6 Dec 2026 10:05:24 +0800 Received: from RTKEXHMBS06.realtek.com.tw (10.21.1.56) by RTKEXHMBS04.realtek.com.tw (10.21.1.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Sun, 6 Dec 2026 10:05:24 +0800 Received: from RTKEXHMBS06.realtek.com.tw ([fe80::eeeb:c765:ca73:5eef]) by RTKEXHMBS06.realtek.com.tw ([fe80::eeeb:c765:ca73:5eef%10]) with mapi id 15.02.2562.056; Sun, 6 Dec 2026 10:05:24 +0800 From: Ping-Ke Shih To: Maoyi Xie CC: "linux-wireless@vger.kernel.org" Subject: RE: [PATCH rtw-next v3 3/4] wifi: rtw89: fw: check C2H event length Thread-Topic: [PATCH rtw-next v3 3/4] wifi: rtw89: fw: check C2H event length Thread-Index: AQHdg8QOOJimJBiP2k2FD7oJsQLpw7dPROPg Date: Sun, 6 Dec 2026 02:05:24 +0000 Message-ID: <14639d0e45264f0aaed20dbc9d790250@realtek.com> References: <20261204074944.2942452-1-maoyixie.tju@gmail.com> <20261204074944.2942452-4-maoyixie.tju@gmail.com> In-Reply-To: <20261204074944.2942452-4-maoyixie.tju@gmail.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Maoyi Xie wrote: > Nothing checks the length field of the C2H header against the skb. If > the header claims more data than arrived, the debug prints of the LPS > report handler read up to 16 KB past the skb data, even with the debug > mask off. >=20 > Drop such events in rtw89_fw_c2h_cmd_handle(). In the LPS report > handler, check the event length before reading the counts. >=20 > Found with a CodeQL-based static analysis tool. Reproduced in a > userspace harness under AddressSanitizer. Not tested on hardware. >=20 > Signed-off-by: Maoyi Xie Acked-by: Ping-Ke Shih