From nobody Tue Jun 3 00:12:15 2025 X-Original-To: dev-commits-src-main@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 4bBB3g3g5Fz5xc27; Tue, 03 Jun 2025 00:12:15 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bBB3g2y4pz3WZH; Tue, 03 Jun 2025 00:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748909535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qLEIfgyI5MYFGa9o2xI0Nu9AgrCF0gMQ0tzEGNrNy/Y=; b=JJCAMF0vx39w1/SuJkq0c4a6parz0Pb/khLA22efndWkZMwFhPyyA2ryuwhxP00rWBZsHM 7RSRGDl/nTN9omZeRTW2jUFCBRgZEnIuGmXIh27LSUaGSc3gPEX4a1fg9GMzkDoq2/gJvk u9WI4B9W+duL7ISOnEmOPdr6+fzN88QlXPHupCu44/vdy2uaOkNZd/lVDmLp6EyTUUGIhh HncOMTv/xXpkR4svloba8/vxU1XMkqruspC6ZRnX+yJTkLcmv6QO/oZN9MlUCZ8brPB+ZU GuMhfAvmNtWrLazCABohfJsHA8FZp9fGQSL59p0uTgRJPsKolKRxBXWAuEIEBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748909535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qLEIfgyI5MYFGa9o2xI0Nu9AgrCF0gMQ0tzEGNrNy/Y=; b=mpR5kUvxCqOSLPRlAFsZtK966Vbqb9j1Y2ERbQakaV3zH4C58Fd3Me2hAUtGRqBVzmfBn8 GeXr4TodExtPQ/DKGrPr8cELGJGKo7CzIAAS01g/s0YxETKf+mI/iEidYiRsnGv684HDNM LH5KdotdCGT4ADsXaknTV0EtAc1Qnh3P7uI0qUemF4DaD0DilRP3bObTNrYb4rYERBdbiC YXOjZeAgd5QShMOokeNd7L5x7i7h8aj9Zp7BX7V/xTYgR56bq0fuPHsKDiOO0FtTlQmLcx AaL9YhhrccvJtsznscysnXkXSQUqHn9MXPxmufOINzS53mk34LIhcGUGJIJQUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748909535; a=rsa-sha256; cv=none; b=hRuFv9VFJijzHWxgroXhIShYcGgezZkCW99SP4L60XO7wEMmdc1PLKmBra14/9wbCHW2Qf 1Tv+wxSx+RkbgAYFXKAmlL6PgpQcinFHdyeSNSoU++iftGffSBQT0DLqQGhfYKwaiptp9x 6yOUPLzZyqsUUvBsH7wobb0StduXq7Lu2me1tWFc/PzMWBs2YhOZsR1CJUIPRJTMKQzRWV pacejD/l+daaQm3MZ3kE09XqzDuNxvg13k5YTCVhBb0d3t2K0k4B+EUoEGD+/8xM04Qqsv zW01ZiF8PyxCM7QM2k0bk7rILHBV62SNjrs/JRQ4JYQXPkFIV3VxfTgPMJVgiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bBB3g2Rpyzkl; Tue, 03 Jun 2025 00:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5530CFIu035444; Tue, 3 Jun 2025 00:12:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5530CFm0035441; Tue, 3 Jun 2025 00:12:15 GMT (envelope-from git) Date: Tue, 3 Jun 2025 00:12:15 GMT Message-Id: <202506030012.5530CFm0035441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 36fcd52c2bd5 - main - net80211: fix TKIP trailer trimming w/ no rx parameters given List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36fcd52c2bd5a8a4b3d584564852f417fb83e762 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=36fcd52c2bd5a8a4b3d584564852f417fb83e762 commit 36fcd52c2bd5a8a4b3d584564852f417fb83e762 Author: Adrian Chadd AuthorDate: 2025-06-02 00:11:40 +0000 Commit: Adrian Chadd CommitDate: 2025-06-03 00:11:59 +0000 net80211: fix TKIP trailer trimming w/ no rx parameters given Previous work made trimming the TKIP trailer an optional thing based on what the driver indicated it did with the received frame. However, for drivers that aren't populating an RX frame with an rx status - notably iwn(4) - exposed this bug. If the driver doesn't expose any RX status then just restore the previous behaviour. This matches what was done in the CCMP code in ccmp_decap(). Locally tested: * iwn(4), STA mode, CCMP + TKIP groupwise network Differential Revision: https://reviews.freebsd.org/D50638 Fixes: 731ff40069d28 MFC after: 3 days Reviewed by: bz --- sys/net80211/ieee80211_crypto_tkip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index 7169f3e87a68..1d368cf11eb9 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -370,7 +370,7 @@ finish: /* * Strip the ICV if hardware has not done so already. */ - if (rxs != NULL && (rxs->c_pktflags & IEEE80211_RX_F_ICV_STRIP) == 0) + if ((rxs == NULL) || (rxs->c_pktflags & IEEE80211_RX_F_ICV_STRIP) == 0) m_adj(m, -tkip.ic_trailer); return 1;