From nobody Sun Mar 24 16:19:32 2024 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 4V2h906bbDz5G0Fq; Sun, 24 Mar 2024 16:19:32 +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 4V2h904XS6z4GRC; Sun, 24 Mar 2024 16:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711297172; 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=/qjdQ68XQTaQDsiQ8xRw7+51DQfTEwEjJJv47rYNl5c=; b=ojaG79F+lBAA4PLkZxXMvaU6zwuacZgklHtGEyHZSRddPWB0jEfWLlSiXVGoVVRe/fxGCq 5R2DicaEDiA4ZQBPBG1sOtmx48T73D1RPRSvXRlR3rTdoGdjWMoOerxSgCozmEJV+MrKiP MfbrO9/AdyN6OA9IxbZveDdoqWBg/0tCBLQdAfoQMsj4SphqrLmfEjUAa35c0MS1PsuCYD fvbarElHjw2XBf7vHzw93R/5gpUAML6q67YtuVyuMB4K0pLD1yZ7VrwQ8gV2shGeVLqGW7 4OvN74p4zDveDgqZqGAfIv6TCV8NpbGr8dpT5ERJ/89slcNqBe6IIYCppZx8ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711297172; a=rsa-sha256; cv=none; b=lgFu+FSikCkXvsL107xujejHZ3tB8E6BzpEu/W+vVN9s6lYikqqpxOKOt+8+Bj4b20zipv Oj06ZgPTBOqh+e3RLv8eElLgcKEeEnHZ2F/i8MlVpZVmzTpMWEyjHEaK9L7QkP0wki3xv1 STp6ZCJmgdi2bZjDmTg4zl5Ham4Gw2fVJ3SZ85z23eu1uccbcHLmspdwnspQrHCH9Xy+Lu pMgigHQwvtt7IIL+ftpJdqwVjAZfJiymivKc+4ykmM99tpmJKZmKtdtrxwEzmpIR7vK0JJ V/xgHUXJK6dplFAVb5XTNlRwCzB/GtSERZUZCz6CNxSzaX3WqX2Gu07uj8i7eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711297172; 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=/qjdQ68XQTaQDsiQ8xRw7+51DQfTEwEjJJv47rYNl5c=; b=ZeMhox7Es0Yo1Im239aevPK5qrCnvx5xZUo9zGkjQFlBnvjUEFVzkK12kxI3QYlovXGMGO xPcbiI3b7U0F8ZScDWf/EI6d4XbSgAqfwMai3SfZJDMDG768Xvnex5VtGSQ9zLoXnISa2p gEufD3cMgWiWjCfVVArD9DFbanCdC4KHthajO7HhizjQiywYuAg5H4DwkcBXNPe8W/FcxR a10MT8weBHP5YSn7+lVYFpLgWRafdnwZuxoe9r3VhM0bdGKrGtgd0Yjg6EYa+fPWbpQe3j sxLJkx8m6ZDAF3lPA/RdVyRGCDe5WyIqBVQcBPrtOOi4OzCN++mV6u1h+z+cxw== 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 4V2h9046Bbzf1w; Sun, 24 Mar 2024 16:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42OGJWLf079558; Sun, 24 Mar 2024 16:19:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42OGJWFQ079555; Sun, 24 Mar 2024 16:19:32 GMT (envelope-from git) Date: Sun, 24 Mar 2024 16:19:32 GMT Message-Id: <202403241619.42OGJWFQ079555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 32aeee8ce7e7 - main - 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: 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32aeee8ce7e72738fff236ccd5629d55035458f8 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=32aeee8ce7e72738fff236ccd5629d55035458f8 commit 32aeee8ce7e72738fff236ccd5629d55035458f8 Author: Gleb Smirnoff AuthorDate: 2024-03-24 16:13:23 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-24 16:13:23 +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 --- sys/netinet6/icmp6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 260f5c7e2467..321622bcf7ef 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -546,6 +546,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;