Red Hat Bugzilla – Bug 607352
saves user passwords/passphrases to a world-readable file
Last modified: 2014-03-16 23:23:59 EDT
Description of problem:
NM-openswan saves user passwords/passphrases to a world-readable file in /etc/ipsec.d.
1) it shouldn't be writing user connections to the global store
2) it certainly shouldn't be saving passphrases that are set to 'ask every time'
3) nor should it be saving them to a world-writable, plaintext file
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. set up a connection
2. look in /etc/ipsec.d
make that 'world-readable' in #3 above.
Built a new version of NetworkManager-openswan (NetworkManager-openswan-0.8.0-2.20100411git.fc14) to address this issue.
No. Putting them on the commandline where anyone (even unpriveleged people!) can get them from the process treee is probably worse.
Furthermore, this build:
- still saves the user's config to the filesystem
- still saves some of the secrets to the filesystem
(In reply to comment #4)
> Furthermore, this build:
> - still saves the user's config to the filesystem
> - still saves some of the secrets to the filesystem
Only sensitive user information is "user password", that is not being stored there now. Other information in the conf file and secret file is not really user information, but global information as ipsec works at system level.
(In reply to comment #3)
> No. Putting them on the commandline where anyone (even unpriveleged people!)
> can get them from the process treee is probably worse.
There are only 2 ways in Openswan to read the user password:
1. Writing it to a secret file, and then reading it, as it as done before.
2. Passing the user password as an argument to "ipsec whack", that is being done in the current version.
Openswan does not read configuration from standard input currently.
(In reply to comment #5)
> (In reply to comment #4)
> > Furthermore, this build:
> > - still saves the user's config to the filesystem
> > - still saves some of the secrets to the filesystem
> Only sensitive user information is "user password", that is not being stored
> there now. Other information in the conf file and secret file is not really
> user information, but global information as ipsec works at system level.
Sure, the connection is global once it's activated. But it's a user's setting, and any secrets (some of which you're writing, such as the connection's PSK) should remain only 1) in memory 2) encrypted. What you have now is neither... it's essentially violating why it would be saved in the user's keyring.
(In reply to comment #6)
> There are only 2 ways in Openswan to read the user password:
> 1. Writing it to a secret file, and then reading it, as it as done before.
> 2. Passing the user password as an argument to "ipsec whack", that is being
> done in the current version.
> Openswan does not read configuration from standard input currently.
Then that needs to be fixed. Passing passwords on the commandline is a security 101 no-no.
I have made a new build of NetworkManager-openswan, and it does not write to command line now, but now it writes to the secret file (600 permission) again. However, these files are removed after VPN connection is terminated.
That's missing the point. They *should not be written*, period.
Would it be possible to point openswan to /dev/stdin, and pipe the config file to it that way?
As per discussions with Bill, I have made changes to NetworkManager-openswan, and the latest build is http://koji.fedoraproject.org/koji/buildinfo?buildID=183505 . Any feedback is appreciated.
Looks much better. You probably want to future-proof it for multiple VPN connections by not using a hardcoded filename, but NM doesn't support multiple VPNs yet, so it's not a huge priority.
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '13'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 13's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 13 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.