From nobody Wed Jun 11 09:14:18 2025 X-Original-To: dev-commits-src-all@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 4bHKjR0CbYz6000x; Wed, 11 Jun 2025 09:14:19 +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 4bHKjQ4Jkvz3llP; Wed, 11 Jun 2025 09:14:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749633258; 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=25dwEvO1MzPUxl4ePLxUpdqrw2QDz3bVcMwXzP81re0=; b=fYduTI0zR+r1/vtrmWh8mPivij9L+30tt7WfR7JPVvy8vil5GvnPJmrW7L6XztLF9UCu6u sS+hsozSKBn9uzMUiniDdHBTHd9R/N7ruM0IeMa+IeKA0Dy/VHACUOi0SNnSB4jNsLEjEU lRiBWnMTGGkg+NYNqOP9H1THBt0EwxKNXNGYiZCG8z4ctg4UwjISw+noKphRloElgvxNuH mCS5ORM0t8tOGqseNQ4Bntyd6M4wRra6hSAjDzrK/8jh9W0hYcOLsKb8LD+7WaI2Duvw7+ CQ2yNnLuGrh+2wugMldyVhhLvQm4uM5DttKZSA2Y2FTOt04/47BuPEGxwSjZTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749633258; 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=25dwEvO1MzPUxl4ePLxUpdqrw2QDz3bVcMwXzP81re0=; b=ALcxCwWIJe9e7s98l7TTGu41x1Mkn6+WQxjFlwHpF/kHBJ+2cj/uxxOUlh1KY1SSfWmbCc o9i+TlswhNVSj0MTQjz68rUmQY7PJ4Vf/JSczEtqE9+evQQIVpTkuRZJ8cg2VHdcwFIQj1 nQBuCVKNO4LdJwNr5Cb2mjX7RXmNuYvNqYWYYqbxe7QNjVAE75DV4X+go+pLTWuFWCRPBg /QqjbSg1bHiSBbI3Kyrbmts9fLc/KMphavENb58ZFpSN5NMGtn3HVZeVoMdJPElVAsFpaq ZM//vIRelw7jXap+Xit/MnxBnu2/jTzo7VU86/4bGLhr4uBg4SNP/mFSCORi5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749633258; a=rsa-sha256; cv=none; b=QF82JJ68zTQbRxDVBpGxVrpsaKbrtnkpIpmqS4xsFdTLvO03T0aWjdqZUO+r/mfPMrgZvD RIIWyPLBMiStFzHqU6uLVMnPLR7jp3wgfcfjBkcSMnXUHZvuU65UZrLpOJRIw666Mmdffz UHbLL0ue5TP48G1p+MGh3x588Csy6MW555FowO1+XqXI4gSB52F1YjSApPMF/Y3syLSH8N Cdq7qAD2E+P6rEqKkEXdP1VDhtf6LZ8RJdOunwyqtfTE6GVcXQCR4st3TfdJWOjeQ4aTaC JYfG8z/XBoibXk4iK0B988Rq5dDLPw34NLFlLKaIwAatFkEGFBbeLtxfz5jaEQ== 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 4bHKjQ3vq7z5n8; Wed, 11 Jun 2025 09:14:18 +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 55B9EInQ062055; Wed, 11 Jun 2025 09:14:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55B9EIE5062052; Wed, 11 Jun 2025 09:14:18 GMT (envelope-from git) Date: Wed, 11 Jun 2025 09:14:18 GMT Message-Id: <202506110914.55B9EIE5062052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 897906f49ef2 - stable/14 - LinuxKPI: 802.11: WEP noise List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 897906f49ef2e7497db295a978e5aac40e3e02aa Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=897906f49ef2e7497db295a978e5aac40e3e02aa commit 897906f49ef2e7497db295a978e5aac40e3e02aa Author: Bjoern A. Zeeb AuthorDate: 2025-06-05 11:11:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-06-10 23:38:31 +0000 LinuxKPI: 802.11: WEP noise While we decided that we will not provide WEP support for the LinuxKPI 802.11 compat code, some of it is in there already (also because drivers still support it). Put proper keylen checks in place as net80211 only knows about WEP while LinuxKPI has WEP40 and WEP104. Sponsored by: The FreeBSD Foundation (cherry picked from commit aaee0ed3d163a1d29ea74d7e4d2c3658a51cfb27) --- sys/compat/linuxkpi/common/src/linux_80211.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 5653bc2ffba2..89c067409774 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1064,10 +1064,15 @@ lkpi_net80211_to_l80211_cipher_suite(uint32_t cipher, uint8_t keylen) switch (cipher) { case IEEE80211_CIPHER_WEP: - if (keylen < 8) + if (keylen == (40/NBBY)) return (WLAN_CIPHER_SUITE_WEP40); - else + else if (keylen == (104/NBBY)) return (WLAN_CIPHER_SUITE_WEP104); + else { + printf("%s: WEP with unsupported keylen %d\n", + __func__, keylen * NBBY); + return (0); + } break; case IEEE80211_CIPHER_TKIP: return (WLAN_CIPHER_SUITE_TKIP);