From nobody Thu Mar 16 10:01:26 2023 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 4PcjTM3Fxlz3ydy5; Thu, 16 Mar 2023 10:01:27 +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 4PcjTL69yCz45RC; Thu, 16 Mar 2023 10:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678960886; 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=UuXFwQNpV0ZZkYw1AjRT7O1CXYPXD4cMoQNv7Yls1Ug=; b=nBU+T/0Csyc/ft0NI8wuiwY2hUG2Ldn8VHg9Ezm5LulDljrcSBF7BSqOGt3dgDm66GOt3l JSJ0XlMGegeocGm1GaQvAtn1cLRBIbCZ9QQQ3nJBxO0Nm/Kj7hsO1jv/CX/dWbijCTYd3W l5189PpFfiPooDPny3/KxcsOjIXy+0jjnMQRVOz/bIo6sHeZJ2mDTD5jGbZQg/q9Kk8Hy4 60ab7CWdHcKmKGZR5/TUZpftz5YKS/PATsz+FmxtBOLPootuQ84lUmrRAQg+4NNroBhlLn tPwSF30/FzMSDxd3SI62L/D7k+S5uDjxDk2Psrb3FUaXDTr1TJmxef0VSVb+bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678960886; 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=UuXFwQNpV0ZZkYw1AjRT7O1CXYPXD4cMoQNv7Yls1Ug=; b=DHCvCix1eYHoVX1SiskeO9IvNp6yW8Z6g62eZbRt8r+Z3Tl9VYz1M4LsHwsvEhDP7ha5LZ KNwlV4FkIhp9CcdruC3Bt1CcaV8aG5fZH4XUN5r3cZ5odnx0BQigPtgvkXGMT9w3A+6R0H RodI0HFBchZ36WqFeRcW0T7KfwbGq2Unz29vT5Eok2dvTQC9IZg2wOFyC3Zcd0FQh/YE4j JU4/+ZVH7j3nNDi1A3dlOkIb26NQ6TDiuiXNmTxIrBsX7zADNHR2WEkDDcrMK0zKJA+Vdu OR6YehIXLZ4vKIXnyPa0VMMN6S+0o9B20mH4SpeDMwCJjOFA6Nw5gz/jdJv55A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678960886; a=rsa-sha256; cv=none; b=mSOeRYuFl6ZZn9hfxyvQ+BMS1UpZwwXEg8GJvaw7o5w6h5TjyfsNZFCphXvDrnjT59iF1B 5KsMvDj2/rgmBRj8zmsU2ZFaiemcx5PWqiHQJkvQDrg4L3RUDWCtBx9lk1aNJdbjPaj8PO 3T2vMupQw6PuhLVMItKyKjkHxcM9LdRwuKP4zYuqgvL+/IC0DPlkbw52ZI73G0W+ZQOj+R k1GTZuDz39ODnSNL2rhRnXHPTZz8eB5vhCOjLgGNJ0XF+1cWOa7igWMplyaAkgDaj1T89N WTZYb/7XNQCvCPdPbRW5CIBie1xcb4NUeuX6XZfaoj/Oks5wev62MLF41Ecnsw== 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 4PcjTL4nJ8zfFq; Thu, 16 Mar 2023 10:01:26 +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 32GA1Q4v062752; Thu, 16 Mar 2023 10:01:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32GA1QqA062751; Thu, 16 Mar 2023 10:01:26 GMT (envelope-from git) Date: Thu, 16 Mar 2023 10:01:26 GMT Message-Id: <202303161001.32GA1QqA062751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 225e85513fd7 - main - pf tests: test IPv6 fragmentation with link-local addresses 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 225e85513fd7a5e31f649e35f0b99454bb725776 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=225e85513fd7a5e31f649e35f0b99454bb725776 commit 225e85513fd7a5e31f649e35f0b99454bb725776 Author: Kristof Provost AuthorDate: 2023-03-12 15:08:31 +0000 Commit: Kristof Provost CommitDate: 2023-03-16 09:59:04 +0000 pf tests: test IPv6 fragmentation with link-local addresses We've observed a panic after pf_refragment6() with link-local addresses, because pf_refragment6() calls ip6_forward() even for a simple output case. That results in us entering ip6_forward() with an mbuf with a NULL m->m_pkthdr.rcvif, which can cause a NULL deref (but seemingly not for GUAs. Test sending fragmented link-local packets to pf. MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39063 --- tests/sys/netpfil/pf/fragmentation.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/sys/netpfil/pf/fragmentation.sh b/tests/sys/netpfil/pf/fragmentation.sh index 03ba5030d8aa..554a9fdecc09 100644 --- a/tests/sys/netpfil/pf/fragmentation.sh +++ b/tests/sys/netpfil/pf/fragmentation.sh @@ -103,6 +103,10 @@ v6_body() jexec singsing ifconfig ${epair_link}b inet6 -ifdisabled ifconfig ${epair_send}a inet6 -ifdisabled + ifconfig ${epair_send}a + jexec alcatraz ifconfig ${epair_send}b + lladdr=$(jexec alcatraz ifconfig ${epair_send}b | awk '/ scopeid / { print($2); }' | cut -f 1 -d %) + jexec alcatraz pfctl -e pft_set_rules alcatraz \ "scrub fragment reassemble" \ @@ -120,6 +124,12 @@ v6_body() atf_check -s exit:0 -o ignore\ ping -6 -c 1 -b 70000 -s 65000 2001:db8:42::2 + # Force an NDP lookup + ping -6 -c 1 ${lladdr}%${epair_send}a + + atf_check -s exit:0 -o ignore\ + ping -6 -c 1 -b 70000 -s 65000 ${lladdr}%${epair_send}a + # Forwarding test atf_check -s exit:0 -o ignore \ ping -6 -c 1 2001:db8:43::3