Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 607352 - saves user passwords/passphrases to a world-readable file
saves user passwords/passphrases to a world-readable file
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: NetworkManager-openswan (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Avesh Agarwal
Fedora Extras Quality Assurance
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-23 17:28 EDT by Bill Nottingham
Modified: 2014-03-16 23:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 609595 (view as bug list)
Environment:
Last Closed: 2011-06-27 14:50:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Nottingham 2010-06-23 17:28:23 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):

0.8.0-1.20100411git

How reproducible:

100%

Steps to Reproduce:
1. set up a connection
2. look in /etc/ipsec.d
 
Actual results:

Stuff.

Expected results:

No stuff.
Comment 1 Bill Nottingham 2010-06-23 17:28:45 EDT
make that 'world-readable' in #3 above.
Comment 2 Avesh Agarwal 2010-07-08 14:10:12 EDT
Built a new version of NetworkManager-openswan (NetworkManager-openswan-0.8.0-2.20100411git.fc14) to address this issue.
Comment 3 Bill Nottingham 2010-07-08 14:34:50 EDT
No. Putting them on the commandline where anyone (even unpriveleged people!) can get them from the process treee is probably worse.
Comment 4 Bill Nottingham 2010-07-08 14:39:28 EDT
Furthermore, this build:

- still saves the user's config to the filesystem
- still saves some of the secrets to the filesystem
Comment 5 Avesh Agarwal 2010-07-08 14:46:33 EDT
 (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.
Comment 6 Avesh Agarwal 2010-07-08 14:52:19 EDT
(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.
Comment 7 Bill Nottingham 2010-07-08 15:07:44 EDT
(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.
Comment 8 Avesh Agarwal 2010-07-08 16:36:25 EDT
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.
Comment 9 Bill Nottingham 2010-07-08 16:40:38 EDT
That's missing the point. They *should not be written*, period.
Comment 10 Bill Nottingham 2010-07-08 17:33:46 EDT
Would it be possible to point openswan to /dev/stdin, and pipe the config file to it that way?
Comment 11 Avesh Agarwal 2010-07-13 19:24:35 EDT
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.
Comment 12 Bill Nottingham 2010-07-14 12:25:28 EDT
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.
Comment 13 Bug Zapper 2011-06-01 11:45:25 EDT
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 14 Bug Zapper 2011-06-27 14:50:08 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.