From nobody Wed Apr 6 01:56:58 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 9EE221A96DC9; Wed, 6 Apr 2022 01:56:59 +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 4KY7172SFSz4TCl; Wed, 6 Apr 2022 01:56:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649210219; 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=7j77fzOCxfYQdBSWGempSVCGN6sEfTVfBXkuNucmN9k=; b=dYC1j0JGJUdHTKS/J+MGgomnp/hSJC9ie5mKCjwKjRdnMqNwWyzvLMiLc0eMJl+tzLlRD6 aMViyoCZsEnhM6Cq1nOIlUGTG7b4sSL0QrM7Qxcf1qyPcEqb9atdjmYM6nAr7RSUIW3EXF 3eKlILl1MC223sBJXyB8vbIyYmfmFUiwFMYAfBb60zVPCraGzuDWccH5l+kdyoatfs+nXq MvPbgTE6N77rpcSLiw6hGl+1oeJ4jagmysWkxzJVrN+wgVjKNvCS8gL89aPnzl9aEfcqU8 ElWj3QCqa6oGyt6YGREF2VeCGpFfRuMpwzMUzm6OW4gngQGsLbl+GVkuV3Eu+w== 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 DA11D12345; Wed, 6 Apr 2022 01:56:58 +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 2361uw4c038699; Wed, 6 Apr 2022 01:56:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2361uwMD038698; Wed, 6 Apr 2022 01:56:58 GMT (envelope-from git) Date: Wed, 6 Apr 2022 01:56:58 GMT Message-Id: <202204060156.2361uwMD038698@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: 00cc1ce78da3 - releng/13.1 - 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/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 00cc1ce78da3543ebfa7172323cdaa8ca290b55f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649210219; 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=7j77fzOCxfYQdBSWGempSVCGN6sEfTVfBXkuNucmN9k=; b=ey4Hn0fd2HTb3Fd0pW1dRNDq9hPFtfm4aNdKB96qyP79TiTDzcIU8+hJuHJ7FhVub48WiE feLqeNeMSCkL/aR/9DOzofduJ1ctaV1f3nRkRRFE9XQpPpLy1zcgKX516TWrYs8jcL4R8N zd7KJUSqHs1yIGd1HM/GA9+maJ/r05ESxggW1PGILqy6c5WpKUb1zvEosQwWdHE4BYsXRo jgHJhhhq4EOoVSFF9D8KIgUE+TQGl7661R4S/Ys8KW/9zlNZOCx19bjaeoLD5mn5TdB0JC IQs+xVF0dwjF/GHJJ0T7qxSpe8pFjdTRZp1j91J1pjhTUMgUcHplyfcGITDYsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649210219; a=rsa-sha256; cv=none; b=ikExnZZWcE4YKAy6O/vFZnrqLh//zQKOhJDp5xmKizAJejy4myZAxDooVCSCMZVRi392rm VuRAJSNJgRpHmkNceLRJ0iQGN3/iwOpDKr0wv2hdbicYYoauZYadpns0fGU8MIAWH6Sm6n uIBsqSvl2LYHOwpYJZ23fyjuvV1EZCyMw6oI5+FBvI98Rirq8uOEwpF7LQDkZayBmIS4eT H5PAPrq6pX+zh9DvohJl8ylFKJYH7fKjvnWCvvVR573vs60llTnixMbGeclEuPmOV9Kjm4 r0H22IugTlZ2qAUFa/ubGpzyop4cxHhpxkDifgbs7MfkhvY80GNz4TqKEN/yww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=00cc1ce78da3543ebfa7172323cdaa8ca290b55f commit 00cc1ce78da3543ebfa7172323cdaa8ca290b55f Author: Bjoern A. Zeeb AuthorDate: 2022-04-05 22:51:19 +0000 Commit: Ed Maste CommitDate: 2022-04-06 01:56:33 +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) Approved by: so, re (implicit) --- 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 516de781e23e..7406c92d6d0e 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -742,6 +742,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