[Bug 255875] [PATCH] netpfil/ipfw: Fix a double free in aqm_codel_enqueue
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri May 14 13:02:08 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255875
Bug ID: 255875
Summary: [PATCH] netpfil/ipfw: Fix a double free in
aqm_codel_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 224938
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=224938&action=edit
adds a new label "out"
Bug File: sys/netpfil/ipfw/dn_aqm_codel.c
In function aqm_codel_enqueue, it calls m_freem() to free m and goto drop.
But in the drop branch, m is freed again via FREE_PKT(m) at 273, which is a
double free bug.
My patch adds a new label "out" and lets execution runs into the out branch
after m is freed, to avoid the double free bug.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list