From nobody Wed Aug 07 13:44:46 2024
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 4WfBHg1Xh0z5S9LC;
	Wed, 07 Aug 2024 13:44:47 +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 4WfBHf4GJHz4jS6;
	Wed,  7 Aug 2024 13:44:46 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1723038286;
	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=N7RiAqDapYaI216MLrDJDcCVxFmne3BZf1/8Z7bt8s0=;
	b=bwwVK+1C6hKn9/jJ9sl388g8qh304ZAbuskCDcockbbRt2G3SX2mA9YLCDrZrvcU4dKyZ6
	hzacI85fdt/6SHqssD6w9sFlelxhb3I0KVrT6EHmFTPNKovZc3hcUhRnsCOCdUdQTvY2Yf
	OfB7DmGFLpmYMchFD3lkYgPiBLiO5oLTwQZRRUDFJS8233L98d4U72aaL0zhpHadLB9Q53
	dczRvadKYjiO5hgqcCempj7Rki26J/XsYgama3uT3ElVKUgtxL68CgMvpKn8+qcMTI6YlP
	jY4O+dYwJvk7gWvO0WyWSmEb2R66xiswpeF6DffcoXT5rvPoCh0naoKjWlFbMQ==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038286; a=rsa-sha256; cv=none;
	b=pYB4HD/AkMzCrVHNRo8uION8l9KNxswteL2GhgVcxCfjTuhZuBWkzNWFXzGSbmk72fVrvD
	K9HFj4sV5m3XyiBAKM+X7Sd/sqvuNKJHmKWAANqdChsygukWHU0HyddKYMP+TlHm8lSn6b
	vvRNnsRgTNJLq5j98xHACPbi3EfXVu+FbLP8WHBFbz7LFOo0GNjEoh8YS4Z36bNoZk3uTT
	qQUr9G2/aFD7h2ljXjL55FUfwIMLb4HKLiS6x8Tik4TwDJ5CoU9FrEWp33/8NNqG8gIMQ8
	2soDOU5WXMAHqWzB5kqeHBZixo7xGHupecIvGvniVRrr2esp/I3AKfxCbfJWlA==
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=1723038286;
	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=N7RiAqDapYaI216MLrDJDcCVxFmne3BZf1/8Z7bt8s0=;
	b=MCnx4PqcfGNYpGCXQnyK191b1lpXUD3lkFdaJdxGCV8b7UyYmY4BnKNLC5frStmx6pSOhc
	Z90ITXCg1bs87/qZzoA+G3dymk888iUDMLtUTyJc3V7CfjoVFCDXDQ2uqhJXiyUv9fPjIS
	V6zZPCnM08DhaG9tODxOGV57a+mOghj8meqx3ejZB2J8c+UBca0qa6aaZ2jbmb41M8dhUA
	Rei3rscUD/9kmbD1Q9AU4Z6MY6ub05epEdve7kb188nPsUCIXp4PLkSXSWv5C1wN3msL4a
	Q+sUe1R3g1cIs+XPzY1okZcYjmAQ2DvckzvFDbgwzF/WEdRBZxJ9BJEsuPP7wA==
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 4WfBHf3tmBzsgg;
	Wed,  7 Aug 2024 13:44:46 +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 477Dikm8034334;
	Wed, 7 Aug 2024 13:44:46 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dikbx034331;
	Wed, 7 Aug 2024 13:44:46 GMT
	(envelope-from git)
Date: Wed, 7 Aug 2024 13:44:46 GMT
Message-Id: <202408071344.477Dikbx034331@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Mark Johnston <markj@FreeBSD.org>
Subject: git: ca9580967e74 - releng/14.0 - pf: allow MLD LR to be
  sent without state
List-Id: Commits to the stable branches of the FreeBSD src repository <dev-commits-src-branches.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: <mailto:dev-commits-src-branches+help@freebsd.org>
List-Post: <mailto:dev-commits-src-branches@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-branches+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-branches+unsubscribe@freebsd.org>
X-BeenThere: dev-commits-src-branches@freebsd.org
Sender: owner-dev-commits-src-branches@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: ca9580967e7406bb23aa482f94a3c6a02ecbe6a1
Auto-Submitted: auto-generated

The branch releng/14.0 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=ca9580967e7406bb23aa482f94a3c6a02ecbe6a1

commit ca9580967e7406bb23aa482f94a3c6a02ecbe6a1
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-07-10 12:36:18 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-08-07 13:31:30 +0000

    pf: allow MLD LR to be sent without state
    
    Change PF behavior to allow MLD Listener Report packets to be sent
    without needing a previously created state by MLD Listener Query. It
    wasn't working because: (1) you might not have a previous MLD Listener
    Query and (2) the addresses of the Query and Report don't match.
    
    ok mikeb@, sashan@
    
    Approved by:    so
    Security:       FreeBSD-SA-24:05.pf
    Security:       CVE-2024-6640
    MFC after:      1 day
    Obtained From:  OpenBSD, rzalamena <rzalamena@openbsd.org>, 5c526dbdb0f2
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 1afe4da75d1d2acd33b25eea942af28aa41c82c2)
    (cherry picked from commit 3382c691dc6a0d4e1f39ff67b5507f6542972498)
---
 sys/netpfil/pf/pf.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 72814861f35f..cf1c83aceff7 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -1804,8 +1804,15 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type,
 			break;
 
 		case MLD_LISTENER_QUERY:
-			*icmp_dir = PF_IN;
 		case MLD_LISTENER_REPORT: {
+			/*
+			 * Listener Report can be sent by clients
+			 * without an associated Listener Query.
+			 * In addition to that, when Report is sent as a
+			 * reply to a Query its source and destination
+			 * address are different.
+			 */
+			*icmp_dir = PF_IN;
 			*virtual_type = MLD_LISTENER_QUERY;
 			*virtual_id = 0;
 			break;