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=1796005562; b=zHZUhCWzd5RaJmGtFEs8cTUA1KBOVTOXox8XHvlMlbImPKD/pNIbEcql+uio8zd4xXw8 mKQ/EOLkWOvxOoz375M/t6JXcbgBmMdTnvhBajyVCFL4kz/cB0MIic3vp9lN7DIgfdUz1 k51FQY0La+1OjhuRSaqnaaa428JDuEtkHXFrpfyaLKNNy0aCujBu+yOKx9M66mXzxouRV NzGvgiSitHlmSxWyAmV/jQP/j64MXug9IqOo9o9X2LtKHTQpf7kDO9BxFsjdTEZnQTUsN Vp+if9j9C2qO6yRLNjeSy7xthYToyAeFEwykWaxQkgOt0CcbRLKrqF8vjRu/AV6gJWw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796005562; 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=kMyzu1m9aDZlIRqQ/BDicuYHCRoMatkNtMa9eSlFUVM=; b=4yVCB+W19rItZnrEDU5pMI/wOr2WMEBj7uehFL0b+u/V2vBYz4Vg3475MPFUTTY9eLrb Q65l0ibNEGS6L8nx0u/jR6sBeXoWVMY/BU3e+6I0Xqd7E8DbRFhy4P7piXwiEUEulTVSH 8boFbXOJglOlCG++O1TO9UDOdSKYFlvc7JW+ShNgv1IC2b5aiYCNgx1wJFWfPKWh/fQwz x0aokoGZVSgqqsehmnAL8Peu7GgNNYUUvNAkFLnMpjd7QXY0pE23kwfDOsqH+A+r2fcM6 207BcbRJOFzadQaLmE2FJAYMyinmNoo3v1gqp3WiB8tWk5jIc3Wt+dLoPPQaC08JbVg== 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=BfptJiJA; 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 22681606A334 for ; Mon, 30 Nov 2026 02:26:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 22681606A334 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, unprotected) header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=BfptJiJA X-SpamFilter-By: ArmorX SpamTrap 5.80 with qID 6AU2PvG622988885, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=realtek.com; s=dkim; t=1796005557; bh=kMyzu1m9aDZlIRqQ/BDicuYHCRoMatkNtMa9eSlFUVM=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=BfptJiJAySUAwpDeaBidXvHHFS2SnQUsbd5cobid0AYe2gKVUpGzLvZuRhgtq8E8i N7GLjrJCA8XV7nR8zZwfpDm/QTFU4y27WRYsPS/+FmHimSh4RBwiSXHJ/bJB/ovJ+X XMh3c51BQKR1qhgsAtguMrSgqhmJIYxmJReONoqQie0NW5uCsdD7sLeFL1NDHREEvS pqPev4xUs5D2mzuKunJ+lVhQXvSx6UWKrohAYYRVHxi74kbSBTmGU40lrnu68B/XjE liQlOCTWHK4boAUgRwz11YIxDiDEPiW70Mkz0MOfoygrCLJwmMNhHsPz6rrCcBLXcL YPTHxbG/pV8qQ== Received: from mail.realtek.com (rtkexhmbs02.realtek.com.tw[172.21.6.41]) by rtits2.realtek.com.tw (8.15.2/3.29/5.94) with ESMTPS id 6AU2PvG622988885 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Nov 2026 10:25:57 +0800 Received: from RTKEXHMBS06.realtek.com.tw (10.21.1.56) by RTKEXHMBS02.realtek.com.tw (172.21.6.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.56; Mon, 30 Nov 2026 10:25:57 +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; Mon, 30 Nov 2026 10:25:57 +0800 From: Ping-Ke Shih To: Maoyi Xie CC: "linux-wireless@vger.kernel.org" , Bitterblue Smith Subject: RE: [PATCH rtw-next] wifi: rtw88: usb: reject oversized RX packets Thread-Topic: [PATCH rtw-next] wifi: rtw88: usb: reject oversized RX packets Thread-Index: AQHdfv0DbHAEs/eZGUyVsMlvNxLqobdF5g/A Date: Mon, 30 Nov 2026 02:25:57 +0000 Message-ID: <211f0a83d0264ec58b7bec18e622e0cf@realtek.com> References: <20261128055454.4121906-1-maoyixie.tju@gmail.com> In-Reply-To: <20261128055454.4121906-1-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: > rtw_usb_rx_handler() checks pkt_len + pkt_offset of each aggregated RX > packet only against max_skb_len. If a corrupted descriptor claims more > than the bytes left in the URB, skb_put_data() reads up to about 11 KB > past the received data. >=20 > Stop the walk when a packet does not fit in the rest of the URB. >=20 > Found with a CodeQL-based static analysis tool that we are developing. > Reproduced in a userspace harness under AddressSanitizer. Not tested on > hardware. >=20 > Fixes: e9048e2935f7 ("wifi: rtw88: usb: Copy instead of cloning the RX sk= b") > Cc: stable@vger.kernel.org > Signed-off-by: Maoyi Xie Acked-by: Ping-Ke Shih