From nobody@FreeBSD.org  Sun Sep 16 09:46:50 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0487316A417
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Sep 2007 09:46:50 +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 E0F5313C469
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Sep 2007 09:46:49 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l8G9knOo010881
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 16 Sep 2007 09:46:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l8G9knAL010880;
	Sun, 16 Sep 2007 09:46:49 GMT
	(envelope-from nobody)
Message-Id: <200709160946.l8G9knAL010880@www.freebsd.org>
Date: Sun, 16 Sep 2007 09:46:49 GMT
From: Arnaud Degroote <degroote@NetBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Interrupt level not restored correctly in ip_ipsec_input
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         116392
>Category:       kern
>Synopsis:       Interrupt level not restored correctly in ip_ipsec_input
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 16 09:50:01 GMT 2007
>Closed-Date:    Wed Sep 19 20:07:28 GMT 2007
>Last-Modified:  Wed Sep 19 20:07:28 GMT 2007
>Originator:     Arnaud Degroote
>Release:        HEAD
>Organization:
>Environment:
No freebsd box. Code inspection
>Description:
In ip_ipsec_input and ip6_ipsec_input, in case where sp == NULL, we go out of the function with a return 1 without restoring the right interrupt level.
>How-To-Repeat:
N/A
>Fix:
For ip6_ipsec.c you can use that. The same patch is necessary on ip_ipsec.c

--- ip6_ipsec.orig.c    2007-09-16 11:42:15.000000000 +0200
+++ ip6_ipsec.c 2007-09-16 11:42:35.000000000 +0200
@@ -181,7 +181,6 @@
                        /* XXX error stat??? */
                        error = EINVAL;
                        DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/
-                       return 1;
                }
                splx(s);
                if (error)


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: bz 
State-Changed-When: Wed Sep 19 20:04:56 UTC 2007 
State-Changed-Why:  
spl* are NOPs since FreeBSD 5. 


Responsible-Changed-From-To: freebsd-bugs->bz 
Responsible-Changed-By: bz 
Responsible-Changed-When: Wed Sep 19 20:04:56 UTC 2007 
Responsible-Changed-Why:  
Take the PR in case of follow-ups. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116392 
>Unformatted:
