From nobody Wed Apr 6 14:20:13 2022 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 315941A91F14; Wed, 6 Apr 2022 14:20:14 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KYRVj64Mjz3Lw3; Wed, 6 Apr 2022 14:20:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649254814; 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=igsYH8UoajoeAAnjO4Szc3CYs8x8iXPwWT1DuHWFReY=; b=ox4C2mpCKTmkwzqohMP2uCEiX2B0kVSeAif2IDEfS5SASIQ/a6/YxINHdohDmfLJrBIE0n b1zEgoFmsleo455ZUGIL9gnL+2llHuRpTS8rmDTG1hCcklcAqqYpJNqvAsOXRn/oyvuIPq KVG4zNr/mJxDawIlReqatWXNguKZT/IUWgOzedDhRmP1lpNgGhF/z+NwwDid0YSzJMWumT cCYIw/+GPVBa1GT75VnRE5ncTKz3loaJwgpEmN/8Y8gHK//EwxWIvK46D6jOy/138FjsG2 kn9QpUcP1YwOWRUtTs8CDvKOuD46VfEDy9LKCT0jKrM4ataBZkgLnjbI3U2fcQ== 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 815AB1C87E; Wed, 6 Apr 2022 14:20:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 236EKDno044073; Wed, 6 Apr 2022 14:20:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236EKDpT044067; Wed, 6 Apr 2022 14:20:13 GMT (envelope-from git) Date: Wed, 6 Apr 2022 14:20:13 GMT Message-Id: <202204061420.236EKDpT044067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9752bffbcfba - stable/11 - net80211: validate Mesh ID length in ieee80211_parse_beacon 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 9752bffbcfbadf1749a2c12449603952c61bb4ab Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649254814; 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=igsYH8UoajoeAAnjO4Szc3CYs8x8iXPwWT1DuHWFReY=; b=SQDUcfw/WayDWTU4XVLz4Gy2nMAgQAtzd0jD4FE7NNOb+6WU3L2pGJNc230+R+QYSZ2cOG aaLERg+l8Fr3GjnEQgicFD/IRqpzJkdgSPpDu1LeX/3CT5mFLnTh2vrm8jwO6mHphBm3H5 w1WAaXh7otU7EHrp9C0fSv1s0e2hUHT1tDE69evU5Lz+Hx5i5oVe1KOGDyH3skdtkmDb7O WKmM31jObGbOUZA0dD45c7ZGhAGhH3Km6ynk46EjAWI/suXqrCNZo+K+lbuklO4lGBXEJq ABeV65NLkp6IzOXgDwKBGaAMtuGc4i0WboZ+wVyxO6Bnj5LyuV3yRJCHYd/VpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649254814; a=rsa-sha256; cv=none; b=KW8cW54JzojBb9F1NN6aMM3nc3RFj+3zqa/j78qZK0gm/EPcy7pyFuR+m2uHyBTEANXoyx NWYQ5iwqSTLdw0cdDnScX9sTMXP0d4MbhVhuLLRIy2Z2n5BeBZ3tAK2QENNAW5YX9DbBbA 4b8H2vWq26E8IlekSFvY2I7mX3XZ3wwqf7hSk0X5PI1Bthn+AWLci4CLDAkKWCnfxpT5ql 712LOt1/RBLnjywPLTxsCMN2u2RkhzrEi9jXGYwKcJ+TJjfCahKxiGkniPsqIMdv27uYg3 QarN21cohDgtPzERJT6GOpJdhlAbTpAL05w25YjruO6jXX6gF90ZaNzR1C5p0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/11 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9752bffbcfbadf1749a2c12449603952c61bb4ab commit 9752bffbcfbadf1749a2c12449603952c61bb4ab Author: Bjoern A. Zeeb AuthorDate: 2022-04-05 22:52:51 +0000 Commit: Ed Maste CommitDate: 2022-04-06 14:19:42 +0000 net80211: validate Mesh ID length in ieee80211_parse_beacon Reported by: m00nbsd working with Trend Micro Zero Day Initiative (cherry picked from commit fb8c87b4f3bfdfac014f9d894fe75fbad0391b24) (cherry picked from commit 72617f9246e3a4be28eeafeae1bdd983143eef3e) (cherry picked from commit e7c990ba3f8de8c4882390cad9b01a9fa25ad068) --- sys/net80211/ieee80211_input.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 2a6f2b445063..570e46421efb 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -708,6 +708,12 @@ ieee80211_parse_beacon(struct ieee80211_node *ni, struct mbuf *m, IEEE80211_VERIFY_LENGTH(scan->csa[1], 3 * sizeof(uint8_t), scan->status |= IEEE80211_BPARSE_CSA_INVALID); } +#ifdef IEEE80211_SUPPORT_MESH + if (scan->meshid != NULL) { + IEEE80211_VERIFY_ELEMENT(scan->meshid, IEEE80211_MESHID_LEN, + scan->status |= IEEE80211_BPARSE_RATES_INVALID); + } +#endif /* * Process HT ie's. This is complicated by our * accepting both the standard ie's and the pre-draft