Skip to content
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

Turn off 'noexec' option by default for named volumes #6280

Merged
merged 1 commit into from
May 21, 2020

Conversation

mheon
Copy link
Member

@mheon mheon commented May 19, 2020

We previously enforced this for security reasons, but as Dan has explained on several occasions, it's not very valuable there (it's trivially easy to bypass) and it does seriously annoy folks trying to use named volumes. Flip the default from 'on' to 'off'.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 19, 2020
@rhatdan
Copy link
Member

rhatdan commented May 19, 2020

LGTM

@rhatdan
Copy link
Member

rhatdan commented May 19, 2020

@BenTheElder PTAL

@rhatdan
Copy link
Member

rhatdan commented May 19, 2020

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, mheon, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [giuseppe,mheon,rhatdan]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@giuseppe
Copy link
Member

/lgtm
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 19, 2020
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 19, 2020
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Twitter will be happy :-) Restarting the flaked tests (Quay was down)

@mheon
Copy link
Member Author

mheon commented May 20, 2020

Apparently we have a test verifying that noexec is in there - let me fix that

@mheon mheon force-pushed the switch_off_noexec branch from 0806d1e to f4ad5e3 Compare May 20, 2020 13:16
@rhatdan
Copy link
Member

rhatdan commented May 20, 2020

Looks like the exec/noexec test is still failing.

@TomSweeneyRedHat
Copy link
Member

LGTM assuming happy tests

@BenTheElder
Copy link

ACK thanks, small note: In our case we were trying to use anonymous volumes (they're just scratch space, bound to the container lifecycle) and swap docker/podman.

Switching to creating volumes and specifying these explicitly in the podman-specific logic and improving detection of podman-docker vs docker is working well for us and should also let us bypass #4276 on older podman versions.

@mheon mheon force-pushed the switch_off_noexec branch from f4ad5e3 to 2025d93 Compare May 20, 2020 20:02
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label May 20, 2020
@mheon
Copy link
Member Author

mheon commented May 20, 2020

Hit the system tests as well; @edsantiago mind taking a look to make sure this looks OK?

@@ -125,13 +126,17 @@ EOF
expect_msg='.* exec user process caused.*permission denied'
fi

run_podman ${expect_rc} run --rm --volume $myvolume:/vol:z $IMAGE /vol/myscript
run_podman ${expect_rc} run --rm --volume $myvolume:/vol:noexecz $IMAGE /vol/myscript
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"noexecz"? Should there be a comma or something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what happens when I push before the tests finish running. Oops.

@mheon mheon force-pushed the switch_off_noexec branch 2 times, most recently from a99b01b to 81d2a48 Compare May 20, 2020 20:06
Comment on lines 132 to 135
# With exec, it should pass
run_podman run --rm -v $myvolume:/vol:z,exec $IMAGE /vol/myscript
is "$output" "got here -$rand-" "script in volume is runnable with exec"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove these

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for brusqueness, I just wasted too much time typing, then having my comments lost because of outdated diffs, then typing again, then losing them AGAIN DAMN YOU GITHUB. Didn't want to do that again.

Anyhow, my point was, system tests aren't intended to cover every possible situation - they're just a last-minute check for basic functionality. Testing the default is a good enough check for exec; testing noexec, likewise. We don't IMHO need a full test just for parsing 'exec'.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks

@edsantiago
Copy link
Member

"Failed to stop: readHandshakeRecord" in Cirrus ?!

We previously enforced this for security reasons, but as Dan has
explained on several occasions, it's not very valuable there
(it's trivially easy to bypass) and it does seriously annoy folks
trying to use named volumes. Flip the default from 'on' to 'off'.

Signed-off-by: Matthew Heon <[email protected]>
@mheon mheon force-pushed the switch_off_noexec branch from 81d2a48 to cc65430 Compare May 20, 2020 20:48
@kallisti5
Copy link

kallisti5 commented May 21, 2020

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)

@rhatdan
Copy link
Member

rhatdan commented May 21, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2020
@rhatdan
Copy link
Member

rhatdan commented May 21, 2020

@mheon I think this should be back ported to podman 1.9.3

@mheon
Copy link
Member Author

mheon commented May 21, 2020

Sure, will do.

Removing hold, things are green
/hold cancel

@mheon mheon removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 21, 2020
@openshift-merge-robot openshift-merge-robot merged commit 835d264 into containers:master May 21, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants