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

Security considerations in installation method #442

Open
NoraCodes opened this issue May 11, 2016 · 11 comments
Open

Security considerations in installation method #442

NoraCodes opened this issue May 11, 2016 · 11 comments

Comments

@NoraCodes
Copy link

Currently, out of all Linux distributions, only Arch Linux has a method for installing rustup via a package manager, and the recommended method is to use a copy/pasted curl | bash. There has been some discussion as to whether this is a security problem. I contend that it is, because even with an SSL-encrypted website as the source for the copy/paste, a quick-thinking social engineer in physical proximity to a target could cause havoc by running Moxie's SSLStrip, hijacking the redirect, and changing the URL being curl'd, effectively giving arbitrary code not only execution but execution with user trust.

I would like to gauge interest in creating self-installer packages for more mainstream distributions such as Debian (Ubuntu, Mint, etc), Fedora/Red Hat, and SUSE - that is, either amending rustup so that it can update itself in a safe and transactional way, or creating a rustup-up (so to speak) that is capable of doing so, and packaging that installer. This would allow inclusion in traceable installation infrastructure, which would solve the security issue, and allow the project to avoid the apparent stagnation that Arduino and other rapidly moving projects have faced.

If there is interest in this proposal, I'd be more than happy to work on it this summer; my school semester ends soon, and I would love to put my time to good use.

@brson
Copy link
Contributor

brson commented May 12, 2016

@SilverWingedSeraph Yes, I would love to have rustup packages for common formats!

Instead of teaching rustup self-updates though to interact with the package manager, I'd rather just disable self-updates when packaged, and let the package manager deal with it the normal way. Does that sound right to you?

@NoraCodes
Copy link
Author

NoraCodes commented May 12, 2016

I'd be all for that - I was only suggesting other solutions because people
on Reddit didn't like that I didn't when I originally suggested it.

@Diggsey
Copy link
Contributor

Diggsey commented May 12, 2016

It's not a question of liking it, simply that package managers will lag behind latest version, especially given the given the frequency of updates right now.

@jonhoo
Copy link
Contributor

jonhoo commented May 13, 2016

FWIW the Arch Linux package is here, and the relatively straight-forward build script is here. I'm the current maintainer.

@marmoute
Copy link

marmoute commented Dec 12, 2019

The lack of debian package is bummer. Especially since rustup seems to refuse to install in parallel of the official package. Since rustup seems the only way to get rustfmt this is problematic.

@kinnison
Copy link
Contributor

@marmoute How do you mean by "refuse"? If you mean that rustup-init is unhappy if rustc or cargo is already on the path, then it tells you how to ask it to install regardless (pass -y)

@marmoute
Copy link

Well it says "error: rustup cannot be installed alongside Rust. Please uninstall first" Okay, I can overwrite this, but I have ø idea about "is this reasonable override?"

@kinnison
Copy link
Contributor

I think the error message could indeed be improved.

I have a patch which changes it to:

error: it looks like you have an existing installation of Rust at:
error: /usr/bin
error: rustup should not be installed alongside Rust. Please uninstall your existing Rust first.
error: Otherwise you may have confusion unless you are careful with your PATH
error: If you are sure that you want both rustup and your already installed Rust
error: then please restart the installation and pass `-y' to bypass this check.

Would that have made it clearer what you could do?

kinnison added a commit to kinnison/rustup that referenced this issue Dec 13, 2019
Because some people install rustc/cargo from their distro and then
try and install rustup, they can get confused/worried by the error
message given.  This attempts to ameliorate the situation by being
a little clearer about what might go wrong.

Fixes: rust-lang#442

Signed-off-by: Daniel Silverstone <[email protected]>
kinnison added a commit to kinnison/rustup that referenced this issue Dec 13, 2019
Because some people install rustc/cargo from their distro and then
try and install rustup, they can get confused/worried by the error
message given.  This attempts to ameliorate the situation by being
a little clearer about what might go wrong.

Fixes: rust-lang#442

Signed-off-by: Daniel Silverstone <[email protected]>
@kinnison
Copy link
Contributor

(Note, I accidentally marked that commit as closing this issue, it won't, sorry about the noise)

@marmoute
Copy link

That much clearer, thanks!
I'll got for -y (because all I need is yo^W rustfmt

@workingjubilee
Copy link
Member

@rustbot label: +O-linux

@rustbot rustbot added the O-linux Linux related label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants