diff --git a/parser/apparmor.d.pod b/parser/apparmor.d.pod index d13a46371..6d86e81de 100644 --- a/parser/apparmor.d.pod +++ b/parser/apparmor.d.pod @@ -125,7 +125,7 @@ B = [ ( I | I ',' | I ) B = ( I | I ) [ '\r' ] '\n' -B = ( I | I | I | I | I | I | I | I | I | I | I ) +B = ( I | I | I | I | I | I | I | I | I | I | I | I | I) B = ( I | I | I ) @@ -192,6 +192,16 @@ B = 'label' '=' '(' '"' I '"' | I ')' B = I +B = [ I ] 'userns' [ I ] + +B = ( 'create' ) + +B = [ I ] 'io_uring' [ I [ I ] + +B = ( 'sqpoll' | 'override_creds' ) + +B = 'label' '=' '(' '"' I '"' | I ')' + B = [ I ] pivot_root [ oldroot=I ] [ I ] [ '-E' I ] B = I @@ -1138,6 +1148,89 @@ Example AppArmor Message Queue rules: # Allow create permission for a SYSV queue of label foo mqueue create label=foo 123, +=head2 User Namespace Rules + +User namespaces are part of many sandboxing and containerization +solutions. They provide a way for a non-system root process to be +root within the container. Unfortunately this opens up attack surface +in the kernel and has been part of several exploit chains. As such +AppArmor can be used to restrict the creation of user namespaces to +select processes. + +User namespace permission are implied when a rule does not explicitly +state an access list. The rule becomes more restrictive as further +information is specified. + +Note: user namespace creation may be restricted so that it is not +available to unprivieged unconfined processes. If this is the case any +process trying to create user namespaces will require a profile that +allows the necessary permissions. + +=over 4 + +=item B + +Allow creation of user namespaces. + +=back + +Example userns rules: + +=over 4 + + # Allow all userns perms + userns, + + # Allow creation of a userns + userns create, + +=back + +=head2 IO_URing Rules + +AppArmor supports mediation of the new Linux high speed IO interface. +There is limited mediation at this time to just a few permissions at +the moment. + +IO Uring permission are implied when a rule does not explicitly state +an access list. The rule becomes more restrictive as further +information is specified. + +Note: io_uring access may be restricted so that it is not available to +unprivileged unconfined processes. If this is the case any process +trying to use io_uring will require a profile that allows the +necessary io_uring permissions. + +=over 4 + +=item B + +All the task confined by the profile to spawn a io_uring polling +thread. + +=item B + +Grants the task confined by the profile to override (change) its +credentials to the specified label, when executing an io_uring +operation. + +=back + +Example IO_URING rules: + +=over 4 + + # Allow io_uring operations + io_ring, + + # Allow creation of a polling thread + io_uring sqpoll, + + # Allow task to override credentials during io_uring operation + io_uring override_creds label=new_creds, + +=back + =head2 Pivot Root Rules AppArmor mediates changing of the root filesystem through the pivot_root(2)