[Bug 250823] i386 linuxulator in jail breaks mount
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Nov 3 00:53:45 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250823
Bug ID: 250823
Summary: i386 linuxulator in jail breaks mount
Product: Base System
Version: 12.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: mail at russell-allen.com
I'm running
FreeBSD 12.1-RELEASE-p10 FreeBSD 12.1-RELEASE-p10 GENERIC amd64
which is hosting a jail called 'j1' running
FreeBSD j1 12.1-RELEASE-p10 FreeBSD 12.1-RELEASE-p10 GENERIC i386
Inside the jail, the Centos Linux packages are installed.
A host directory is mounted into the jail:
mount_nullfs /${BASE}/ourself-manager /${BASE}/j1/self
I can use a linux binary to check the mounted directory:
jexec j1 /compat/linux/bin/bash -c "ls /self"
(shows big list of files)
However if I attempt to mkdir /self within a linux app, instead of returning
EEXIST it breaks the mount:
jexec j1 /compat/linux/bin/bash -c "mkdir /self"
jexec j1 /compat/linux/bin/bash -c "ls /self"
(shows empty directory)
Once this has happened, no linux app within the jail can see the contents of
/self, nor can freebsd apps started by a linux app. However jailed freebsd apps
started from outside still work, ie
jexec j1 /usr/local/bin/bash -c "ls /self"
(shows big list of files)
If I set enforce_statfs = 0; in my jail.conf, calling mount within the jail
shows /self as still being mounted.
This also occurs where /self is a mounted ZFS dataset instead of a null_fs
mount, and it isn't bash specific - any linux app seems to have the same
result.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list