| Summary: | jail(8): Jail escape when cwd is moved from the host system | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | vedad |
| Component: | Books & Articles | Assignee: | Glen Barber <gjb> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
vedad
2010-01-05 09:40:02 UTC
Responsible Changed From-To: freebsd-bugs->freebsd-jail Over to maintainer(s). Hi, this is the expected behaviour but is probably not explicitly documented. Patches to update the man page are welcome. -- Bjoern A. Zeeb It will not break if you know what you are doing. State Changed From-To: open->analyzed Apparently this is the expected behavior and just needs to be documented. Responsible Changed From-To: freebsd-jail->freebsd-doc Responsible Changed From-To: freebsd-doc->gjb Over to me. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This might be similar to the following PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/156853 Although the problems are different, they basically deal with the fact that it is possible to break the out of the jail into the host system. See the audit trail for a discussion. When a solution is found (with all parties involved and happy with it), both PRs should be handled the same way. Regards Benedict Reuschling FreeBSD Doc Committer The FreeBSD Documentation Project FreeBSD German Documentation Project - https://doc.bsdgroup.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4kjigACgkQTSZQLkqBk0goowCguv3imA9tYGPe75rAscdx1kYu dNgAoLYPiHsSn/yZRAGqQcuXwGeqd1DR =yZ+w -----END PGP SIGNATURE----- Author: gjb (doc committer) Date: Sun Jul 24 03:34:38 2011 New Revision: 224286 URL: http://svn.freebsd.org/changeset/base/224286 Log: Document the potential for jail escape. Submitted by: Vedad KAJTAZ (vedad % kajtaz net) PR: 142341 Reviewed by: bz, rwatson Rewording by: rwatson Approved by: re (kensmith) MFC after: 3 days Modified: head/usr.sbin/jail/jail.8 Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Sun Jul 24 01:36:01 2011 (r224285) +++ head/usr.sbin/jail/jail.8 Sun Jul 24 03:34:38 2011 (r224286) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2010 +.Dd July 23, 2011 .Dt JAIL 8 .Os .Sh NAME @@ -907,3 +907,10 @@ Currently, the simplest answer is to min offered on the host, possibly limiting it to services offered from .Xr inetd 8 which is easily configurable. +.Sh NOTES +Great care should be taken when managing directories visible within the jail. +For example, if a jailed process has its current working directory set to a +directory that is moved out of the jail's chroot, then the process may gain +access to the file space outside of the jail. +It is recommended that directories always be copied, rather than moved, out +of a jail. _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: analyzed->patched Committed a fix to HEAD (r224286). MFC in 3 days. Author: gjb (doc committer) Date: Wed Jul 27 01:56:52 2011 New Revision: 224462 URL: http://svn.freebsd.org/changeset/base/224462 Log: MFC 224286: Document the potential for jail escape. PR: 142341 Modified: stable/8/usr.sbin/jail/jail.8 Directory Properties: stable/8/usr.sbin/jail/ (props changed) Modified: stable/8/usr.sbin/jail/jail.8 ============================================================================== --- stable/8/usr.sbin/jail/jail.8 Tue Jul 26 20:51:58 2011 (r224461) +++ stable/8/usr.sbin/jail/jail.8 Wed Jul 27 01:56:52 2011 (r224462) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2010 +.Dd July 23, 2011 .Dt JAIL 8 .Os .Sh NAME @@ -913,3 +913,10 @@ Currently, the simplest answer is to min offered on the host, possibly limiting it to services offered from .Xr inetd 8 which is easily configurable. +.Sh NOTES +Great care should be taken when managing directories visible within the jail. +For example, if a jailed process has its current working directory set to a +directory that is moved out of the jail's chroot, then the process may gain +access to the file space outside of the jail. +It is recommended that directories always be copied, rather than moved, out +of a jail. _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" Author: gjb (doc committer) Date: Wed Jul 27 01:57:24 2011 New Revision: 224463 URL: http://svn.freebsd.org/changeset/base/224463 Log: MFC 224286: Document the potential for jail escape. PR: 142341 Modified: stable/7/usr.sbin/jail/jail.8 Directory Properties: stable/7/usr.sbin/jail/ (props changed) Modified: stable/7/usr.sbin/jail/jail.8 ============================================================================== --- stable/7/usr.sbin/jail/jail.8 Wed Jul 27 01:56:52 2011 (r224462) +++ stable/7/usr.sbin/jail/jail.8 Wed Jul 27 01:57:24 2011 (r224463) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2010 +.Dd July 23, 2011 .Dt JAIL 8 .Os .Sh NAME @@ -708,3 +708,10 @@ Currently, the simplest answer is to min offered on the host, possibly limiting it to services offered from .Xr inetd 8 which is easily configurable. +.Sh NOTES +Great care should be taken when managing directories visible within the jail. +For example, if a jailed process has its current working directory set to a +directory that is moved out of the jail's chroot, then the process may gain +access to the file space outside of the jail. +It is recommended that directories always be copied, rather than moved, out +of a jail. _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: patched->closed Merged to 7-stable and 8-stable. |