Skip to content

rustup use of sudo is suprising, insecure, infuriating #37922

Closed
@mikedilger

Description

@mikedilger

As my normal user, I ran the curl/rustup command shown on the downloads page. It ran, and returned to the prompt of my normal user. I expected the install to go under $HOME/.cargo as it has in the past. However, in the process, it escalated privileges and installed as root under /usr/local... without my knowledge and without my permission. I was flabbergasted.

sudo caches my credentials so I see now how this has happened. However, as the system administrator, I maintain the expectation that commands that I run as a normal user cannot corruptmodify system directories. This trust was breached.

Scripts should not sudo on a users behalf.

I love the rust language. But I've just been hackedsuprised by this script and as a result I've lost trust in all forms of rustup (until I can tell them apart). I will only install from tgz from now on for now.

Please fix for others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions