Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

cyphar
Copy link
Member

@cyphar cyphar commented Sep 27, 2019

This is an additional mitigation for CVE-2019-16884. The primary problem
is that Docker can be coerced into bind-mounting a file system on top of
/proc (resulting in label-related writes to /proc no longer happening).

While runc is working on mitigations against permitting the mounts, this
helps avoid go-selinux from being tricked into writing to non-procfs
files. This is not a perfect solution (after all, there might be a
bind-mount of a different procfs file over the target) but in order to
exploit that you would need to be able to tweak a config.json pretty
specifically (which thankfully Docker doesn't allow).

See opencontainers/runc#2128
Signed-off-by: Aleksa Sarai [email protected]

@rhatdan
Copy link
Collaborator

rhatdan commented Sep 27, 2019

LGTM
@mrunalp @giuseppe @vrothberg PTAL

Approved with PullApprove

This is an additional mitigation for CVE-2019-16884. The primary problem
is that Docker can be coerced into bind-mounting a file system on top of
/proc (resulting in label-related writes to /proc no longer happening).

While runc is working on mitigations against permitting the mounts, this
helps avoid go-selinux from being tricked into writing to non-procfs
files. This is not a perfect solution (after all, there might be a
bind-mount of a different procfs file over the target) but in order to
exploit that you would need to be able to tweak a config.json pretty
specifically (which thankfully Docker doesn't allow).

Signed-off-by: Aleksa Sarai <[email protected]>
@cyphar cyphar force-pushed the selinux-verify-procfs branch from 0386f01 to 03b517d Compare September 27, 2019 18:45
@cyphar
Copy link
Member Author

cyphar commented Sep 28, 2019

I changed the error message formatting to match the updated runc PR.

/cc @opencontainers/selinux-maintainers

@mrunalp
Copy link
Contributor

mrunalp commented Sep 28, 2019

LGTM

Approved with PullApprove

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants