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

Try using chattr to mark docker-runc as immutable #6506

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

justinsb
Copy link
Member

May be a workaround for CVE-2019-5736, is defense in depth in any case.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 21, 2019
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 21, 2019
May be a workaround for CVE-2019-5736, is defense in depth in any case.
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 21, 2019
@ghost
Copy link

ghost commented Feb 21, 2019

Does this actually fix the problem? Root within the container can't simply remove the attribute?

@miguelbernadi
Copy link

Definitely not a fix, but at least would prevent an accidental overwrite.

@justinsb
Copy link
Member Author

So I'm trying to get more details, but it might actually be a fix... https://seclists.org/oss-sec/2019/q1/134 says "Yes that mitigation would also work.". And the commenter there is the person that wrote the patch, so I treat that as highly credible.

@miguelbernadi
Copy link

@justinsb I stand corrected. The difference in opinion is that chattr +i is not a fix in general, but in the specific case of Docker due to it already removing by default the capability to work around the IMMUTABLE flag. Mind that an administrator can disable that limitation if they so desire, or if they have a process that requires that capabiity and those systems would still be vulnerable. (This is also per Aleksa Sarai's message).

@justinsb
Copy link
Member Author

Absolutely agreed @miguelbernadi - I'm thinking though that this might be the best fix for us to ship by default for k8s <= 1.11, as I would expect it covers all non-privileged pods, and it seems minimally invasive. But we can also document how to change the docker version or add the hook for people that want to cover their bases. I'm suggesting that in #6522

@mikesplain
Copy link
Contributor

This looks great. Agreed that chattr is probably the right fix for K8s <= 1.11. Thanks @justinsb!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 25, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb, mikesplain

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 [justinsb,mikesplain]

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

@k8s-ci-robot k8s-ci-robot merged commit 743b319 into kubernetes:master Feb 25, 2019
k8s-ci-robot added a commit that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cherry-pick cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants