Commit 789cda2f089b3cd3c8c4ca387f023a36f7f1738a only controls the
behavior of unprivileged user namespace mediation.

With the unprivileged_userns profile loaded, when a user namespace is
created by an unprivileged unconfined application the task will be
transitioned into the unprivileged_userns profile. The
unprivileged_userns profile will then deny privileged operations
capability, mount etc.

Without the unprivileged_userns profile loaded, the creation of the user
namespace will be denied.

Through experimentation we have learned that many applications behave
better (handle the errors better, eg. qtwebkit will handle the error and
fallback to using a sandbox without usernamespaces while without the
profile it crashes) with the unprivileged_userns loaded. So that has
become the default behavior.

You can experiment with changing the behavior by manually unloading the
unprivileged_userns profile using

  sudo apparmor_parser -R /etc/apparmor.d/unprivileged_userns

nsjail will likely require a profile to work, please see
https://discourse.ubuntu.com/t/noble-numbat-release-
notes/39890#unprivileged-user-namespace-restrictions-15

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apparmor in Ubuntu.
https://bugs.launchpad.net/bugs/2063976

Title:
  Apparmor breaking nsjail in AOSP

Status in apparmor package in Ubuntu:
  New

Bug description:
  Build sandboxing in AOSP is broken after updating to 24.04 with the
  following denials:

  [  182.439078] audit: type=1400 audit(1714265880.641:449): apparmor="AUDIT" 
operation="userns_create" class="namespace" info="Userns create - transitioning 
profile" profile="unconfined" pid=8514 comm="nsjail" requested="userns_create" 
target="unprivileged_userns"
  [  182.439945] audit: type=1400 audit(1714265880.642:450): apparmor="DENIED" 
operation="capable" class="cap" profile="unprivileged_userns" pid=8515 
comm="nsjail" capability=6  capname="setgid"
  [  182.439972] audit: type=1400 audit(1714265880.642:451): apparmor="DENIED" 
operation="mount" class="mount" info="failed mntpnt match" error=-13 
profile="unprivileged_userns" name="/" pid=8515 comm="nsjail" flags="rw, 
rprivate"

  This seems to come from the following change earlier this year:
  
https://gitlab.com/apparmor/apparmor/-/commit/789cda2f089b3cd3c8c4ca387f023a36f7f1738a

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2063976/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to