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

Cannot use ftp protocol in install.sh for downloading non-existent packages in secure environments #585

Closed
singleterry opened this issue Sep 23, 2018 · 9 comments

Comments

@singleterry
Copy link

  • OpenCoarrays Version: <2.2.0>
  • Fortran Compiler: <gcc 7.3.0>
  • C compiler used for building lib: <ggc 7.3.0>
  • Installation method: <install.sh>
  • Output of uname -a: Linux hze.larc.nasa.gov 2.6.32-431.11.2.el6.x86_64 tests dis_transpose: test passed  #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  • MPI library being used: <3.2>
  • Machine architecture and number of physical cores: not relevant
  • Version of CMake: <3.4.0>

When using the install.sh script, the prerequisites downloaded with the ftp protocol will fail in secure environments. The protocol used to download those files should be changed.

@zbeekman
Copy link
Collaborator

zbeekman commented Oct 5, 2018

@singleterry I'm not sure what you mean by "secure" environments. Can you please give some more details, preferably including some output with the error message.

Did curl AND wget fail for you?

@singleterry
Copy link
Author

singleterry commented Oct 9, 2018 via email

@zbeekman
Copy link
Collaborator

zbeekman commented Oct 9, 2018

Yes, email replies get forwarded. 🙂

Thanks for clarification. We certainly should review all of our download URLs and favor encrypted variants wherever possible via https and, if/where needed, sftp. Sometimes, however, people are on systems lacking CA certs, and curl or wget fail with SSL errors, but I’d rather someone not be able to install OC, than be the vector used to compromise a machine through a MITM software supply chain attack.

I’ll assign this issue to myself to ensure I review the urls and update to use encryption wherever possible.

@singleterry
Copy link
Author

singleterry commented Oct 9, 2018 via email

@rouson
Copy link
Member

rouson commented Oct 14, 2018

@singleterry Thanks for submitting this.

@zbeekman The URL for each package the installer knows how to install is listed here. The only ones that use the ftp protocol are the ones on the GNU ftp server ftp.gnu.org. If there's a reliable mirror that uses something other than ftp, the only change that is needed is to change each corresponding URL in the aforementioned file. Most likely, everything will work from there.

In case it helps, if you ever want to see what URL the installer will use for a given package, pass the package name with the-U argument:

$ ./install.sh -U gcc
ftp://ftp.gnu.org:/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz

@rouson
Copy link
Member

rouson commented Oct 14, 2018

@zbeekman
Copy link
Collaborator

zbeekman commented Oct 14, 2018

@rouson I think we want: https://ftpmirror.gnu.org/gcc/gcc-8.2.0/gcc-8.2.0.tar.xz

I think this redirects to a suitable mirror that is closest to the user (and has https/ssl encryption) so it should be fast.

@rouson
Copy link
Member

rouson commented Oct 14, 2018

I'll test the switch and push a fix.

@ghost ghost assigned rouson Oct 14, 2018
@ghost ghost added in-progress and removed ready labels Oct 14, 2018
@rouson
Copy link
Member

rouson commented Oct 14, 2018

This is now fixed in PR #594 and will appear in the next release.

@rouson rouson closed this as completed Oct 14, 2018
@ghost ghost removed the in-progress label Oct 14, 2018
rouson referenced this issue Oct 14, 2018
…re-urls

Switch insecure ftp URLs to secure https
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

3 participants