[Bug 255880] [PATCH] netpfil/ipfw: Fix a double free in pie_enqueue

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 14 14:19:39 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255880

            Bug ID: 255880
           Summary: [PATCH] netpfil/ipfw: Fix a double free in pie_enqueue
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: lylgood at foxmail.com

Created attachment 224943
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=224943&action=edit
avoid the m been freed again

Bug File: sys/netpfil/ipfw/dn_sched_fq_pie.c

In function pie_enqueue, m is freed via m_freem() at line 737.
But the freed m is freed again via FREE_PKT() at line 751, which is a double
free bug.

My patch returns the allocation error of m_tag_alloc() after m_freem(m), to
avoid the m been freed again.

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


More information about the freebsd-bugs mailing list