From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 31 10:50:10 2009 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 CDF5B1065679 for ; Mon, 31 Aug 2009 10:50:10 +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 7CF538FC1A for ; Mon, 31 Aug 2009 10:50:10 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VAoAZO050505 for ; Mon, 31 Aug 2009 10:50:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7VAoAjn050504; Mon, 31 Aug 2009 10:50:10 GMT (envelope-from gnats) Resent-Date: Mon, 31 Aug 2009 10:50:10 GMT Resent-Message-Id: <200908311050.n7VAoAjn050504@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, Patroklos Argyroudis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF7141065670 for ; Mon, 31 Aug 2009 10:44:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 9E5EE8FC1C for ; Mon, 31 Aug 2009 10:44:01 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VAi1qk088242 for ; Mon, 31 Aug 2009 10:44:01 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n7VAi1Ll088241; Mon, 31 Aug 2009 10:44:01 GMT (envelope-from nobody) Message-Id: <200908311044.n7VAi1Ll088241@www.freebsd.org> Date: Mon, 31 Aug 2009 10:44:01 GMT From: Patroklos Argyroudis To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/138384: NULL pointer dereference in ipsd_dump() in file sys/dev/ips/ips_disk.c 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, 31 Aug 2009 10:50:10 -0000 >Number: 138384 >Category: kern >Synopsis: NULL pointer dereference in ipsd_dump() in file sys/dev/ips/ips_disk.c >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 Aug 31 10:50:10 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Patroklos Argyroudis >Release: 8.0-CURRENT >Organization: census, inc >Environment: N/A >Description: There is a NULL pointer dereference in ipsd_dump() in file sys/dev/ips/ips_disk.c line 195. The check against NULL in line 197 should be before the dereference of dsc. >How-To-Repeat: N/A >Fix: Patch attached. Patch attached with submission follows: --- ./sys/dev/ips/ips_disk.c.orig 2009-08-28 16:01:13.000000000 +0300 +++ ./sys/dev/ips/ips_disk.c 2009-08-28 16:03:38.000000000 +0300 @@ -192,11 +192,12 @@ dp = arg; dsc = dp->d_drv1; - sc = dsc->sc; if (dsc == NULL) return (EINVAL); + sc = dsc->sc; + if (ips_get_free_cmd(sc, &command, 0) != 0) { printf("ipsd: failed to get cmd for dump\n"); return (ENOMEM); >Release-Note: >Audit-Trail: >Unformatted: