Bug 1175481

Summary: MD5 certs prevent openvpn connection
Product: [Fedora] Fedora Reporter: Ilkka Tengvall <ikke>
Component: NetworkManager-openvpnAssignee: Dan Williams <dcbw>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: bugzilla, choeger, dcbw, huzaifas, psimerda, steve, stmagna, thaller, tmraz, zoltank
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-23 07:48:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Ilkka Tengvall 2014-12-17 20:02:23 UTC
Description of problem:

Openvpn in fedora is patched to disallow using of MD5 certs. For one to go around the patch, there is an environment variable to be set:  OPENSSL_ENABLE_MD5_VERIFY=1


Version-Release number of selected component (if applicable):


How reproducible:

every time, if server uses MD5 certs.

Steps to Reproduce:
1. configure openvpn against host that uses MD5 certs
2. Modify systemd/system/NetworkManager.service to have the env variable
3. start tunnel

Actual results:
openvpn fails to verify certs

Expected results:
openvpn should verify the certs and work

Additional info:

If I do tunnel with "sudo OPENSSL_ENABLE_MD5_VERIFY=1 openvpn tunnel.ovpn" it works
If I do it with nmapplet, it won't.

I verified from process info, that nm-gui also sets the OPENSSL_ENABLE_MD5_VERIFY for both nm process and openvpn process. Tunnel still won't work.

Comment 1 Ilkka Tengvall 2014-12-18 13:45:43 UTC
there is comment about secure_getenv possibly having effect on this:


Comment 2 David Mansfield 2014-12-18 14:01:02 UTC
To clarify comment#1, myself and others have verified that the environment variable is being set properly (via /proc/<pid>/environ) however the workaround is not being activated.

Additionally, forcing the workaround by patching openssl DOES work.

Also, the same workaround works for other applications or when launching openvpn standalone.

So secure_getenv must be not returning anything.  It returns NULL when (from the manpage):

       *  the process's effective user ID did not match its real  user  ID  or
          the  process's  effective  group  ID did not match its real group ID
          (typically this is the result of executing  a  set-user-ID  or  set-
          group-ID program);

       *  the effective capability bit was set on the executable file; or

       *  the process has a nonempty permitted capability set.

So one of these must be happening when run under NetworkManager (and not from command line usage). Anyone in NM camp know about these three possibilities?

Comment 3 Steve 2014-12-21 15:10:39 UTC
+1. I ran into exactly the same issue and attempted exactly the same troubleshooting steps as Ilkka Tengvall.  
Our system engineers are promising to regenerate certificates with SHA256 - but I don't know when they will get around to do so.

Comment 4 David Mansfield 2014-12-22 19:02:09 UTC
bug#1174915 is a duplicate but provides the correct fix and fuller analysis of the problem.

This should be marked dup of that and the NetworkManager / selinux policy team should address this issue please.

Comment 5 Ilkka Tengvall 2014-12-23 07:47:34 UTC
Yes, we truly have lousy communications within the company, Jarkko and I are collegues :) If it works for Jarkko, it works for me. We can close this ticket.

Comment 6 Ilkka Tengvall 2014-12-23 07:48:14 UTC

*** This bug has been marked as a duplicate of bug 1174915 ***