From nobody Wed Nov 01 09:06:51 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 4SL1NC5RF0z503r6 for ; Wed, 1 Nov 2023 09:06:51 +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 4SL1NC46Zwz3MRp for ; Wed, 1 Nov 2023 09:06:51 +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=1698829611; 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=MFiRIi87qluoDkD2PHkMx1slnIdoyv5vX6SgJtTXGS4=; b=Q9Z2WM6FKkq7LyeA41YHoGeXvf0HUk+f0Bs6NR8Mni4vhMIESVtTxpX5AvXV0E/BrKv3dq iOmdiVTQIhUEr387gyTkdKwNRqHFqG4/Q9WP7y7JVgMrk0cGhM1PYP8MQu0GQAJ8Rv/nq4 78qenJ7Hcz05oEQPLs0tvt5u64+O0KDw/rgQz27RvlciaNQ51TgOTy7EfEn/yAyYSK12mx 9ie3LLNtUeX1Nm8QepvuUNqiOnYQybRdJZKwe+8ZAdZpCMWoYbsjUlTFMfh4Nuq7rF+4KC Ix9a7j0lXNABk9Zri6ck4cr10Rg08jnxKdWXjaoyyuw9IQqe8WUVtaTrZ3iCjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698829611; a=rsa-sha256; cv=none; b=NwxpJOX3YHAIY24Moy9OV85Vx3ytW+iXFrGSKehCNP1xJATJvdxejGdWax7yj5DWrGF871 tlK6uC1RHN8X+zGJo/7OTAk6sSgDM39mMO0yAOGwhfLQIGhBpMG4C5iIOmkaPytylc83Z0 TXQTuZfbugbcB7Sl+uVI3TIqT0nqzfMs2pqXO0jkcKaKhw11W4cvZZSofrGpF2BpynPJCA 3K7eMDN7hWvNTOEAw1W40B+Uxyn2eCrrh6dO30EWBPN7+0dtdIf1oV1eiuuAcwHqs7sStK 088s03tTt09u8sQ28Zf4SRlXDTrMzY+X93TTyQh6IPiVNDfz1V4qZhhKCeS0jQ== 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 4SL1NC30txzfvR for ; Wed, 1 Nov 2023 09:06:51 +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 3A196pm6053954 for ; Wed, 1 Nov 2023 09:06:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3A196pqR053953 for pf@FreeBSD.org; Wed, 1 Nov 2023 09:06:51 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:51 +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 #2 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D9f5ab6bddfc0974b385f2a198878f7394= 24fd040 commit 9f5ab6bddfc0974b385f2a198878f739424fd040 Author: Kristof Provost AuthorDate: 2023-10-23 11:43:52 +0000 Commit: Kristof Provost CommitDate: 2023-11-01 09:05:49 +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 on the CC list for the bug. You are the assignee for the bug.=