Skip to content

Introduce a dedicated unconfined AA policy#14855

Merged
calavera merged 1 commit intomoby:masterfrom
ewindisch:apparmor-unconfined
Jul 23, 2015
Merged

Introduce a dedicated unconfined AA policy#14855
calavera merged 1 commit intomoby:masterfrom
ewindisch:apparmor-unconfined

Conversation

@ewindisch
Copy link
Copy Markdown
Contributor

By using the 'unconfined' policy for privileged
containers, we have inherited the host's apparmor
policies, which really make no sense in the
context of the container's filesystem.

For instance, policies written against
the paths of binaries such as '/usr/sbin/tcpdump'
can be easily circumvented by moving the binary
within the container filesystem.

Fixes #5490 #14550

Signed-off-by: Eric Windisch [email protected]

By using the 'unconfined' policy for privileged
containers, we have inherited the host's apparmor
policies, which really make no sense in the
context of the container's filesystem.

For instance, policies written against
the paths of binaries such as '/usr/sbin/tcpdump'
can be easily circumvented by moving the binary
within the container filesystem.

Fixes GH#5490

Signed-off-by: Eric Windisch <[email protected]>
@ewindisch
Copy link
Copy Markdown
Contributor Author

I've done testing to make sure this doesn't break docker-in-docker, but some more thorough testing by users would be great. Users may invoke the old behavior using '--privileged --security-opt apparmor:unconfined'

@ewindisch
Copy link
Copy Markdown
Contributor Author

Fixes #14550 and #5490

@ewindisch
Copy link
Copy Markdown
Contributor Author

/cc @duglin @stefanberger @salmanbaset

@ewindisch
Copy link
Copy Markdown
Contributor Author

@tianon This PR will "stop profiles like mysqld from bleeding into containers and applying to processes that they shouldn't".

See #14864 for a policy for the docker binary, hardening against attacks against the engine itself (whether via vulnerabilities in image pulls / extraction, or some other vectors)

@tianon
Copy link
Copy Markdown
Member

tianon commented Jul 22, 2015

🤘 ❤️ LGTM

@calavera
Copy link
Copy Markdown
Contributor

LGTM

calavera added a commit that referenced this pull request Jul 23, 2015
Introduce a dedicated unconfined AA policy
@calavera calavera merged commit ac9fc03 into moby:master Jul 23, 2015
RochesterinNYC added a commit to cloudfoundry/machete that referenced this pull request Aug 4, 2016
- This fixes the following error that running `tcpdump` in a privileged
  container generates:
  `tcpdump: error while loading shared libraries: libcrypto.so.1.0.0:
  cannot open shared object file: Permission denied`
- Problem: moby/moby#5490
- Fix: moby/moby#14855

[#126394949]

Signed-off-by: Gabriel Ramirez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants