From nobody Wed Sep 15 07:43:54 2021 X-Original-To: freebsd-pf@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 220CA17D1639 for ; Wed, 15 Sep 2021 07:44:12 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H8XKR2RC9z4g7D for ; Wed, 15 Sep 2021 07:44:11 +0000 (UTC) (envelope-from ozkan.kirik@gmail.com) Received: by mail-ua1-x92e.google.com with SMTP id 88so149733uae.10 for ; Wed, 15 Sep 2021 00:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=AFUaapEinB9S5PY+U6BGu0ntDsaaXzvCxBcA1aNbuMg=; b=bgjP3y4bWijg1Hu3jZZcf/p+wjOO0inmqQkCf62Aw084OxwPEb4+v3s95hX0ZV5aB5 5ZMDII+IfZ5ucSL0yUfB8ju1WsCB4/PsSaXf0Pyn0i6zD24vAo0loyO9f/zZRhV/xeko F7bVCpFYhI2OijZk5AdRns4Koe7Z7ncyc+krnh+Hk96J+srLpGInnpwMBiaDo/Dmhobl 2fHi4TWcazQn3dIWX0txxMvFbuK/KZNqWeyhmJVFZtduvlt+hkYbKpQphj0Zdcg6AVod xDe/DE86jaqyn2z6vT4mZyAkw2gFXjjEHOOTITw2s/ZqqFaH0ZzfWqQxB/fyfazgGJF+ qjlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=AFUaapEinB9S5PY+U6BGu0ntDsaaXzvCxBcA1aNbuMg=; b=xxJWOmReXu3bk8HGAhnJ03sLe7mVqso1w0bY+W/BuFxRRr8pypj4aJFGwJoWGEZokj UIqx3JU8dE7357UKd+t/U567Cj+jYv+SUyDRZ8vq6XmC7cNieUwZmgZ2f7XdTjdnnOLW Ls8DJlrEluHZdXAi0z4urLK7rddtN035WHHo8JNmsUKTGKYfKmDt2qckDYc9CJ1DMhUZ OdDdYUNN9K5j07wQYtkX91PGL/uqumNXt8VoA+ysaLFMeoQFy7mzXhmKbLT1OZqbTvYS nSgWtvvktlHo/Yg7PFc+p9JEPq5KxHBX5pA4LkCnoQGxyfe0lPGp9JbtIr6D7gHDMUh7 Mxkg== X-Gm-Message-State: AOAM5322VF0hoCneGeYMyPx2p96y200fgVdybn9estAAfAlrup8A21Wf BL/Lyopv1k8qy8YwYeCZ5+ZtksiEkYRoTh+5+VgLJuMfWpc= X-Google-Smtp-Source: ABdhPJz7d6lDC0eyKaw+87ApPNYvlbJQn+OYs9TQUGIyfvi7k1yE6VKOe6SPiElBmvKsSb0yek1/MOpBwkZC9lwZ9Og= X-Received: by 2002:ab0:60d8:: with SMTP id g24mr7570922uam.110.1631691845206; Wed, 15 Sep 2021 00:44:05 -0700 (PDT) List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 From: =?UTF-8?B?w5Z6a2FuIEtJUklL?= Date: Wed, 15 Sep 2021 10:43:54 +0300 Message-ID: Subject: pf label $nr macro expand reproducable bug To: freebsd-pf@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4H8XKR2RC9z4g7D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=bgjP3y4b; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ozkankirik@gmail.com designates 2607:f8b0:4864:20::92e as permitted sender) smtp.mailfrom=ozkankirik@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; SUBJECT_HAS_CURRENCY(1.00)[]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-pf@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::92e:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi, I'm using FreeBSD stable/12. I've tested this situation on stable/12 both 0f97f2a1857a (Jul 26 2021) and ebb3327d09ce (Sep 14) build. label $nr macro is works as expected for most of rules. But with the example below $nr macro was expanded incorrectly. Outputs are below. If you need, I can open a PR. # ifconfig -g lo lo0 Experiment #1: The right output should be "ruleNo:2", but system expands as "ruleNo:257". # cat pf.conf pass quick on lo from lo:network to lo:network block quick all label "ruleNo:$nr" # pfctl -f pf.conf # pfctl -sr -vvv @0 pass quick on lo inet6 from ::1 to ::1 flags S/SA keep state [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] [ Inserted: uid 0 pid 17691 State Creations: 0 ] @1 pass quick on lo inet from 127.0.0.0/8 to 127.0.0.0/8 flags S/SA keep state [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] [ Inserted: uid 0 pid 17691 State Creations: 0 ] @2 block drop quick all label "ruleNo:257" [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] [ Inserted: uid 0 pid 17691 State Creations: 0 ] Experiment #2: The right output should be "ruleNo:2", but system expands as "ruleNo:17". # cat pf.conf pass quick on lo from lo:network block quick all label "ruleNo:$nr" # pfctl -f pf.conf # pfctl -sr -vvv @0 pass quick on lo inet6 from ::1 to any flags S/SA keep state [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] [ Inserted: uid 0 pid 8726 State Creations: 0 ] @1 pass quick on lo inet from 127.0.0.0/8 to any flags S/SA keep state [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] [ Inserted: uid 0 pid 8726 State Creations: 0 ] @2 block drop quick all label "ruleNo:17" [ Evaluations: 0 Packets: 0 Bytes: 0 States: 0 ] [ Inserted: uid 0 pid 8726 State Creations: 0 ] Regards Ozkan From nobody Sat Sep 18 08:10:19 2021 X-Original-To: freebsd-pf@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 4BEBE17C589F for ; Sat, 18 Sep 2021 08:10:39 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HBNmb1k7yz4Z7Y; Sat, 18 Sep 2021 08:10:39 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 02C5E25699; Sat, 18 Sep 2021 08:10:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id C2FEB28179; Sat, 18 Sep 2021 10:10:33 +0200 (CEST) From: Kristof Provost To: =?utf-8?q?=C3=96zkan?= KIRIK Cc: freebsd-pf@freebsd.org Subject: Re: pf label $nr macro expand reproducable bug Date: Sat, 18 Sep 2021 10:10:19 +0200 X-Mailer: MailMate (1.14r5818) Message-ID: <90E32279-76C0-4D81-B209-BE85A181F874@FreeBSD.org> In-Reply-To: References: List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N On 15 Sep 2021, at 9:43, Özkan KIRIK wrote: > I'm using FreeBSD stable/12. > I've tested this situation on stable/12 both 0f97f2a1857a (Jul 26 > 2021) and ebb3327d09ce (Sep 14) build. > > label $nr macro is works as expected for most of rules. But with the > example below $nr macro was expanded incorrectly. Outputs are below. > > If you need, I can open a PR. > > # ifconfig -g lo > lo0 > > Experiment #1: The right output should be "ruleNo:2", but system > expands as "ruleNo:257". > I can’t reproduce this, either on main or on stable/12. Br, Kristof From nobody Sun Sep 19 16:35:36 2021 X-Original-To: pf@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 D36A817D2BAE for ; Sun, 19 Sep 2021 16:35:36 +0000 (UTC) (envelope-from bugzilla-noreply@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 4HCCwm4jxrz3DW5 for ; Sun, 19 Sep 2021 16:35:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 82DDA2055C for ; Sun, 19 Sep 2021 16:35:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 18JGZal3052059 for ; Sun, 19 Sep 2021 16:35:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 18JGZaO3052058 for pf@FreeBSD.org; Sun, 19 Sep 2021 16:35:36 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: pf@FreeBSD.org Subject: [Bug 258601] kernel panic/pagefault caused by pfctl -s info Date: Sun, 19 Sep 2021 16:35:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: panic X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pf@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258601 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |panic Assignee|bugs@FreeBSD.org |pf@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Sun Sep 19 21:00:11 2021 X-Original-To: pf@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 A80E617D852F for ; Sun, 19 Sep 2021 21:00:12 +0000 (UTC) (envelope-from bugzilla-noreply@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 4HCKp40FX1z3kJj for ; Sun, 19 Sep 2021 21:00:11 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 BCE2C23EC4 for ; Sun, 19 Sep 2021 21:00:11 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 18JL0B8W011840 for ; Sun, 19 Sep 2021 21:00:11 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 18JL0Bwd011839 for pf@FreeBSD.org; Sun, 19 Sep 2021 21:00:11 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <202109192100.18JL0Bwd011839@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: pf@FreeBSD.org Subject: Problem reports for pf@FreeBSD.org that need special attention Date: Sun, 19 Sep 2021 21:00:11 +0000 List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="16320852113.BbFBCccaF.11480" Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: Y --16320852113.BbFBCccaF.11480 Date: Sun, 19 Sep 2021 21:00:11 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 237973 | pf: implement egress keyword to simplify rules ac 1 problems total for which you should take action. --16320852113.BbFBCccaF.11480--