update apparmor profile to restrict mounts
Bug #942934 reported by
Serge Hallyn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Serge Hallyn |
Bug Description
The default lxc-start policy should place the following restrictions on mounts (among others):
1. procfs may only be mounted under /proc
2. devpts may not be mounted
3. sys may only be mounted at /sys
4. cgroups either
a. not mountable or
b. mounted under /sys/fs/cgroup, with write restrictions outside of
is doable without making per-container policies.
5. securityfs not mountable
6. debufs not mountable (for now)
7. binfmt_misc not mountable
Related branches
Changed in lxc (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
To post a comment you must log in.
This bug was fixed in the package lxc - 0.7.5-3ubuntu41
---------------
lxc (0.7.5-3ubuntu41) precise; urgency=low
* add lxc-shutdown command: TIMEOUT (default 120s) start-apparmor: add lxc.aa_profile to config file. If not lxc-default. apparmor from debian/ lxc.apparmor. d/lxc-container s #include /etc/apparmor. d/lxc/* lxc.postinst: load the new lxc-containers profiles lxc.apparmor: insert the stricter mount rules for lxc-start local/lxc- start-ephemeral : re-enable aufs option (LP: #960262) local/lxc- wait: the script relative- paths: update templates to use relative paths, lxc/CN/ rootfs as target prefix,
- 0060-lxc-shutdown: add the command to the source
- debian/lxc.upstart: use lxc-shutdown to shut down containers cleanly
- debian/lxc.default: add LXC_SHUTDOWN_
* support per-container apparmor policies: (LP: #953453)
- 0061-lxc-
specified, lxc-default profile is used for container. Otherwise, the
specified profile is used.
Note that per-container profiles must be named 'lxc-*'.
- split debian/
- have /etc/apparmor.
- debian/
- debian/lxc.postrm: remove lxc-containers profiles
- debian/rules: make new etc/apparmor.d/lxc dir and copy lxc-default into it
- debian/control: add libapparmor-dev to build-depends
- debian/lxc.upstart: load apparmor per-container policies at pre-start.
* debian/
(LP: #645625) (LP: #942934)
* debian/
* replace upstream lxc-wait with our own bash script (LP: #951181)
- debian/
- debian/rules: copy the script into place
* 0062-templates-
and make lxc-start always accept /var/lib/
to make lvm containers work. (LP: #960860)
-- Serge Hallyn <email address hidden> Wed, 21 Mar 2012 08:20:06 -0500