From owner-freebsd-jail@FreeBSD.ORG Mon Jul 15 11:06:45 2013 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E9F23F4C for ; Mon, 15 Jul 2013 11:06:45 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id DC05AFC3 for ; Mon, 15 Jul 2013 11:06:45 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6FB6jkm084477 for ; Mon, 15 Jul 2013 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6FB6jPi084475 for freebsd-jail@FreeBSD.org; Mon, 15 Jul 2013 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 15 Jul 2013 11:06:45 GMT Message-Id: <201307151106.r6FB6jPi084475@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-jail@FreeBSD.org Subject: Current problem reports assigned to freebsd-jail@FreeBSD.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2013 11:06:46 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/180067 jail [jail] [patch] fix multicast support within jails o bin/178302 jail jail(8): unknown parameter: ip6.addr when kernel compi o kern/176112 jail [jail] [panic] kernel panic when starting jails o kern/176092 jail [jail] [panic] Starting a jail on my releng/9.1 kernel o kern/174902 jail [jail] jail should provide validator for jail names o bin/173469 jail [jail] regression: security.jail.sysvipc_allowed=1 no o kern/169751 jail [jail] reading routing information does not work in ja o bin/167911 jail new jail(8) problem with removal, ifconfg -alias and k o kern/159918 jail [jail] inter-jail communication failure o kern/156111 jail [jail] procstat -b not supported in jail o misc/155765 jail [patch] `buildworld' does not honors WITHOUT_JAIL o conf/154246 jail [jail] [patch] Bad symlink created if devfs mount poin s conf/142972 jail [jail] [patch] Support JAILv2 and vnet in rc.d/jail o conf/141317 jail [patch] uncorrect jail stop in /etc/rc.d/jail o kern/133265 jail [jail] is there a solution how to run nfs client in ja o kern/119842 jail [smbfs] [jail] "Bad address" with smbfs inside a jail o bin/99566 jail [jail] [patch] fstat(1) according to specified jid 17 problems total. From owner-freebsd-jail@FreeBSD.ORG Thu Jul 18 13:09:11 2013 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7AB70CD9; Thu, 18 Jul 2013 13:09:11 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) by mx1.freebsd.org (Postfix) with ESMTP id EBC33CF3; Thu, 18 Jul 2013 13:09:10 +0000 (UTC) Received: from park.js.berklix.net (p5DCBEACA.dip0.t-ipconnect.de [93.203.234.202]) (authenticated bits=128) by land.berklix.org (8.14.5/8.14.5) with ESMTP id r6ID98KV022403; Thu, 18 Jul 2013 13:09:08 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.14.3/8.14.3) with ESMTP id r6ID8xhO004288; Thu, 18 Jul 2013 15:08:59 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id r6ID8eGI023276; Thu, 18 Jul 2013 15:08:46 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201307181308.r6ID8eGI023276@fire.js.berklix.net> To: freebsd-jail@freebsd.org, freebsd-security@freebsd.org Subject: /dev/pts/0 in a jail shows no one is observing from outer prison. From: "Julian H. Stacey" Organization: http://berklix.com BSD Linux Unix Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://www.berklix.com/free/ X-URL: http://www.berklix.com/~jhs/cv/ Date: Thu, 18 Jul 2013 15:08:40 +0200 Sender: jhs@berklix.com Cc: np@bsn.com X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jul 2013 13:09:11 -0000 Hi freebsd-jail@freebsd.org, freebsd-security@freebsd.org cc: np@bsn.com I noticed something within a jail that seems a little slack: A ssh to a jail followed by Who, if it shows just pts/0, shows no one else is logged in { within jail And Also Outer Prison [And presumably also other parallel jails] }. (OK Yes, an admin might be logged in to prison on on a direct wire or ttyv but most unlikely in the common case of a remote server farm) So the person logging in to the jail is effectively told "Owner of the prison is also absent, now is a good time to try exploits." Ideally within a jail, logins would get no indication if the prison & other jails were were logged in or not. (OK, Yes, one might argue on a traditional non prison & jails server, one can also see who is, or not, logged in on one large common system, but presumably one benefit of putting users in jails should be the jailed should no longer see presence of outside users ?) Is it viable to tighten the default ? man jail has: devfs_ruleset zero (default) I was using a jail created by ezjail. The outer prison (names obfuscated) mount | grep dev devfs on /dev (devfs, local, multilabel) devfs on /tank4/ezjail/jail1.org/dev (devfs, local, multilabel) fdescfs on /tank4/ezjail/jail1.org/dev/fd (fdescfs) devfs on /tank4/ezjail/jail2.org/dev (devfs, local, multilabel) fdescfs on /tank4/ezjail/jail2.org/dev/fd (fdescfs) Why I noticed: My DSL link timed out, ( no sshd with TCPKeepAlive=Yes, & failed ping -i 120 -q my-isp.de ) Within jail, after who & ps -t to kill junk, new logins persisted at pts/1, not pts/0. Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com Reply below not above, like a play script. Indent old text with "> ". Send plain text. No quoted-printable, HTML, base64, multipart/alternative. From owner-freebsd-jail@FreeBSD.ORG Fri Jul 19 06:35:27 2013 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 01AB447E; Fri, 19 Jul 2013 06:35:27 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id BB77F2BD; Fri, 19 Jul 2013 06:35:26 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id A6FB247C9; Fri, 19 Jul 2013 06:35:19 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 8A265353D9; Fri, 19 Jul 2013 08:34:50 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Julian H. Stacey" Subject: Re: /dev/pts/0 in a jail shows no one is observing from outer prison. References: <201307181308.r6ID8eGI023276@fire.js.berklix.net> Date: Fri, 19 Jul 2013 08:34:45 +0200 In-Reply-To: <201307181308.r6ID8eGI023276@fire.js.berklix.net> (Julian H. Stacey's message of "Thu, 18 Jul 2013 15:08:40 +0200") Message-ID: <86d2qfdpmi.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-security@freebsd.org, freebsd-jail@freebsd.org, np@bsn.com X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2013 06:35:27 -0000 "Julian H. Stacey" writes: > A ssh to a jail followed by Who, if it shows just pts/0, shows > no one else is logged in { within jail And Also Outer Prison > [And presumably also other parallel jails] }. Not really, it just shows that pts/0 was available. Like file descriptors, pseudo-ttys are allocated on a first-unused basis. There could be twenty people logged in; if the first logs out, the twenty-first gets pts/0. Also, please read the warning at the start of the jail chapter in the FreeBSD handbook. I should probably update it to note that there are many ways in which information can leak between jails and the host. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-jail@FreeBSD.ORG Fri Jul 19 22:39:38 2013 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 31912BC7; Fri, 19 Jul 2013 22:39:38 +0000 (UTC) (envelope-from jhs@berklix.com) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) by mx1.freebsd.org (Postfix) with ESMTP id 9FE94663; Fri, 19 Jul 2013 22:39:36 +0000 (UTC) Received: from park.js.berklix.net (p5DCBFD87.dip0.t-ipconnect.de [93.203.253.135]) (authenticated bits=128) by land.berklix.org (8.14.5/8.14.5) with ESMTP id r6JMdYbK005494; Fri, 19 Jul 2013 22:39:34 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by park.js.berklix.net (8.14.3/8.14.3) with ESMTP id r6JMdLuO006152; Sat, 20 Jul 2013 00:39:21 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.4/8.14.4) with ESMTP id r6JMcvO2083730; Sat, 20 Jul 2013 00:39:03 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <201307192239.r6JMcvO2083730@fire.js.berklix.net> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Subject: Re: /dev/pts/0 in a jail shows no one is observing from outer prison. From: "Julian H. Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Fri, 19 Jul 2013 08:34:45 +0200." <86d2qfdpmi.fsf@nine.des.no> Date: Sat, 20 Jul 2013 00:38:57 +0200 Sender: jhs@berklix.com Cc: freebsd-security@freebsd.org, freebsd-jail@freebsd.org, np@bsn.com X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2013 22:39:38 -0000 Hi, Reference: > From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= > Date: Fri, 19 Jul 2013 08:34:45 +0200 =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= wrote: > "Julian H. Stacey" writes: > > A ssh to a jail followed by Who, if it shows just pts/0, shows > > no one else is logged in { within jail And Also Outer Prison > > [And presumably also other parallel jails] }. > > Not really, it just shows that pts/0 was available. Like file > descriptors, pseudo-ttys are allocated on a first-unused basis. There > could be twenty people logged in; if the first logs out, the > twenty-first gets pts/0. Thanks DES, Yes, I suppose so, on busy hardware. It was more obvious what was going on with my prison & jail as that was lightly logged in. If FreeBSD wanted to obscure the information, I suppose one could do a kernel tweak to do pty allocation from a cyclic buffer, (like PID IDs) rather than searching sequentially from 0 each time, but I guess there's more interesting things to do than that. > Also, please read the warning at the start of the jail chapter in the > FreeBSD handbook. Wow ! Light dawns brightly ! > I should probably update it to note that there are > many ways in which information can leak between jails and the host. If so do, maybe add http://lists.freebsd.org/mailman/listinfo/freebsd-jail next to http://lists.freebsd.org/mailman/listinfo/freebsd-questions If you think appropriate. Thanks. Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com Reply below not above, like a play script. Indent old text with "> ". Send plain text. No quoted-printable, HTML, base64, multipart/alternative.