bin/115430: [rpc.statd] rpc.statd core dumps if unable to mmap() /var/db/statd.status file

Timur I. Bakeyev timur at freebsd.org
Sun Aug 12 16:30:08 PDT 2007


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

From: "Timur I. Bakeyev" <timur at freebsd.org>
To: bug-followup at freebsd.org
Cc: truckman at freebsd.org, Maxim Konovalov <maxim at macomnet.ru>
Subject: Re: bin/115430: [rpc.statd] rpc.statd core dumps if unable to mmap() /var/db/statd.status file
Date: Mon, 13 Aug 2007 00:24:08 +0200

 On Sun, Aug 12, 2007 at 09:52:04PM +0000, truckman at FreeBSD.org wrote:
 > Synopsis: [rpc.statd] rpc.statd core dumps if unable to mmap() /var/db/statd.status file
 > 
 > State-Changed-Why: 
 > The mmap() failure is fixed in:
 >   usr.sbin/rpc.statd/statd.c 1.15 (Sun Aug 5 16:33:06 2007 UTC) -      HEAD
 >   usr.sbin/rpc.statd/statd.c 1.12.8.2 (Sun Aug 12 01:46:19 2007 UTC) - RELENG_6
 
 No, I don't think the bug is fixed. Your fix addressed the reason why
 mmap() fails to me, thanks. But the errorneous execution flow in a
 file.c still in place - should, by any other reason, mmap() fails for
 rpc.statd again - we'll get another perfect coredump to fix.
 
 Patching code around the faulty condition to prevent it to be trigged is
 never safe - it'll always be another reason for it to fail. If you so
 confident that your fix makes it impossible for mmap() to fail in the
 init_file() - replace:
 
 warn("unable to mmap() status file");
 
 with err(). Still I prefer cleaner solution, which just doesn't try to
 dereference bogus pointer.
 
 Regards,
 Timur.


More information about the freebsd-bugs mailing list