From nobody Mon Apr 21 21:15:46 2025 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 4ZhJ7R1GZFz5t3Zd; Mon, 21 Apr 2025 21:15:47 +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 4ZhJ7Q4QqYz3KS4; Mon, 21 Apr 2025 21:15:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745270146; 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=OyAJojc4gUkYqa2U19FFn/XKJM0xH62KqOhKgTfhCmw=; b=HCf8r2V38DbraLUbt3bJfX+IBxfEByIiDg6+TMljEFGkRWY6I9w88Em9wq1fUItS0nyFQ3 UDKIGLnPe2uWWbfskyUBLH7SOU+5aHj7Y3rBjdUqQhrFqx9egr6TWt6Zq6bKiY/5ourGFu sR42Xmu+RJGJx+2XzJc4htE9SVUWPavCtMMmFG3kDE77nTzRqcwOWNwat+uFUBfS6Qzcst MsV+7676OvSTEXy8J+kiPquQNzjc8wwQzLWjixxdtiUYBRRrgkLJM9HG8U4ruYPaK7BN7f IFCrtyf+a41X2RkR7zDE94j2t1c8OF8mid2iuuZsq772JZlUmBvRX6rGY4jSNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745270146; a=rsa-sha256; cv=none; b=ujmXCYT9gji9gKtI3hy5h9n5zNwKqfu92zhCNoKYT1BUnc22hauz1St3Dn52cgsfryUOfE 3eY8FPUOnX8J5HhRvzRuBVo2kTBqJixtv1cOA6vTNjvV/bMakmzskziD9vMFgHg5eipkqG n0m8hR1ZpUqTq55jYUWOuD88kApe15AxE6RIbw7KPvqkb5E6yDcu7p2PRRdjKLpvREAK9v YW3y4iMdFK4b0okYkUwTrtaIaXYfrsCRWnDl3DYdWkOP0ctZB/Z17QBn0F8epTKhbZ8FqS jvMzt1ibhNjd4zEbcGP6t05ppB7Ds+9DeC5/PZfeRwcqCuSqrXWnmhx9pXlPig== 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=1745270146; 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=OyAJojc4gUkYqa2U19FFn/XKJM0xH62KqOhKgTfhCmw=; b=CV1TdyaQXZAVY3fzb+hDVgFK17a1SPqMsnHi7xYa+cR4S7J8XaT2YiIZKEHbF6lQvTZAoE aEF69oCcBCI1fDaoFk2XKoCnSt9qPD9kOTl4g2E7ZE3CIDQaxIZJ0TvRV/cfv3T7HS1emE JH0oehuB9iZLN42D3Fvdujl/QdM/33bEQ68srEZ5dGn0AFiE5cX+yEf3zuEJNx1UfZyTYC 6bjzCAqP0g0QlaaHW1C2PIlzksb9hD7gHs5JEVhjEi+5tapDWqZ1TKm7ob99vjS9WKNDf+ duxapK/KcDA4zqajaROY12jYOyI8IBJF+5aP3zRxDbYvIXdDs6f56kHp8Y8Lmg== 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 4ZhJ7Q3yg7z15qq; Mon, 21 Apr 2025 21:15:46 +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 53LLFkIp033465; Mon, 21 Apr 2025 21:15:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53LLFk2E033462; Mon, 21 Apr 2025 21:15:46 GMT (envelope-from git) Date: Mon, 21 Apr 2025 21:15:46 GMT Message-Id: <202504212115.53LLFk2E033462@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: a60eeb4331e5 - stable/14 - pfctl: fix crash on "pfctl -a '*' -vvsr" 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: a60eeb4331e5ee63f66e2458a16aae186168923f Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a60eeb4331e5ee63f66e2458a16aae186168923f commit a60eeb4331e5ee63f66e2458a16aae186168923f Author: Kristof Provost AuthorDate: 2025-04-14 16:41:00 +0000 Commit: Kristof Provost CommitDate: 2025-04-21 20:25:46 +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 dfc473f21566..ddf450a5d052 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1452,7 +1452,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))