mbuf leak in icmp6 code??

Gleb Smirnoff glebius at FreeBSD.org
Mon Nov 7 14:23:21 UTC 2011


  Kristof,

On Thu, Nov 03, 2011 at 01:07:52PM +0100, Kristof Provost wrote:
K> > For example:
K> > 
K> > icmp6_input calls icmp6_redirect_input and right after it returns it
K> > makes m=NULL. Inside icmp6_redirect_input there are checks for ifp and
K> > for the message being short (which probably don't get exercised that
K> > often (or at all?)) and for these checks simply return. Looks to be
K> > mbuf leak. In other icmp6 functions also we have similar instances.
K> 
K> The checks for m and ifp should probably be asserts, rather than just
K> returns. I think they are always supposed to be true.

I've checked all callers, and it looks like m and m->pkthdr.rcvif
can be safely asserted. I've committed that change.

-- 
Totus tuus, Glebius.


More information about the freebsd-net mailing list