conda / constructor

tool for creating installers from conda packages
https://conda.github.io/constructor/
Other
464 stars 167 forks source link

Restrict Windows installation directory permission based on installation mode #873

Closed marcoesters closed 1 month ago

marcoesters commented 1 month ago

Description

The Windows installer restricts permissions for users if the installation was done with administrator privileges. It was reported in #872 that this can create a situation where a JustMe installation restricts write access to the installation directory when UAC_IsAdmin mistakenly thinks the user is an administrator.

Instead of checking for administrative privileges, check whether the installation is an AllUsers installation. Privileges should be elevated at this point anyway and reflects the intent of the user. A JustMe installation should not be able to write into a sensitive directory in the first place since it never requires admin privileges (even though you could always run the installer as administrator to circumvent that).

Closes #872.

Checklist - did you ...

marcoesters commented 1 month ago

(even though you could always run the installer as administrator to circumvent that).

This is exactly the situation that could re-introduce the CVE since we cannot prevent the installer from being executed with admin privileges. I am closing this PR - we need to find a better solution.