From owner-freebsd-bugs@FreeBSD.ORG Mon Jun 27 12:50:07 2011 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 DE9D81065674 for ; Mon, 27 Jun 2011 12:50:07 +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 A2B3A8FC16 for ; Mon, 27 Jun 2011 12:50:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5RCo7dJ070232 for ; Mon, 27 Jun 2011 12:50:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5RCo7fL070231; Mon, 27 Jun 2011 12:50:07 GMT (envelope-from gnats) Resent-Date: Mon, 27 Jun 2011 12:50:07 GMT Resent-Message-Id: <201106271250.p5RCo7fL070231@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Greg Becker Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B73741065673 for ; Mon, 27 Jun 2011 12:43:54 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 59A5B8FC21 for ; Mon, 27 Jun 2011 12:43:53 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p5RChrK1037328 for ; Mon, 27 Jun 2011 12:43:53 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p5RChrVr037316; Mon, 27 Jun 2011 12:43:53 GMT (envelope-from nobody) Message-Id: <201106271243.p5RChrVr037316@red.freebsd.org> Date: Mon, 27 Jun 2011 12:43:53 GMT From: Greg Becker To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/158340: Possible dereference of null pointer by code that calls replay_find()... X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2011 12:50:08 -0000 >Number: 158340 >Category: kern >Synopsis: Possible dereference of null pointer by code that calls replay_find()... >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 27 12:50:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Greg Becker >Release: 8.2 >Organization: CodeConcepts >Environment: >Description: In replay_find() (src/sys/rpc/replay.c), if a message is found in the DRC but does not have a body then mp is left untouched. The only caller of replay_find() is svc_getreq(), which assumes that replay_find() returns a valid pointer in this argument. Now, I don't know if rce_repbody can legitimately be NULL, but for completeness svc_getreq() should probably set repbody to NULL and then check it after the call to replay_find(), and avoid making the call to SVC_REPLY() if repbody is NULL. replay_find() also should set *mp = NULL if rce_repbody is NULL. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: