From nobody Wed Feb 12 10:29:16 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 4YtF0r3VVTz5mXdw; Wed, 12 Feb 2025 10:29:16 +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 4YtF0r2T3hz3bDb; Wed, 12 Feb 2025 10:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739356156; 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=ChI5iIiL6afG7+xjsJuTqXOVNnC5mxkrDXMDVeC2uFk=; b=LEf9YsN6aIUXaZVWGC8+pfl3vZ3kt69Rvl2bxu23ELQ7da1f8YEHIYOlIcxXh6zJLGKqX+ PI2d2D7e0hDliBuNg6r0L98Q1yt3VvpopelvTSPe/zeAFMf1dt+ElEDVGJYJGK32mNYh7L jq/4Y+3fgHR+DaQCy1e8SAS0PJH23dtWCWhlGrcbf8hbsBKOg5gR0do1H/mZ0ULVRYhaxR Y3L4m9rGY7IFn+AxZZZED74iAW0DchujaA8JJo4d0/+Bc0bnQ3QwOVMTpLRJh9h7s2C8d3 jv8Lc/8oqeTS3by+04FQHVBEs+uGRdGUrxR0ql9hytOZLqaUeB1LBaTHu36bCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739356156; 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=ChI5iIiL6afG7+xjsJuTqXOVNnC5mxkrDXMDVeC2uFk=; b=p0YjU7BUQs0Wj5zfwqrvKf6U1tQju12op+70zzQg5PPo7GQgfwnCCFZN70/IphWhR3GyCE 1TzZajlgAGooiTYwpnyrCqIjHwyvy0nOFm+rzoHGiqFZ6qpnoHYXL6XzSdn5Dw5BMw8yWK XaGTDKofQZ1QrojBHPk1L3LqIsd3qbpbImbOdEUIy9///sUEQ1FGkKNcY1kdv/bUz1hSma 28ysqh00Ufq9jXxa3k1zVALWSuzfZYrxb+MSAxeDNQgJQV5ZTRoNxTBwnmrx7QkxoiY46B scHexGbdNsRjzFdxUexobxlm53n/OPBs0pmQQl0Bjtk5aonBKgtcke+69Aqw5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739356156; a=rsa-sha256; cv=none; b=H3mLiMFUWiv6haMPJTE822lw5wB3qhbiwfAQETsspTFEhA2iZQJki7un8GhELZ8yAfsZd6 K9gCsOCvvD+PW4fMNJWTiZwEmDdkqk6t+2RJowLe3+94GMhWLSRBOP5u5BWY1XUX+v8dvG bs3GporvhOWAzNCsPiUnYQ9f6gfR/FsxFaPCeKEWe5PkJ0VBA/qUvtLrOeKwjP0uvDc/O2 qwa4iqqrY43QAV7G//CL+N5O6+fU0rAo+R3Cu/rUw9UKUomzWCE5cqlOBSM3cZgaSFL9Dd AXkzfHqUJCV5Kooh/CdpRMBvTgJ8/Q6DGZGjwLuhz9zDsiEFIYbYvOYIC2QC9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YtF0r219KzvyB; Wed, 12 Feb 2025 10:29:16 +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 51CATG6t031554; Wed, 12 Feb 2025 10:29:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51CATGhq031551; Wed, 12 Feb 2025 10:29:16 GMT (envelope-from git) Date: Wed, 12 Feb 2025 10:29:16 GMT Message-Id: <202502121029.51CATGhq031551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 90ecc3fc679d - stable/13 - icmp6: rate limit our echo replies 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 90ecc3fc679d1df50772327d80e0d28f59e584af Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=90ecc3fc679d1df50772327d80e0d28f59e584af commit 90ecc3fc679d1df50772327d80e0d28f59e584af Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Michael Tuexen CommitDate: 2025-02-12 10:28:44 +0000 icmp6: rate limit our echo replies The generation of ICMP6_ECHO_REPLY bypasses icmp6_error(), thus rate limit was not applied. Reviewed by: tuexen, zlei Differential Revision: https://reviews.freebsd.org/D44480 (cherry picked from commit 32aeee8ce7e72738fff236ccd5629d55035458f8) --- sys/netinet6/icmp6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 258f4bed794e..09cb893b57fe 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -536,6 +536,8 @@ icmp6_input(struct mbuf **mp, int *offp, int proto) icmp6_ifstat_inc(ifp, ifs6_in_echo); if (code != 0) goto badcode; + if (icmp6_ratelimit(&ip6->ip6_src, ICMP6_ECHO_REPLY, 0)) + break; if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { /* Give up remote */ break;