From nobody@FreeBSD.org  Thu Mar 27 15:19:57 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 6F26FC02
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Mar 2014 15:19:57 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 5B625CF6
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Mar 2014 15:19:57 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2RFJulx026937
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Mar 2014 15:19:56 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2RFJuCf026926;
	Thu, 27 Mar 2014 15:19:56 GMT
	(envelope-from nobody)
Message-Id: <201403271519.s2RFJuCf026926@cgiserv.freebsd.org>
Date: Thu, 27 Mar 2014 15:19:56 GMT
From: Philipp Schmid <philipp.schmid@openresearch.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Running pfctl -sr -v in Jail with VIMAGE crashes host
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         188018
>Category:       kern
>Synopsis:       [jail] [vimage] Running pfctl -sr -v in Jail with VIMAGE crashes host
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-jail
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 27 15:20:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Sun Apr 20 00:38:19 UTC 2014
>Originator:     Philipp Schmid
>Release:        10.0
>Organization:
OpenResearch Software Development OG
>Environment:
FreeBSD rna 10.0-RELEASE FreeBSD 10.0-RELEASE #4: Sat Mar  8 04:54:46 CET 2014     root@rna:/usr/obj/usr/src/sys/RNA  amd64
>Description:
I have a jail running with VIMAGE enabled.
The host is using PF for packet filtering.

The script:

    /etc/periodic/security/520.pfdenied

gets run daily at 4:00 am CET every day per default.

520.pfdenied runs the command:

   pfctl -sr -v

If pfctl -sr -v is executed in the jail by the script or by hand, the
host reboots/crashes immediately.
>How-To-Repeat:
Setup FreeBSD 10.


Compile a kernel with the following config:

root@host:~ # diff kernels/RNA /usr/src/sys/amd64/conf/GENERIC
22c22
< ident         RNA
---
> ident         GENERIC
345,356d344
< 
< # IPSec
< options   IPSEC        #IP security
< device    crypto
< options   IPSEC_FILTERTUNNEL
< device    enc
< 
< # Virtual networking for jail
< options VIMAGE
< device epair
< device if_bridge

Enable PF on the host.

Create a Jail.

Run: pfctl -sr -v

Crash
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-jail 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Apr 20 00:37:33 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer(s). 

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