Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Nov 2020 00:53:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 250823] i386 linuxulator in jail breaks mount
Message-ID:  <bug-250823-227@https.bugs.freebsd.org/bugzilla/>

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

            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@FreeBSD.org
          Reporter: mail@russell-allen.com

I'm running=20

    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 =3D 0; in my jail.conf, calling mount within the ja=
il
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.

--=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-250823-227>