[Bug 274614] Issues with retry loop in pfctl_do_ioctl()

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 01 Nov 2023 09:06:52 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274614

--- Comment #3 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=a17aa2314d5078060417cbfba30b20088359ec21

commit a17aa2314d5078060417cbfba30b20088359ec21
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-10-23 11:43:52 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
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(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.