From nobody Fri Nov 17 17:53:06 2023 X-Original-To: dev-commits-ports-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 4SX4J30HC4z51DBV; Fri, 17 Nov 2023 17:53:07 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SX4J26xCQz4YJM; Fri, 17 Nov 2023 17:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700243587; 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=gHQdMAKJ28TmWZDvdR/AgyYeD8Cne9oBhkH3PKbHcxg=; b=Y4kc8II/T5eaVoStAH1caoP67W5dbtn8MK2rNlCIZIoAjut8M3ZogMXPMR7BF8mfBEqK0v ZTBLVzAzyX0hLV1EyTOd+kYanQf3C2MRhwTlzg+fqqsLraMkPUcaB13cZZ7YnztKZZDujr YTP3gsOB0EUsLQHZYpM86RutRAKmW5dQC+mA886mXzOySvt6AISzzY6qGHA1v+puMzYzQ+ dfBbR/YxicwIPse1Ampwb1yHHcTZOuq9tv3FlT/4Vt9equa7dmo/bbuIo1b8eZEiUjlKO0 bWtkTZRyzi8PAqFfCvvjpOTVyrOnOC5cCRSrQJycy4ZKWTQXnoWv9QjyvSaIiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700243587; 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=gHQdMAKJ28TmWZDvdR/AgyYeD8Cne9oBhkH3PKbHcxg=; b=YLjiy3EJzTzQeFYFhHvQCK1xx0uB2UDHumc2w1AmaQLRc6mWBnspUNIrSaQHbpOF2Qrhgg mgLjQsAZm9G8e80Gm25bHdWpwW+yAIsVEFxH+D7u+M0h0YzlnqhbPHPN9lCjKugjFqJE8f Mwsu72bSP07RhGKqPtyMdYdKAE/5MwuOkaS4Bs17Rsb2K0R5dYp45LLqM2TUikZFtpq7Sv y/vb6HLW18NyB9OUTKWEdUbXQD0QkRH7daUMLm1sxnc+6scRNWcuMG0r2XwYrlXJUYKfAp rVZk8hzqyw+odaskn/UQyXzztjEOklwOTR1qXB5Ixrri0vZ9CF63VHS67EnDmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700243587; a=rsa-sha256; cv=none; b=CTk5ySZpOybzwlu2ckmL0bcr5asr1+OQ8l4ACpbH0ATJWpJF43Sa+byErXRSTZUdV7XNTf PPL8zeXX7E3qTiTczNb91AZY83Ev0FrMd/b6BbbdsAYkkWEAyVdLdNo64/GyiFg4HjMSIS kNocOi2h0BZ6DLbnuqgbZf6yHjDjSeAjGfs6L6KUl7r/HQC32BP7cTKBLRp+7Qm7YyJsLF XNVVXzNy4HsV6iovhZpB4IUhzNwNuGJU6lim1hy+rh59Ju9xbCPaFGQBAnC7Cp9aVkbri/ 6H/QcsmLIWIU8bIyDci/AhTiz/k103dNm18bWE5etqQYIM2rbVvMvwJYslm7zQ== 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 4SX4J25zYkzsh7; Fri, 17 Nov 2023 17:53:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AHHr6NW058001; Fri, 17 Nov 2023 17:53:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AHHr6kX057998; Fri, 17 Nov 2023 17:53:06 GMT (envelope-from git) Date: Fri, 17 Nov 2023 17:53:06 GMT Message-Id: <202311171753.3AHHr6kX057998@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kristof Provost Subject: git: abeb8cdf5dcf - main - net/libpfctl: fix pfctl_do_ioctl() List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-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: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abeb8cdf5dcfaf48559faee63c353ac5ac24c401 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/ports/commit/?id=abeb8cdf5dcfaf48559faee63c353ac5ac24c401 commit abeb8cdf5dcfaf48559faee63c353ac5ac24c401 Author: Kristof Provost AuthorDate: 2023-11-17 13:31:48 +0000 Commit: Kristof Provost CommitDate: 2023-11-17 17:50:54 +0000 net/libpfctl: fix pfctl_do_ioctl() pfctl_do_ioctl() copies the packed request data into the request buffer and then frees it. However, it's possible for the buffer to be too small for the reply, causing us to allocate a new buffer. We then copied from the freed request, and freed it again. Do not free the request buffer until we're all the way done. While updating also include a few other minor bugfixes - handle allocation failure - handle pfctl_do_ioctl() failures better Sponsored by: Rubicon Communications, LLC ("Netgate") --- net/libpfctl/Makefile | 15 +++++++-------- net/libpfctl/distinfo | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/net/libpfctl/Makefile b/net/libpfctl/Makefile index ef9a02a8241c..6c7d7d234984 100644 --- a/net/libpfctl/Makefile +++ b/net/libpfctl/Makefile @@ -1,5 +1,5 @@ PORTNAME= libpfctl -PORTVERSION= 0.7 +PORTVERSION= 0.8 CATEGORIES= net MASTER_SITES= LOCAL/kp/ @@ -13,7 +13,8 @@ USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/libpfctl -_LIBPFCTL_HASH= 87c503235310 +_LIBPFCTL_HASH= 498934c5ff51 +_LIBPFCTL_REV= 2 PLIST_FILES= \ lib/libpfctl.so \ @@ -25,7 +26,7 @@ PLIST_FILES= \ .if ${OSREL} == "15.0" DISTFILES= libpfctl-${_LIBPFCTL_HASH}.tar.gz .else -DISTFILES= libpfctl-${OSREL}_1.tar.gz +DISTFILES= libpfctl-${OSREL}_${_LIBPFCTL_REV}.tar.gz .endif do-install: @@ -41,15 +42,13 @@ upload: do \ cd /usr/src/lib && \ git archive --format=tar.gz \ - --output=libpfctl-$${version}.tar.gz \ - origin/releng/$${version} libpfctl ; \ + --output=libpfctl-$${version}_${_LIBPFCTL_REV}.tar.gz \ + libpfctl/$${version} libpfctl ; \ done cd /usr/src/lib && \ git archive --format=tar.gz \ --output=libpfctl-${_LIBPFCTL_HASH}.tar.gz \ - ${_LIBPFCTL_HASH} libpfctl ; \ - scp libpfctl-*.tar.gz \ - kp@freefall.freebsd.org:public_distfiles/ + ${_LIBPFCTL_HASH} libpfctl ; .endif .include diff --git a/net/libpfctl/distinfo b/net/libpfctl/distinfo index b73064601463..34aad5682ff5 100644 --- a/net/libpfctl/distinfo +++ b/net/libpfctl/distinfo @@ -1,12 +1,12 @@ -TIMESTAMP = 1699359628 -SHA256 (libpfctl-12.4_1.tar.gz) = d9b20a2705ff113ef68a3d4b8d139d9eed2db11496a3d5ced979473cd00860eb -SIZE (libpfctl-12.4_1.tar.gz) = 10047 -TIMESTAMP = 1699359726 -SHA256 (libpfctl-13.2_1.tar.gz) = 41c647ddd909d106435db4c16187789de5925a098d52c462048aa4cb43887b8d -SIZE (libpfctl-13.2_1.tar.gz) = 10043 -TIMESTAMP = 1699359643 -SHA256 (libpfctl-14.0_1.tar.gz) = 5a43684502ad6ec0ef6b7e77f11c8a5e1b5dc318b30e6c5b8527d1a4f9eb103b -SIZE (libpfctl-14.0_1.tar.gz) = 11619 -TIMESTAMP = 1698836124 -SHA256 (libpfctl-87c503235310.tar.gz) = 8dd8e6a81b78e9af734ec58899f4f2a3090fccccdaa14a8fa5421cde3e995433 -SIZE (libpfctl-87c503235310.tar.gz) = 13383 +TIMESTAMP = 1700228381 +SHA256 (libpfctl-12.4_2.tar.gz) = 261c701d5c41378058aec9566641aa749ea52732916b76371f8eaadcad8e9b36 +SIZE (libpfctl-12.4_2.tar.gz) = 10082 +TIMESTAMP = 1700227662 +SHA256 (libpfctl-13.2_2.tar.gz) = d14b3df105ad3d532f8d5423fc28e94b4d878f2184204cc7c9fb08ab8b3fec95 +SIZE (libpfctl-13.2_2.tar.gz) = 10082 +TIMESTAMP = 1700228315 +SHA256 (libpfctl-14.0_2.tar.gz) = f5a9b99d0e922ffb2d58c9731dba2baccdac8e77ec73b87f3e8e8510933c5b11 +SIZE (libpfctl-14.0_2.tar.gz) = 11665 +TIMESTAMP = 1700229758 +SHA256 (libpfctl-498934c5ff51.tar.gz) = 58b2d78ce0996e54a10574383642e3877217a8a5099f1db3cb15234539a83931 +SIZE (libpfctl-498934c5ff51.tar.gz) = 13462