https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255864
Bug ID: 255864
Summary: [PATCH] dev/core: Fix a double free in oce_tx
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
Created attachment 224928
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=224928&action=edit
set *mpp to NULL
Bug File: sys/dev/oce/oce_if.c
In function oce_tx, it calls oce_tso_setup(..,mpp) at line 1,087.
Inside oce_tso_setup, m is assigned with *mpp, and then m is freed by the bad
branch of callee m_pullup() at line 1,332 and returns NULL. Now, *mpp points to
a freed memory object.
After oce_tso_setup() returns NULL, the execution comes to the free_ret branch
of oce_tx. Then, *mpp is freed again via m_freem() at line 1,229.
As m_pullup() returns NULL if *mpp is freed, my patch set *mpp to NULL by
"*mpp = m" to avoid the double free.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"