From nobody Wed Jul 23 14:23:53 2025 X-Original-To: dev-commits-src-main@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 4bnGbH27VSz62NqK; Wed, 23 Jul 2025 14:23:55 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGbG194Mz3pb1; Wed, 23 Jul 2025 14:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280634; 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=5IGPkwsXViG0o0zybszZcTweHl9tABfFSjyGznSkER4=; b=ZXyBC9/UTNLIfEVKxEBP9v/0gqnBNGXmQSeaE2uFypDlus8nSxrbSTnfHoplzGlsVImEK0 9e/toCan9dan7owx8KsSaXa/DwsFzhXWcXLOgrstwn72g2hZKpUItSLA+QmZFJuXjQwEha 8keYxlrf4lMdx1HLr5cBKaH5mFv/ZcT4FD+0vZmO0zjQtI/6q5USSxE5rAhJWh5iIa5U0y VhK0V6e0nHcQvsQCyYiOyUGUZ/z0iVB43N5DjMjMFGVp+WaAvOEwgy20AdaWYXgfxayw0I Z2xjSa4E5tnKBGw/Gyv+Mr/3eYhvENudFq7quuayU54Ac2eiLgAnX1EL5NLfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280634; 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=5IGPkwsXViG0o0zybszZcTweHl9tABfFSjyGznSkER4=; b=yHtFTYyJIWYQrpru9viFUQx7jIj+OyrK4FMnkA1YtKNXKKjj5FKyUaVXhGWKMjjbvk5aBT z7rW5TntMso0Wm0bzVnMrakhC+nqZfO3qUFT1KuYmTrwMV1xDiqRebaOZ03K3+r7AfNluS 9n0Vavt+s/YAob0KQnjE6HeRvfXn3pVYiQR1pgni5MAdEjFZFgIyJlnVuloGFakwFQCna0 ePmnlkYSDqyr+8vuPZxJg2WcWMSiaKj+2OH3SEn53TOk4oKAiJ0QP/Y3rH1UIkmkf9ddad ZpkfcG+ZSyk6sBpK38srVKeLrdvofD7xCCswN9glx0HBqSJZURtvBNjCEOO+kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280634; a=rsa-sha256; cv=none; b=U8VRDZKxzCtmJ+kfBPJmTRIbBrteWxCBtPl6mfx4ycVJQt+J09xA/X6cvIM65WykOONhuO 8IA9P9EMzDFKFvSrJff/H2VRGot0HPz/dYc7ChIDXyJqu9KNBuPdaXRhXEuaOnhxxKggXE 11MZM0Aczzbi87rQGTyWaG+4/4kCDZDPqvHBUllNLfrO3AFlYvLAXlkzAOCxZyApdf9z7V JQ4/Ki5Sc+92+aZ41O6Pi42oeGNYBdCWNeHXPUSwaQDAbjcH8e6O7rjvfoylHii0JHHPeg PVaj71EZ8O+1K3VFVDfh8II564nTOxSBkNJmmqsaiP/2Hm+0W5RRMOQX8bn0mA== 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 4bnGbG06GQz22B; Wed, 23 Jul 2025 14:23:54 +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 56NENrie031364; Wed, 23 Jul 2025 14:23:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENrmG031361; Wed, 23 Jul 2025 14:23:53 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:53 GMT Message-Id: <202507231423.56NENrmG031361@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: 13cd0f9c1ae6 - main - pf tests: test truncated IP options in ICMP payload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 13cd0f9c1ae6a50d616aeea923bc96f8e54176cc Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=13cd0f9c1ae6a50d616aeea923bc96f8e54176cc commit 13cd0f9c1ae6a50d616aeea923bc96f8e54176cc Author: Kristof Provost AuthorDate: 2025-07-18 13:05:14 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:46 +0000 pf tests: test truncated IP options in ICMP payload Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/icmp.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/sys/netpfil/pf/icmp.py b/tests/sys/netpfil/pf/icmp.py index 2f40259f5665..c5e945d60e99 100644 --- a/tests/sys/netpfil/pf/icmp.py +++ b/tests/sys/netpfil/pf/icmp.py @@ -175,6 +175,22 @@ class TestICMP(VnetTestTemplate): self.check_icmp_echo(sp, 1464) self.check_icmp_echo(sp, 1468) + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_truncated_opts(self): + ToolsHelper.print_output("/sbin/route add default 192.0.2.1") + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + packet = sp.IP(dst="198.51.100.2", flags="DF") \ + / sp.ICMP(type='dest-unreach', length=108) \ + / sp.IP(src="198.51.100.2", dst="192.0.2.2", len=1000, \ + ihl=(120 >> 2), options=[ \ + sp.IPOption_Security(length=100)]) + packet.show() + sp.sr1(packet, timeout=3) + class TestICMP_NAT(VnetTestTemplate): REQUIRED_MODULES = [ "pf" ] TOPOLOGY = {