From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 31 10:30:04 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 9A3C41065679 for ; Mon, 31 Aug 2009 10:30:04 +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 7718E8FC17 for ; Mon, 31 Aug 2009 10:30:04 +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 n7VAU4cZ029198 for ; Mon, 31 Aug 2009 10:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7VAU4D7029194; Mon, 31 Aug 2009 10:30:04 GMT (envelope-from gnats) Resent-Date: Mon, 31 Aug 2009 10:30:04 GMT Resent-Message-Id: <200908311030.n7VAU4D7029194@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 370031065692 for ; Mon, 31 Aug 2009 10:22:08 +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 25CFB8FC32 for ; Mon, 31 Aug 2009 10:22:08 +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 n7VAM7nx064743 for ; Mon, 31 Aug 2009 10:22:07 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n7VAM7ab064742; Mon, 31 Aug 2009 10:22:07 GMT (envelope-from nobody) Message-Id: <200908311022.n7VAM7ab064742@www.freebsd.org> Date: Mon, 31 Aug 2009 10:22:07 GMT From: Patroklos Argyroudis To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/138381: NULL pointer dereference in t3_set_tcb_field() in file sys/dev/cxgb/ulp/tom/cxgb_cpl_io.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:30:04 -0000 >Number: 138381 >Category: kern >Synopsis: NULL pointer dereference in t3_set_tcb_field() in file sys/dev/cxgb/ulp/tom/cxgb_cpl_io.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:30:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Patroklos Argyroudis >Release: 8.0-CURRENT >Organization: census, inc >Environment: N/A >Description: There is a possible NULL pointer dereference in t3_set_tcb_field() line 895 in file sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c. The dereference should be after the check against NULL in line 897. >How-To-Repeat: N/A >Fix: Patch attached. Patch attached with submission follows: --- ./sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c.orig 2009-08-28 15:12:33.000000000 +0300 +++ ./sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c 2009-08-28 15:27:38.000000000 +0300 @@ -892,10 +892,12 @@ t3_set_tcb_field(struct toepcb *toep, uint16_t word, uint64_t mask, uint64_t val) { struct mbuf *m; - struct tcpcb *tp = toep->tp_tp; + struct tcpcb *tp; if (toep == NULL) return; + + tp = toep->tp_tp; if (tp->t_state == TCPS_CLOSED || (toep->tp_flags & TP_ABORT_SHUTDOWN)) { printf("not seting field\n"); >Release-Note: >Audit-Trail: >Unformatted: