From nobody Thu Sep 19 13:03:28 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 4X8bL83QmRz5WYFp; Thu, 19 Sep 2024 13:03:28 +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 4X8bL81VLVz4rSc; Thu, 19 Sep 2024 13:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726751008; 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=YHbG/R7n3nWgpmr0QwXHbLEYxfEAsVV0EZxLOGyZcBc=; b=QBW95/3voI+Xifwr5wYHx4oZM4UiBnxb1XaPdFooFtnKoi05q9tVdTUF1IDOSJOwbSaAey a6N7hDDUBxhSaPWdgRNvLj+7G825CzYF0/8IfAHIv51yNJJ2Edod1DAYjNr7r0tyCY2yOF skyKyZg7o5a/9Gq1tSftohl/9mU+GHzIH6k/DySAhLUwSvy3kM5HvRN9SwNsNWWyL5K7Dg /qZkVUBD3WbJnNnO2ih7GWuYCoI1hG1R98b47eCMyi7TOEnPRUMTpF9NcmMO2/6bVqYYAm 4gu64+NBnFcy/cxnTFtsMKcZRwUTi5i4R6YOdl5hPqQ+GaUo07gFR29DyQBz7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726751008; a=rsa-sha256; cv=none; b=PctqO5QaDNupxNIPV+AjlB3Ky7J+e1OhBs7jy+6NaLKlMTAkQpXORtX3D6S56V2Lxnj0jK x3aKeW23q3La040wp+YTzeCLnQ+dwfcINO5idT13UuoeIoY78lRub/B9Dk2YTYzJX5Ti9v hvpt7xlKE4j6qG5QChzoanoENefBjRxeGdj4X5Y2fuHsniied1kn4/9FgfwURAgQyLLnHc QXOmH7hM5Vd7xLgYq2juEOyljatcKY1AU4mZi7f8wTw+Dd/B7s/YEMZh64WaAwjZEkSvG1 bnaG2YdyCG0AVZNsk1vavDLzcCZlDgUR1PXGwbyJbmFJJFCTuoPnXo7BPwuyhw== 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=1726751008; 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=YHbG/R7n3nWgpmr0QwXHbLEYxfEAsVV0EZxLOGyZcBc=; b=IlkSgeiKUKwoP0dgUGvcKrGsGmvAeuLFQfDdFrRWNgAY9njYWvceRK79DTOy1egvGIqzZJ ZjMt9v6QCPJKy3c6PkkzTX9gl6uSzuJtOchEW9wvNP+OqXyV06m27Ysa3DsC+3PtjG1lU+ 8VlW6MibCN/rzCOH0hU6RbKrkykLeCBQxa+PxduUD5nLYycfhdmB84HSeUJJvAxIkycyq2 NUzzOQ1dmyu2jt2ugf3rgRYndlS669vW6SchbFmZ8niOfZJv+NzARcIEBiGbiarepZYkFn 0jyFkJ4GjJZH6B1ZGrHQ4edEZp5rMKT5Smuugn3jOCYYFAOwFWfxwW02AgYAXg== 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 4X8bL815ynz16Bm; Thu, 19 Sep 2024 13:03:28 +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 48JD3S2C000347; Thu, 19 Sep 2024 13:03:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JD3SNR000344; Thu, 19 Sep 2024 13:03:28 GMT (envelope-from git) Date: Thu, 19 Sep 2024 13:03:28 GMT Message-Id: <202409191303.48JD3SNR000344@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e3773ad4716f - releng/14.0 - pf: try to lookup the icmp state based on a correct packet descriptor 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e3773ad4716f975b8e8dc4e013bcb044278d8d27 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e3773ad4716f975b8e8dc4e013bcb044278d8d27 commit e3773ad4716f975b8e8dc4e013bcb044278d8d27 Author: Kristof Provost AuthorDate: 2024-08-26 14:42:05 +0000 Commit: Mark Johnston CommitDate: 2024-09-19 12:58:34 +0000 pf: try to lookup the icmp state based on a correct packet descriptor Approved by: so Security: FreeBSD-EN-24:16.pf MFC after: 1 week Obtained from: OpenBSD, mikeb , e467ea25dcd3 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit b8cd169efa6ac0899b4998898129765ae5c685a6) (cherry picked from commit f40b0e735177b25ce67fb488a93834168f4c16e1) --- sys/netpfil/pf/pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 7b501cc54b27..49bfefa2b6ed 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6709,11 +6709,11 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, pd->dir, kif, virtual_id, virtual_type, icmp_dir, &iidx, PF_ICMP_MULTI_NONE, 1); if (ret >= 0) { - if (ret == PF_DROP && pd->af == AF_INET6 && + if (ret == PF_DROP && pd2.af == AF_INET6 && icmp_dir == PF_OUT) { if (*state != NULL) PF_STATE_UNLOCK((*state)); - ret = pf_icmp_state_lookup(&key, pd, + ret = pf_icmp_state_lookup(&key, &pd2, state, m, off, pd->dir, kif, virtual_id, virtual_type, icmp_dir, &iidx, multi, 1);