From owner-freebsd-bugs@FreeBSD.ORG Sun Aug 12 23:30:08 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263F516A469 for ; Sun, 12 Aug 2007 23:30:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0588813C48A for ; Sun, 12 Aug 2007 23:30:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l7CNU75S001748 for ; Sun, 12 Aug 2007 23:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l7CNU72E001747; Sun, 12 Aug 2007 23:30:07 GMT (envelope-from gnats) Date: Sun, 12 Aug 2007 23:30:07 GMT Message-Id: <200708122330.l7CNU72E001747@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Timur I. Bakeyev" Cc: Subject: Re: bin/115430: [rpc.statd] rpc.statd core dumps if unable to mmap() /var/db/statd.status file X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Timur I. Bakeyev" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2007 23:30:08 -0000 The following reply was made to PR bin/115430; it has been noted by GNATS. From: "Timur I. Bakeyev" To: bug-followup@freebsd.org Cc: truckman@freebsd.org, Maxim Konovalov 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@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.