Skip to content

Commit a72ef1c

Browse files
authored
fix(k3s): Add AppArmor rule for proc/thread-self/attr to allow containerd exec profiling (#63)
* fix(k3s): Add AppArmor rule for proc/thread-self/attr to allow containerd exec profiling Without /proc/thread-self/attr/** rw, containerd cannot write to /proc/thread-self/attr/apparmor/exec when applying AppArmor profiles to container exec processes, causing OCI runtime exec failures. * fix(k3s): Narrow AppArmor attr path to apparmor subtree for least-privilege Scope /proc/thread-self/attr/** down to /proc/thread-self/attr/apparmor/** to avoid exposing SELinux and other LSM attribute files unnecessarily. Add inline comment explaining why rw access is required on this path.
1 parent e2520d3 commit a72ef1c

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.3.7] - 2026-03-21
11+
12+
### Fixed
13+
14+
- Added AppArmor rule `/proc/thread-self/attr/** rw` to k3s security profile; required for containerd to apply AppArmor profiles to container exec processes (`apparmor failed to apply profile: write /proc/thread-self/attr/apparmor/exec: operation not permitted`)
15+
1016
## [1.3.6] - 2026-03-21
1117

1218
### Fixed

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
namespace: arillso
33
name: container
4-
version: 1.3.6
4+
version: 1.3.7
55
readme: README.md
66

77
authors:

roles/k3s/tasks/security.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
# Process and system info (broad /proc/** needed for containerd/kubelet)
174174
/proc/** r,
175175
/proc/thread-self/fd/** rw,
176+
/proc/thread-self/attr/apparmor/** rw, # containerd reads/writes AppArmor exec profile via this path
176177
/proc/sys/fs/pipe-max-size r,
177178
/etc/machine-id r,
178179
/sys/devices/virtual/dmi/id/product_uuid r,

0 commit comments

Comments
 (0)