bin/124724: netstat coredump on -stable

Garrett Cooper yanefbsd at gmail.com
Thu Jun 19 04:10:23 UTC 2008


The following reply was made to PR bin/124724; it has been noted by GNATS.

From: "Garrett Cooper" <yanefbsd at gmail.com>
To: "K. Zolotukhin" <heliar at at.nsu.ru>
Cc: freebsd-gnats-submit at freebsd.org
Subject: Re: bin/124724: netstat coredump on -stable
Date: Wed, 18 Jun 2008 21:03:49 -0700

 > Same thing occurs on -CURRENT (backtrace):
 >
 > (gdb) bt
 > #0  0x280960ff in kvm_nlist () from /lib/libkvm.so.4
 > #1  0x2809b25e in memstat_kvm_malloc () from /usr/lib/libmemstat.so.2
 > #2  0x2809a0fa in memstat_kvm_all () from /usr/lib/libmemstat.so.2
 > #3  0x08050aa8 in mbpr (kvmd=0x0, mbaddr=0) at mbuf.c:103
 > #4  0x080500eb in main (argc=1, argv=0xbfbfec40) at main.c:510
 
 After doing some reading it appears that netstat is passing in an
 invalid value to memstat_kvm_all, which subsequently calls
 memstat_kvm_malloc for mbuf.c (kvmd = NULL). Calling malloc with NULL
 for a pointer address of course is invalid coding.
 
 main.c:510 should probably be modified to print out an error message
 of some kind instead of:
 
 mbpr(NULL, 0);
 
 The maintainer (gnn@, net@?) should be assigned this bug.
 
 -Garrett


More information about the freebsd-bugs mailing list