-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VOLUME
are mounted as noexec
#4318
Comments
Podman flags: @rhatdan I'm inclined to leave the defaults for volumes we explicitly specify ( |
Strip noexec. I think noexec is the most overrated security mechanism for mount points, since it easy to bypass by using scripting languages like bash, python, perl, ruby, awk ... |
This matches Docker more closely, but retains the more important protections of nosuid/nodev. Fixes containers#4318 Signed-off-by: Matthew Heon <[email protected]>
Is there any workaround for this bug until my distro (Fedora) includes the fix? |
You can create a volume and mount it over the path for the image volume, making sure to specify We're in the process of cutting a new release, so a version of Podman with this fix will be available soon. |
Just an FYI, I tried out a recent build of podman and while volumes specified with |
That's the default, but it can be changed by adding 'exec' to volume
options.
…On Thu, Nov 14, 2019, 00:46 Nicholas Bishop ***@***.***> wrote:
Just an FYI, I tried out a recent build of podman and while volumes
specified with VOLUME are now mounted exec, volumes mounted with podman
run --volume are still noexec. Not sure if that's expected behavior or
not.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4318>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCAE63RVC5AJVPX3RKDQTTQ2HANCNFSM4JDOR2CQ>
.
|
Does that default match Docker? |
No, Docker defaults to |
Ok I think we should match docker. |
#4557 documents the defaults. |
Maybe my brain shorts out after days getting into podman, but in podman 1.9.1 I think there is something wrong with image volumes and default options. The image defines a volume and podman finds it |
I think that's fully expected - the image volume is overridden by your volume mount, and your named volume defaults to |
k thanks, the container instructions by atlassian at docker.io with docker in mind don't tell to use the exec option, yet without the container doesn't start properly, so there is an inconsistency with docker then (propably, haven't checked). |
Quoting @rhatdan above. So is the intention to match Docker behavior regarding default mount flags? Because the Podman docs specifically state that you will get 'noexec' by default (differing from Docker). |
I don't want to promise we will match completely; the utility of We presently also include |
I agree with removing noexec, keeping nosuid and nodev makes sense. |
#6280 flips the default to off for named volumes. |
oh wow.. this one was obnoxious to track down and not super obvious. All of our CI started breaking. Pretty much compiling anything within a named volume requires exec (autoconf does a bunch of gcc compiler checks which execute test binaries) |
This leaves us with only git_repository rules not being cached, the worst offender being the edk2 recursive submodule clone. See: bazelbuild/bazel#5116 gazelle's repo lookup (running `go list`) is also not cached, even if the repositories themselves are. We can eliminate most of the remaining rebuild time by mounting the entire execroot, however, this is currently foiled by a podman bug (Bazel needs to execute lots of binaries inside the root): containers/podman#4318 Test Plan: Ran `bazel build scripts:launch`, recreated container, ran it again. Build times decreased significantly: INFO: Elapsed time: 279.951s, Critical Path: 119.05s INFO: 477 processes: 476 linux-sandbox, 1 local. INFO: Build completed successfully, 497 total actions X-Origin-Diff: phab/D206 GitOrigin-RevId: 2d17a7eeb5d8b70ad4e26c13a0c6b31c4edfb33f
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
VOLUME
inDockerfile
are mounted asnoexec
. This is unexpected, breaks existing systems. and derives from originaldocker
(moby-engine-18.06.3) .E.g.
causes
while
docker
works finecat /proc/mounts
within the container shows, thatnoexec
mount flags are set for the/var/tmp
bind mount.Steps to reproduce the issue:
VOLUME
Describe the results you received:
Volume is mounted without
noexec
flagsDescribe the results you expected:
Volume is mounted with
noexec
flag.Additional information you deem important (e.g. issue happens only occasionally):
***
podman inspect
output ***Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: