From nobody Wed Nov 01 09:06:52 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 4SL1ND43bJz503tS for ; Wed, 1 Nov 2023 09:06:52 +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 4SL1ND2MnMz3MVJ for ; Wed, 1 Nov 2023 09:06:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698829612; 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=x47tZV1wzJn0PBUDshd1603MVGq8vU082nLqqvdIpIM=; b=BSmfB+gjTxDbBGuS/w8WRojczi/hN5SgFhcJWDwKLxjyNQ+kSv1VsWkZi1hs8rUnuFGiqd WMdno/NmV8ODWSDydFrSW+4owb9ZmptyEoyL+LoRvyK17GMUuWxjMzi5OOD9KKCbZF7j3n gCVTUtkiDvVyQoDwrSYKECZxeKdytGA5kMD02JSBgyB+EqrbqdpaG1Zexo8k0cuiQ0s/z4 zJyS5fi77TxNrju/+E/j2n+ez5r4KdTjvVAI6d6yAGHOYBE3mGOWd+AB6Wi5IJiudtKgb6 oycmMDsWUw4RlaKnZf3bwe7of1oa8A/U87IC9F4KyXVVcWA1RLqlPukHPxg78g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698829612; a=rsa-sha256; cv=none; b=pKqKEcUCLb1TrqRFKHAAT3JyTHsRsmGHAwjTaqpHLadI2e3kdIvukI+C0TBYaKVF7rgEX0 GFOxywixUJL2GZGdSDytrTV3PVihR5qWes87bYiwY9yZc9yvelpuQf9IgF14TDPYVZND3Y IjJKFpjCn7vQLyZYOxM4opmZsQwnCQWvb8039dRhOn64BxBXxGT2bKSU2cG8q1lquTCO4W UPhuzFbMdFrTu13WX8vejKjP4WojtMmLKI7HiaQomVFZ8NRwVgQAmvKirBBFeS64SeO0AR 8VV+av/HKuA1oKofq/VXrb0WAM0OmfgcbskE584jTuGYJw90J17SXhVLSfd9OQ== 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 4SL1ND1RnJzgVH for ; Wed, 1 Nov 2023 09:06:52 +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 3A196qIn053962 for ; Wed, 1 Nov 2023 09:06:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3A196qt2053961 for pf@FreeBSD.org; Wed, 1 Nov 2023 09:06:52 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: Wed, 01 Nov 2023 09:06:52 +0000 X-Bugzilla-Reason: AssignedTo CC 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 #3 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Da17aa2314d5078060417cbfba30b20088= 359ec21 commit a17aa2314d5078060417cbfba30b20088359ec21 Author: Kristof Provost AuthorDate: 2023-10-23 11:43:52 +0000 Commit: Kristof Provost CommitDate: 2023-10-31 08:08:46 +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 (cherry picked from commit 2cffb52514b070e716e700c7f58fdb8cd9b05335) lib/libpfctl/libpfctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.=