-
|
While playing around with restricted unix domain sockets, I noticed that it seems impossible to restrict access to specific socket files in apparmor. Is this actually intended or am I overlooking something? I could not find any documentation about this, so if anyone can point out more details on this, I would appreciate that. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Ok, I figured out some things: First the stupid stuff that made finding the issue real hard: My test profile included the following line: This is the test profile to reproduce the issue: Since the base abstraction includes the permissions for sockets, it is included everywhere. When removing the ineffectively commented include, sockets are no longer accessible However, socket files are not treated as files by apparmor for some reason, so all sockets can be accessed (for example with If I understand it correctly, there is an upcoming apparmor feature available starting in linux 6.17 that would allow to specify sockets by path and type. https://www.phoronix.com/news/Linux-6.17-AppArmor Update: |
Beta Was this translation helpful? Give feedback.
-
|
After bringing this up on the apparmor mailing list, I can confirm this is indeed the current state of the upstream kernel. @roddhjav I suggest that we add a warning to the project page to inform users about the kernel requirement since distros like Debian or Arch are currently affected by this without any information on their wikis either. |
Beta Was this translation helpful? Give feedback.
-
|
Unix socket path restriction requires kernel version >= 6.17 |
Beta Was this translation helpful? Give feedback.
Unix socket path restriction requires kernel version >= 6.17