Subject: kern/2616: ip_mroute.c resource leaks, packet corruption
To: None <gnats-bugs@NetBSD.ORG>
From: None <fenner@parc.xerox.com>
List: netbsd-bugs
Date: 07/10/1996 15:57:55
>Number:         2616
>Category:       kern
>Synopsis:       ip_mroute.c resource leaks, packet corruption
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 10 19:20:04 1996
>Last-Modified:
>Originator:     Bill Fenner
>Organization:
Xerox PARC
>Release:        NetBSD-current
>Environment:
I'm not running NetBSD, just ftp'd ip_mroute.c from ftp.netbsd.org:/pub/NetBSD-current

>Description:
Several potential resource leaks under low memory condition
PIM assert processing doesn't work
Packets can get corrupted on the way through the forwarder (potentially causing a crash)
>How-To-Repeat:
Have low memory and watch the mbuf usage count soar
Try to use gated's PIM
Try to forward packets
>Fix:
Apply the following patches:
Resource leak:
http://www.freebsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_mroute.c?r1=1.17&r2=1.18
PIM Assert processing:
http://www.freebsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_mroute.c?r1=1.18&r2=1.19
Packet corruption:
http://www.freebsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_mroute.c?r1=1.29&r2=1.30

You may also want to consider
http://www.freebsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_mroute.c?r1=1.21&r2=1.22
which is not critical but a cleanup and speedup of the token bucket filter
(rate limit code), and
http://www.freebsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_mroute.c?r1=1.22&r2=1.23
which adds cr's to log()'s to avoid filling up messages file.

>Audit-Trail:
>Unformatted: