From nobody Tue Apr 15 07:42:19 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 4ZcGMb46DPz5sdn0; Tue, 15 Apr 2025 07:42:19 +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 4ZcGMb3PGhz3nQS; Tue, 15 Apr 2025 07:42:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1744702939; 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=tOWKwDVz8pJMMjCsjY2nFbubTAL9rYcRHgouUIyx664=; b=F9reNfy/NQW7oBfUkHAgO8NkyHPR3yI5vXJhDCB8RdG96fDQkqn2WgcBoiviWkQlSsCGYV GtdnVPsa5Lat0lVLyX5ERRj450ik6lTncP16rwHwKnvsp4OUr3YTnNUfTM8NvC/nKP0Whr UftWUU54Wp6PeCh+C1M12UjZiEzA7FtxS6ne8wug8zfp5KhH8tP+m5L5TuByULPg8KfjXk SsEgjJrFQxbaTdRscuFVLjNHZ4n/Or2xZ2uhI+EHvfLhdgr+nMSep7OUmJr6oOyY9T9HAH vBlWtuANBOxRzm+8bHA4CPognBeIrRPOfmwKSbQ6Ztgkv1d1ZBcEEEd7x0F61Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1744702939; a=rsa-sha256; cv=none; b=DFLA/jhLoTT91eDoeP8Nx4H10XNxLLINwN4pVBpAktnCvXvV1NIoqT+1PO8vpR+hEnc2c6 Ol5H0QFYYWqSWaWqUR1J8Hc0Ccj5XMgmitkHH2CQycZu2A74GC1+5paJZ2fXAcWPTZTZ9I eBtkNaJ8Z80CJW3ajdPMn5R5BEiIFNdZXKO5E4KQ05YIsjke7y/uoMnsaJePZEUN8AqJ9p Us0i0/sxE5ApYvWl9lnEFyDKQfD5C+P73w4wtIMqCOh+QMC2qwbVPDNsBx9tGqyot9ifjj l9vKObcYeAxHKKP3XvtmfMx3bLTH65CnZa3RQEOc9X6fhWXL1BX/Tg9hDe8YaQ== 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=1744702939; 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=tOWKwDVz8pJMMjCsjY2nFbubTAL9rYcRHgouUIyx664=; b=KcEjy0nZ2ytMcoFybVKxVMGz1jNdk//D0mms68wWm6ErVd7OEfDxyeWctEBmLoLH0d6eTE BbbAl8e/3gn8ywPWV9ihK9RvCty9q1Fd15cD9hDrKkKwR/tEXPTUR0oAG9lTE7/DT6bIFB BYmi0pv5uDbazJNQbbhmWsT/8Z22O+oojQPiHtAWR4W3z+XUcbR6irQHTiu8Z/j6ipFDmI 7PiHdyOVT03JqEacOVrcoUPFuO34exOC0CIVS5v0e0srL9LLTBCWw3tELLWxWJSDiMiMFf tpLn2dw1JK1qf4bFJp6v/Ci+SoIFY+B7I+mJIhrvIi8/axbIov9O/9UezBL24Q== 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 4ZcGMb2ypcz87d; Tue, 15 Apr 2025 07:42:19 +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 53F7gJYZ015165; Tue, 15 Apr 2025 07:42:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53F7gJ9e015162; Tue, 15 Apr 2025 07:42:19 GMT (envelope-from git) Date: Tue, 15 Apr 2025 07:42:19 GMT Message-Id: <202504150742.53F7gJ9e015162@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: 168d873ae41f - main - pfctl: fix crash on "pfctl -a '*' -vvsr" 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: 168d873ae41fd8bd40555322a79c9f215cb4cb9c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=168d873ae41fd8bd40555322a79c9f215cb4cb9c commit 168d873ae41fd8bd40555322a79c9f215cb4cb9c Author: Kristof Provost AuthorDate: 2025-04-14 16:41:00 +0000 Commit: Kristof Provost CommitDate: 2025-04-15 05:39:35 +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 --- sbin/pfctl/pfctl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 1c5b7f5e1fc0..b4318159b4ec 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1490,7 +1490,6 @@ pfctl_show_nat(int dev, const char *path, int opts, char *anchorname, int depth, errc(1, ret, "DIOCGETRULESETS"); } - pfctl_print_rule_counters(&rule, opts); for (nr = 0; nr < mnr; ++nr) { if ((ret = pfctl_get_ruleset(pfh, npath, nr, &prs)) != 0) errc(1, ret, "DIOCGETRULESET");