From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 28 01:00:45 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org 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 BCC0016A423 for ; Tue, 28 Mar 2006 01:00:45 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 608C243D49 for ; Tue, 28 Mar 2006 01:00:45 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2S10jEn028520 for ; Tue, 28 Mar 2006 01:00:45 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2S10jLr028519; Tue, 28 Mar 2006 01:00:45 GMT (envelope-from gnats) Date: Tue, 28 Mar 2006 01:00:45 GMT Message-Id: <200603280100.k2S10jLr028519@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: zhouyi zhou Cc: Subject: Re: kern/94599: [mac] MAC (Mandatory Access Control) and IPSEC can not coexist X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: zhouyi zhou List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 01:00:45 -0000 The following reply was made to PR kern/94599; it has been noted by GNATS. From: zhouyi zhou To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/94599: [mac] MAC (Mandatory Access Control) and IPSEC can not coexist Date: Tue, 28 Mar 2006 08:51:13 +0800 I finally find reason why. there exists a serious bug in function ipsec_copypkt(m) of netinet6/ipsec.c in FreeBSD 5.4, FreeBSD 6.0 and FreeBSD 7.0 3469 MGETHDR(mnew, M_DONTWAIT, MT_HEADER); 3470 if (mnew == NULL) 3471 goto fail; 3472 mnew->m_pkthdr = n->m_pkthdr; 3473 #if 0 3474 /* XXX: convert to m_tag or delete? */ 3475 if (n->m_pkthdr.aux) { 3476 mnew->m_pkthdr.aux = 3477 m_copym(n->m_pkthdr.aux, 3478 0, M_COPYALL, M_DONTWAIT); 3479 } 3480 #endif 3481 M_MOVE_PKTHDR(mnew, n); On line 3472, mnew->m_pkthdr is assigned n->m_pkthdr, and on line 3481, in function m_move_pkthdr, mnew's tag list will be delete (and the n's tag of cause). This will cause system to crash. After commenting out line 3472, everything is OK. Sincerely yours Zhouyi Zhou Institute of Software Chinese Academy of Sciences