From owner-freebsd-bugs@FreeBSD.ORG Wed Jun 4 06:40:14 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D08737B401 for ; Wed, 4 Jun 2003 06:40:14 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3516543FBF for ; Wed, 4 Jun 2003 06:40:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h54DeCUp092762 for ; Wed, 4 Jun 2003 06:40:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h54DeCiw092760; Wed, 4 Jun 2003 06:40:12 -0700 (PDT) Resent-Date: Wed, 4 Jun 2003 06:40:12 -0700 (PDT) Resent-Message-Id: <200306041340.h54DeCiw092760@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, David Hedley Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B42BB37B401 for ; Wed, 4 Jun 2003 06:40:00 -0700 (PDT) Received: from jane.inty.net (jane.inty.net [195.224.93.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79E9D43F3F for ; Wed, 4 Jun 2003 06:39:56 -0700 (PDT) (envelope-from david@bill.inty.net) Received: from bill.inty.net (bill.inty.net [212.50.178.162]) by jane.inty.net (8.11.6p2/8.11.6) with ESMTP id h54DdkS39767 for ; Wed, 4 Jun 2003 14:39:50 +0100 (BST) Received: from bill.inty.net (localhost.inty.net [127.0.0.1]) by bill.inty.net (8.12.3/8.12.3) with ESMTP id h54DdjLB014943 for ; Wed, 4 Jun 2003 14:39:45 +0100 (BST) (envelope-from david@bill.inty.net) Received: (from root@localhost) by bill.inty.net (8.12.3/8.12.3/Submit) id h54Ddita014942; Wed, 4 Jun 2003 14:39:44 +0100 (BST) Message-Id: <200306041339.h54Ddita014942@bill.inty.net> Date: Wed, 4 Jun 2003 14:39:44 +0100 (BST) From: David Hedley To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/52935: occasional panic in ip_input with IPSEC X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Hedley List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2003 13:40:14 -0000 >Number: 52935 >Category: kern >Synopsis: occasional panic in ip_input with IPSEC >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 04 06:40:11 PDT 2003 >Closed-Date: >Last-Modified: >Originator: David Hedley >Release: FreeBSD 4.7-RELEASE i386 >Organization: Inty Ltd >Environment: >Description: We are seeing occasional kernel panics when using IPSEC. The panic occurs in ip_input at the following line: * be handled via ip_forward() and ether_output() with the loopback * into the stack for SIMPLEX interfaces handled by ether_output(). */ if (m->m_pkthdr.rcvif->if_flags & IFF_BROADCAST) { <<<<< Panic here TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != AF_INET) continue; ia = ifatoia(ifa); It seems that m_pkthdr.rcvif is NULL and hence the resulting deference is invalid. >How-To-Repeat: >Fix: Ensure rcvif is not NULL before deferencing it: * be handled via ip_forward() and ether_output() with the loopback * into the stack for SIMPLEX interfaces handled by ether_output(). */ if (m->m_pkthdr.rcvif && m->m_pkthdr.rcvif->if_flags & IFF_BROADCAST) { TAILQ_FOREACH(ifa, &m->m_pkthdr.rcvif->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != AF_INET) >Release-Note: >Audit-Trail: >Unformatted: