From nobody Mon Apr 21 21:15:47 2025 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 4ZhJ7S0h25z5t32C; Mon, 21 Apr 2025 21:15:48 +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 4ZhJ7R5WYcz3KK9; Mon, 21 Apr 2025 21:15:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745270147; 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=wHaA6yGXVu8GDKVc6Yeq7sfWZBG8yNiNCQ9dAmKZYEc=; b=D231RWqtQSeWrGwQxfL2EgAoEKfk6lc7sJLSCCqquyKIA9dPRvnp4r1laM4SjsXstDKD8J EeF6XJP+Sv8C990XHpdJnOI9lOzDuksvs5oWr3n73piBiuzcas0yLFxDrA9ZHscNV6VthB uBCKYgPsEU+s/mKtib3fQktR1OHKkcZOaE/0SRstEtOj16wswz/AAWITlWuhQtcKNjZlZ3 EW3T9d8IGjalPKqcDt0Sb3CDyLSM+zXXNWSJlTG3sDmHu1F/ZaSTRCFxOfzu8htIZF8I8A RLYeqcxxgMMYhke95kFUuwPb16PiMeXZh+OJilRSRhd/yHbz53H/TWx+MHfC6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745270147; a=rsa-sha256; cv=none; b=MO8bOO99zcOgzvUPpnCPgsW8wfTxKr7YLg+aY1ciUj0pYw++X8aGyRcRH0RWvIUtmN8G0S IBU9orFHflPUBt1G4S62B/JCDINYe4U9erfk5PoZmja1xVjm04lsTivAATu/t/6kYNmI0V 4ovB2ftWBZnl0OVYmZnTABYBuwDvUJ24LX0YOVlHa/MS/lh3sxQBfKXbuZ4A3g2KdmVzHo 1+G80GtauuAWpHpBD+yvypA8LPOe0bs774G87eO9Ex1CRfShnSr51IAEytae060dQRyyv0 04u9EoIgyfsIq2T/PCm2NP/G8WqQICfi6zogQpMOMzKlHrC0HcCHihtM70u8WQ== 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=1745270147; 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=wHaA6yGXVu8GDKVc6Yeq7sfWZBG8yNiNCQ9dAmKZYEc=; b=eQNppvPJV0Y4z3zAs+nyN0yzCuzo+hVcKptqAWrKH7j6VfaLIQFa3+MrYClZEkf4Lj767V jDKdRsG0jL2UH75BAAYZSUzWsI6U0OAu4vx9JWXsecftqeRQbrGZtCApi1Fa1OuZRIrvcu mEVcpRslmD4a/q47a2SvyU/nBS0sfrc7NlCeVerDhIltWEKxGFq0Q0W4ihWB4HjyBrenpq zI65hDQPyWuk7DRXArntP5ACBcBvDeMRCtFQwSDws/dNDh46sJGUsSWKFm6SOruIkva995 wAdcBEgIzOEXEuIZzSPcizrrIwn0M7UdPQ4vE/eRtzf1SCT0eY9Mziajn8k8Vw== 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 4ZhJ7R3VRdz15qr; Mon, 21 Apr 2025 21:15:47 +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 53LLFlLw033498; Mon, 21 Apr 2025 21:15:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53LLFlaB033495; Mon, 21 Apr 2025 21:15:47 GMT (envelope-from git) Date: Mon, 21 Apr 2025 21:15:47 GMT Message-Id: <202504212115.53LLFlaB033495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 35a83d58bdbe - stable/13 - pfctl: fix crash on "pfctl -a '*' -vvsr" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35a83d58bdbeae4e823710924a7e64fa00e64547 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=35a83d58bdbeae4e823710924a7e64fa00e64547 commit 35a83d58bdbeae4e823710924a7e64fa00e64547 Author: Kristof Provost AuthorDate: 2025-04-14 16:41:00 +0000 Commit: Kristof Provost CommitDate: 2025-04-21 21:14:17 +0000 pfctl: fix crash on "pfctl -a '*' -vvsr" When printing a nat anchor we don't have rule information, or rule counters. Do not attempt to print them. The information is nonsensical anyway, and this can cause a crash converting the timestamp to a string, as years in the very distant future use more digits, and we exceed the 30 byte buffer allocated for this. MFC after: 2 weeks Sponsored by: Orange Business Services (cherry picked from commit 168d873ae41fd8bd40555322a79c9f215cb4cb9c) --- sbin/pfctl/pfctl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index b7d5bf9f2819..e285bc466bc3 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1274,7 +1274,6 @@ pfctl_show_nat(int dev, const char *path, int opts, char *anchorname, int depth, } mnr = prs.nr; - pfctl_print_rule_counters(&rule, opts); for (nr = 0; nr < mnr; ++nr) { prs.nr = nr; if (ioctl(dev, DIOCGETRULESET, &prs))