From nobody Tue Oct 24 09:34:27 2023 X-Original-To: pf@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 4SF6Mm1n0Zz4xnNm for ; Tue, 24 Oct 2023 09:34:28 +0000 (UTC) (envelope-from bugzilla-noreply@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 4SF6Ml5TH9z3dD3 for ; Tue, 24 Oct 2023 09:34:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698140067; a=rsa-sha256; cv=none; b=TGy9MAdGrpFiJK+ErUkOkJ5IOiYk8bziaZ2+j0OMAv7d8CuNoNGjzey5I9TZHYl8kCrwWG 3HWxWGqudmCbaMDVNEkIvIUthnLI+aUCKVdrYATqRlwj18gY2HXbYv/b9byQgSob0kYARI ZJzfiDaDHh5im+uDZ9hgQFCt+1aMgn4yN33gYMe7u/BtrqtPSIfeCq6+ClGXixwlKMlpWk OvVBmLqWcvoPWW/9B7np2EosTMso/w2pvK1/0xjDMgAxWMxefi32gx9mauqaPg2DnFSt+P cZpimFcSl/h3ZfJtNsAhlgMeexT8fulx7q9v0OUgDXSjRUuYHAi/VR/1SlONLg== 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=1698140067; 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: in-reply-to:in-reply-to:references:references; bh=ChTlRxDDL99Y/nKqPqsUAXi+shlX1+I3iMycEvN3sas=; b=wgYQKcdIHPCUde89/h2zSX/uY+afhZgMjZKEOqivxZbbL6ZgvIP/wM+vvYiiGE+jK93hoy 8PvK8bouZb/4e7RdGK1qKjEyRm3gQ5QDI4jMdcdQFe5EiufnEXxurwsFrc1nPy+Sv0egJG IdL3A4ze2zzaJ88sKNrRuqp5jZmvnC+fFnQ965tG3ZsVBrSm2povEFBLmf5Nwthi5Ife1D 7vvvTeDylTWzldp5po3RzmKRsQKP0Z2CXb+BnUkFAmicEc3ysuft8YC4YGQTIEcm446A0t LwR+4Un2xotB7vJz2K6TWsKJOdq0w9Uq9E+YW9EX2Rn0ZPyjinkJ8N+p98brnw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4SF6Ml4McZz38M for ; Tue, 24 Oct 2023 09:34:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 39O9YRmX034585 for ; Tue, 24 Oct 2023 09:34:27 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 39O9YRrq034584 for pf@FreeBSD.org; Tue, 24 Oct 2023 09:34:27 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: pf@FreeBSD.org Subject: [Bug 274614] Issues with retry loop in pfctl_do_ioctl() Date: Tue, 24 Oct 2023 09:34:27 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pf@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274614 --- Comment #1 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D2cffb52514b070e716e700c7f58fdb8cd= 9b05335 commit 2cffb52514b070e716e700c7f58fdb8cd9b05335 Author: Kristof Provost AuthorDate: 2023-10-23 11:43:52 +0000 Commit: Kristof Provost CommitDate: 2023-10-24 07:50:31 +0000 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. PR: 274614 Reviewed by: emaste MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42329 lib/libpfctl/libpfctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.=