From clsung@FreeBSD.csie.nctu.edu.tw  Mon Apr 17 15:02:09 2006
Return-Path: <clsung@FreeBSD.csie.nctu.edu.tw>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5293B16A400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Apr 2006 15:02:09 +0000 (UTC)
	(envelope-from clsung@FreeBSD.csie.nctu.edu.tw)
Received: from FreeBSD.csie.nctu.edu.tw (freebsd.csie.nctu.edu.tw [140.113.17.209])
	by mx1.FreeBSD.org (Postfix) with ESMTP id EAA8F43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Apr 2006 15:02:08 +0000 (GMT)
	(envelope-from clsung@FreeBSD.csie.nctu.edu.tw)
Received: from localhost (localhost.csie.nctu.edu.tw [127.0.0.1])
	by FreeBSD.csie.nctu.edu.tw (Postfix) with ESMTP id 6CFC47E8F3;
	Mon, 17 Apr 2006 23:02:12 +0800 (CST)
Received: from FreeBSD.csie.nctu.edu.tw ([127.0.0.1])
	by localhost (FreeBSD.csie.nctu.edu.tw [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id GA3B+w8DlqcP; Mon, 17 Apr 2006 23:02:11 +0800 (CST)
Received: by FreeBSD.csie.nctu.edu.tw (Postfix, from userid 1038)
	id A2A517E99A; Mon, 17 Apr 2006 23:02:11 +0800 (CST)
Message-Id: <20060417150211.A2A517E99A@FreeBSD.csie.nctu.edu.tw>
Date: Mon, 17 Apr 2006 23:02:11 +0800 (CST)
From: Cheng-Lung Sung <clsung@freebsd.org>
Reply-To: Cheng-Lung Sung <clsung@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: clsung@gmail.com
Subject: security.jail.jailed should be more secure
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         95925
>Category:       kern
>Synopsis:       security.jail.jailed should be more secure
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 17 15:10:17 GMT 2006
>Closed-Date:    Mon Apr 17 15:42:56 GMT 2006
>Last-Modified:  Mon Apr 17 15:42:56 GMT 2006
>Originator:     Cheng-Lung Sung
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
FreeBSD @ Taiwan
>Environment:
System: FreeBSD FreeBSD.csie.nctu.edu.tw 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #7: Thu Apr 13 03:20:20 CST 2006 root@FreeBSD.csie.nctu.edu.tw:/home/usr.obj/usr/src/sys/FREEBSD i386

>Description:
	security.jail.jailed can be too easily shown from in jail,
	since it gives *someone* changes to know if he is in jail or not.
	I think better only show jailed when the administrator decide
	to insecure his machines (i.e. securelevel <=0)
>How-To-Repeat:
	sysctl -a | grep security.jail.jailed
>Fix:

--- sys/kern/kern_jail.c.orig	Mon Apr 17 22:53:48 2006
+++ sys/kern/kern_jail.c	Mon Apr 17 22:54:03 2006
@@ -580,5 +580,6 @@
 
 	return (error);
 }
-SYSCTL_PROC(_security_jail, OID_AUTO, jailed, CTLTYPE_INT | CTLFLAG_RD,
+SYSCTL_PROC(_security_jail, OID_AUTO, jailed,
+	CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_SECURE,
     NULL, 0, sysctl_jail_jailed, "I", "Process in jail?");

>Release-Note:
>Audit-Trail:

From: Cheng-Lung Sung <clsung@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org, freebsd-bugs@FreeBSD.org
Cc: Cheng-Lung Sung <clsung@freebsd.org>
Subject: Re: kern/95925: security.jail.jailed should be more secure
Date: Mon, 17 Apr 2006 23:30:23 +0800

 --+HP7ph2BbKc20aGI
 Content-Type: text/plain; charset=big5
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 No, please ignore this patch first, I misunderstanding
 the meaning of CTLFLAG_SECURE :-/
 On Mon, Apr 17, 2006 at 03:10:17PM +0000, FreeBSD-gnats-submit@freebsd.org =
 wrote:
 > Thank you very much for your problem report.
 > It has the internal identification `kern/95925'.
 > The individual assigned to look at your
 > report is: freebsd-bugs.=20
 >=20
 > You can access the state of your problem report at any time
 > via this link:
 >=20
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D95925
 >=20
 > >Category:       kern
 > >Responsible:    freebsd-bugs
 > >Synopsis:       security.jail.jailed should be more secure
 > >Arrival-Date:   Mon Apr 17 15:10:17 GMT 2006
 
 --=20
 Cheng-Lung Sung - clsung@
 
 --+HP7ph2BbKc20aGI
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.3 (FreeBSD)
 
 iD8DBQFEQ7SO+AeJ85Vui8ERArsWAJwIhpy6iXKajZC0dTkxXz6Or91eawCdGyaR
 Ks+2foko5dLgNfUs1gcVa/s=
 =HEKz
 -----END PGP SIGNATURE-----
 
 --+HP7ph2BbKc20aGI--
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Apr 17 15:42:43 UTC 2006 
State-Changed-Why:  
Closed at submitter's request. 

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