Skip to content

Commit 6c6dfcb

Browse files
committed
contrib/apparmor: deny /sys/devices/virtual/powercap
While this is not strictly necessary as the default OCI config masks this path, it is possible that the user disabled path masking, passed their own list, or is using a forked (or future) daemon version that has a modified default config/allows changing the default config. Add some defense-in-depth by also masking out this problematic hardware device with the AppArmor LSM. Signed-off-by: Bjorn Neergaard <[email protected]>
1 parent 106a9b7 commit 6c6dfcb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

contrib/apparmor/template.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ profile {{.Name}} flags=(attach_disconnected,mediate_deleted) {
7777
deny /sys/fs/c[^g]*/** wklx,
7878
deny /sys/fs/cg[^r]*/** wklx,
7979
deny /sys/firmware/** rwklx,
80+
deny /sys/devices/virtual/powercap/** rwklx,
8081
deny /sys/kernel/security/** rwklx,
8182
8283
# allow processes within the container to trace each other,

0 commit comments

Comments
 (0)