Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict Windows installation directory permission based on installation mode #873

Closed
wants to merge 2 commits into from

Conversation

marcoesters
Copy link
Contributor

@marcoesters marcoesters commented Oct 4, 2024

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 ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Oct 4, 2024
@marcoesters marcoesters changed the title Justme permissions Restrict Windows installation directory permission based on installation mode Oct 4, 2024
@marcoesters marcoesters marked this pull request as ready for review October 4, 2024 23:03
@marcoesters marcoesters requested a review from a team as a code owner October 4, 2024 23:03
@marcoesters marcoesters marked this pull request as draft October 7, 2024 00:43
@marcoesters
Copy link
Contributor Author

(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.

@marcoesters marcoesters closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Running Anaconda 2024.06-1 installer on Windows for "Just Me" messes with installation folder permissions
2 participants