From nobody Tue Apr 05 22:59:53 2022 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 0EC011A927F4; Tue, 5 Apr 2022 22:59:54 +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 4KY34n6Ysrz3KsB; Tue, 5 Apr 2022 22:59:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649199594; 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=QH1SgDR/+8BLim8CgFkikBu8zISCr9dq6FiC8K+eE70=; b=h+qLCGqMdRGJMdGCXhaHYnjutYSnq+uP5FblYqkeCR6r7WojuPPMEfw6p6ADtzRoSR6zrX JzTxVb+O6Xm/zkC1w7nRi3kdfjmzHKuoJHTQp5PfQEpr5q1O7uPE2hgwnnbEGfxcKKqVsT V1O0rT3Ys16LSh1LvcnJ36rGUZW33gr62mZQ81SYAS7d8gzrvMA18wIoJkiTxrH0ntf2FJ nJFSA3ILDm6WgqD8Wv4oPozLI8tTQM3D+ImTyU9bHXuoYZm9CwQ3JHa12IpNSh+U6iVItc qZXWmE1Cn9++qzf5xDd5Obv35vTGn6EBskyQ+/B7fMmJ/a9wHMGU+lWvGQpucA== 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 B5BF76F7D; Tue, 5 Apr 2022 22:59:53 +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 235Mxrk3096631; Tue, 5 Apr 2022 22:59:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 235Mxrqd096630; Tue, 5 Apr 2022 22:59:53 GMT (envelope-from git) Date: Tue, 5 Apr 2022 22:59:53 GMT Message-Id: <202204052259.235Mxrqd096630@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: 72617f9246e3 - stable/13 - net80211: validate Mesh ID length in ieee80211_parse_beacon 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/13 X-Git-Reftype: branch X-Git-Commit: 72617f9246e3a4be28eeafeae1bdd983143eef3e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649199594; 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=QH1SgDR/+8BLim8CgFkikBu8zISCr9dq6FiC8K+eE70=; b=IxIfTim9rmKbej6Bs1wLU3najfWgvlAYezbVE8KgdYYK9/bEvR7BVJ165A3LRDzafFAOyV RbB2woUabv5qiRC5zmheUq+MeGEAyjm9uFzPl/wdRNvx6vjYIGQhneadeZDg7IjDx82mUH Eu8sIo9FS46+1VlGn0YkzwefXLqUey3E0hzuyaU+u787ZR1ZmMPaAuWmoKhKkU2cQT+6zZ r1vlo0Om6x7ltsPR0uTwCmF9+he45AW9M1gk7c5jWW5WFSJa0xSZjv3TWuEdGvNvvlNCdf zImQ1YEGCbl0gOmnxhoAO2RG5Sw9Q0JcSQ15VpuE0fE6BViqGmJClPyvvVMqRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649199594; a=rsa-sha256; cv=none; b=UtFQH4o+twhGK2C5nV+dbt/02L0ZowEWxDGf1fqBMnwn922xe7hVv1XJWpKzQkzkNVZixI 4wiwAYoFjPGYOzqDiOEDGiD3HpwncYnZU40M/+nZuXMb2CB9DL//NwCOcPrA3tbxFI8OJD McW/Vd5+Cx8ga4K6SjJvJvkx5wcbub3zZps5xSQneNgG9X7D4mz1CxzvU1F008hfjYwgvq 2+Cr2h9rC7q3+HXzMztwO1dANupu1tSbkkaDoJkyVGC/hav1QkTyWhfU3zte5XxqQNAvxs K1ngTya7MGJGoegp40aRKnRo7EOm7pDpb0wm435UlnuCbZfV6Ww0eRBJujBSEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=72617f9246e3a4be28eeafeae1bdd983143eef3e commit 72617f9246e3a4be28eeafeae1bdd983143eef3e Author: Bjoern A. Zeeb AuthorDate: 2022-04-05 22:51:19 +0000 Commit: Ed Maste CommitDate: 2022-04-05 22:59:22 +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) --- 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