Brian, sorry, the bug is open now. Thanks

** Information type changed from Private Security to Public Security

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to adsys in Ubuntu.
https://bugs.launchpad.net/bugs/1961458

Title:
  chown of script directory and contents

Status in adsys package in Ubuntu:
  Fix Released
Status in adsys source package in Focal:
  New

Bug description:
  [Impact]
  Potential security issues in ApplyPolicy due to race when scripts are enabled.

  [Test Plan]
  1. Attach your machine to Ubuntu Advantage to get script support.
  2. Add a script to one GPO for user login/logout
  3. Login as an user, starting a new user session (no session should be 
currently running for that given user).
  4. Check the permissions are following what is described from the discussion 
below.

  [Where problems could occur]
  Script support was added recently, and it needs Ubuntu Advantage enablement 
to be activated. However, to this day, there is still no official 
ubuntu-advantage-desktop-daemon packaged on focal.

  ----

  ./internal/policies/scripts/scripts.go ApplyPolicy() unsafe owner
  changes:

  Changing the scripts directory owner allows any user processes to create
  symbolic links within, and then they can take ownership of any file on
  writable mounts.

  If the files must be owned by the user, the best way is to switch to the
  user's uid before creating the files. fchown(2) of the file descriptor
  before closing it should also work.

  I lose track of what's happening around the "Running machine startup
  scripts" -- it looks to me like adsys is also *executing* the scripts that
  were moments ago given to the user to modify. It is not safe for root to run
  user-owned files.

  Does the user *have* to own the directory and scripts?

  Thanks

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


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

Reply via email to