diff --git a/contrib/apparmor/template.go b/contrib/apparmor/template.go index 20ac3c9bf4..75df0d99e4 100644 --- a/contrib/apparmor/template.go +++ b/contrib/apparmor/template.go @@ -77,6 +77,7 @@ profile {{.Name}} flags=(attach_disconnected,mediate_deleted) { deny /sys/fs/c[^g]*/** wklx, deny /sys/fs/cg[^r]*/** wklx, deny /sys/firmware/** rwklx, + deny /sys/devices/virtual/powercap/** rwklx, deny /sys/kernel/security/** rwklx, # allow processes within the container to trace each other, diff --git a/oci/spec.go b/oci/spec.go index 9c3d7d3b3b..b33ec19530 100644 --- a/oci/spec.go +++ b/oci/spec.go @@ -193,6 +193,7 @@ func populateDefaultUnixSpec(ctx context.Context, s *Spec, id string) error { "/proc/timer_stats", "/proc/sched_debug", "/sys/firmware", + "/sys/devices/virtual/powercap", "/proc/scsi", }, ReadonlyPaths: []string{