From nobody Mon Jul 7 15:08:07 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 4bbSKh1kVSz61w88; Mon, 07 Jul 2025 15:08:08 +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 4bbSKg1w5Gz3wpW; Mon, 07 Jul 2025 15:08:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751900887; 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=Xm3RlnHxOxQm20uNMmWEx2vgg2+8VbLGXVqNtU/Ck68=; b=FSpvQeDhipa+SPVhz2lTfaJcaGAUL5DU8yySMD1kbYq2fLFR3xcnmplQToxAu5YWaXatJY gfq1hSf8+EN3YnYjBYme4l+nvO93lUexyiV2kFR0uWcZLBO7MdnG6Y6ViBgb8Likln86TE Dap4GOs2kRQKQefKQDaNMMw4FWqIXJSKHTP9nlaWUkG2NO9SVYba0Klmi2Nlrc1tBO2lqG joQsUznVZSzYgNP4uCoHuBwJQmbyzG4yq7DY0ABY/WuxexsC4ksesmvy4VY0m+zhvcQFBS JGiqSQYV62D/hF/zWBlpLOOSoP0Q7rJHGeNnK9EelT3Zc3Gdxn/pl7scMeln5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751900887; 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=Xm3RlnHxOxQm20uNMmWEx2vgg2+8VbLGXVqNtU/Ck68=; b=Moq10tVt3dh+aLTTH7d2OTFjeKuWo5T7v0rBjf9Yl77QKM5iv14LNbE0sSjmNWGkX7f+1i 96HQp2BV7wDeo17XqtahHbJGnkIdihsxzPnGcJhsUXgzVJXcLPor4cGIsd44GCMlj8i4PZ 0r0KoJipJQG4gzed+vLkDVYJzcWuJu6ysI8cV67HXXaeEveJlBVlpGfamiIotKGU49dtJb yL+GAZxEpjsQyTFzRaNMToAcdd2eHb54lJgJP9njtIlsc1T97oVuQLE3EaCAIXyRqVXlD7 9G3by+nsW2kxuKXsF80loZ7raN3T1dczpcLMX9TefFQ67CjJ+TnMvys82L4xhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751900887; a=rsa-sha256; cv=none; b=KxPVRt9eI0HLr0jZzbDohNeZXwa5N9SFaqpVgW2qE6Qvkctp6i66ypH4yGP8hZFjWWboW2 BBhJR2KN2SqdRmpzxtftGviLSq02NwJs4kOnxm6l/Wgm6XlqsA0CnJVBFYs5eiJ0RX9L9g umTwka1LSAVq5ZOOCGDH+EERvAOJlWmUkbvpmU6qpeNvDQ6BmofPYb2UBHqbb9JOxGX81L G20XMeggcUbLH3gbyMSfWx98mHCsNIUqQjGHPYIizEkCG9FJmHUu+9GjN8RAAWyTiAmWll 2OpjmH76uODrT7a8S1e4cXlwr1euMCOPtyT2Y3Aw/Kvi1Q2bxX/NHCYmbPv6rg== 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 4bbSKg1Q9tzwKK; Mon, 07 Jul 2025 15:08:07 +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 567F87QP017008; Mon, 7 Jul 2025 15:08:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 567F87qb017005; Mon, 7 Jul 2025 15:08:07 GMT (envelope-from git) Date: Mon, 7 Jul 2025 15:08:07 GMT Message-Id: <202507071508.567F87qb017005@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: 8b8fae451c8e - main - pfctl: pfctl should check pfctl.astack is not overrun 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: 8b8fae451c8ead8af978a4528631ca6b29eff30d Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8b8fae451c8ead8af978a4528631ca6b29eff30d commit 8b8fae451c8ead8af978a4528631ca6b29eff30d Author: Kristof Provost AuthorDate: 2025-07-02 16:27:30 +0000 Commit: Kristof Provost CommitDate: 2025-07-07 15:06:52 +0000 pfctl: pfctl should check pfctl.astack is not overrun (bug found and fixed by Petr Hoffmann _at_ oracle.com) OK kn@ Obtained from: OpenBSD, sashan , 12ebb2cc68 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index d465599e1738..af1fb95398f8 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -958,6 +958,8 @@ pfa_anchor : '{' struct pfctl_ruleset *rs; /* stepping into a brace anchor */ + if (pf->asd >= PFCTL_ANCHOR_STACK_DEPTH) + errx(1, "pfa_anchor: anchors too deep"); pf->asd++; pf->bn++; @@ -1261,6 +1263,8 @@ etherpfa_anchor : '{' struct pfctl_eth_ruleset *rs; /* steping into a brace anchor */ + if (pf->asd >= PFCTL_ANCHOR_STACK_DEPTH) + errx(1, "pfa_anchor: anchors too deep"); pf->asd++; pf->bn++;