Bug 987471 - OCSP_check.sh doesn't check openssl ocsp output correctly
Summary: OCSP_check.sh doesn't check openssl ocsp output correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openvpn
Version: 19
Hardware: All
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-23 12:51 UTC by Hubert Kario
Modified: 2015-01-09 21:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-09 21:15:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Hubert Kario 2013-07-23 12:51:35 UTC
Description of problem:
the contrib/OCSP_check/OCSP_check.sh doesn't check for all possible failures in openssl ocsp command output

Version-Release number of selected component (if applicable):
openvpn-2.3.2-1.fc18.x86_64
openvpn-2.3.2-1.fc19.x86_64
openvpn-2.3.2-1.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1. MitM ocsp responder, mangle signature in response (for example by changing REVOKED status in response to GOOD
2. run script

Actual results:
OCSP_check.sh script accepts responses as authoritative

Expected results:
OCSP_check.sh exit status should be non zero in case of any OCSP errors during checking

Additional info:

example openssl ocsp output in case of wrong signature:

140624443094856:error:04091077:rsa routines:INT_RSA_VERIFY:wrong signature length:rsa_sign.c:159:
140624443094856:error:0D0C5006:asn1 encoding routines:ASN1_item_verify:EVP lib:a_verify.c:184:
140624443094856:error:27069075:OCSP routines:OCSP_basic_verify:signature failure:ocsp_vfy.c:98:
0x1212: good
        This Update: Jul 23 11:41:21 2013 GMT
        Next Update: Jul 23 11:41:21 2014 GMT

So the script should also check for presence of "Response verify OK".

Comment 1 David Sommerseth 2013-07-23 13:00:24 UTC
Please file this bug in the upstream bug tracker.

https://community.openvpn.net/openvpn  (you need to be registered to add new bugs)

Or send a patch with a suggestion for a fix to openvpn-devel.net (need to be subscribed)

I at least consider OpenVPN bugs in this Bugzilla to be related to packaging issues on Fedora/RHEL or Fedora/RHEL specific issues.  This issue is clearly something which should be solved upstream.

Comment 2 Fedora End Of Life 2013-12-21 14:22:42 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 '18'.

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 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

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.

Comment 3 Hubert Kario 2014-01-03 11:32:25 UTC
Issue still present in Fedora 19.

openvpn-2.3.2-4.fc19.x86_64

Comment 4 David Sommerseth 2014-01-03 14:20:22 UTC
(In reply to Hubert Kario from comment #3)
> Issue still present in Fedora 19.
> 
> openvpn-2.3.2-4.fc19.x86_64

Closing this one, as this isn't a Fedora related bug.  This needs to be fixed upstream.  Please register and file a bug here:  https://community.openvpn.net/openvpn

When upstream fixes it and releases a new version, Fedora (and other distros) can easily pick it up.

Other than that, please see my comment #1.

Comment 5 Hubert Kario 2014-01-03 14:36:41 UTC
(In reply to David Sommerseth from comment #4)
> (In reply to Hubert Kario from comment #3)
> > Issue still present in Fedora 19.
> > 
> > openvpn-2.3.2-4.fc19.x86_64
> 
> Closing this one, as this isn't a Fedora related bug.  This needs to be
> fixed upstream.  Please register and file a bug here: 
> https://community.openvpn.net/openvpn
> 
> When upstream fixes it and releases a new version, Fedora (and other
> distros) can easily pick it up.
> 
> Other than that, please see my comment #1.

I know this is an upstream bug, I don't expect you to fix it. I don't have any problem with your position from comment #1. That being said, I still want a tracking bug in Fedora to have it on the radar.

Unfortunately I didn't have time to prepare a fix and report it upstream because of unpredicted RHEL-related work. I will do this in coming month or two.

Comment 6 Hubert Kario 2014-09-23 12:36:55 UTC
Reported upstream together with patches to fix the issues:
https://community.openvpn.net/openvpn/ticket/450#ticket

Comment 7 Fedora Admin XMLRPC Client 2014-11-10 15:37:14 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora Admin XMLRPC Client 2014-11-10 15:51:25 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Fedora End Of Life 2015-01-09 19:03:57 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

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.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

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.

Comment 10 David Sommerseth 2015-01-09 21:15:05 UTC
Fixed upstream.

$ git tag --contains 27ab61cec7cefa645a1e02834e032eef12907598
v2.3.5
v2.3.6

Fedora 19 has openvpn-2.3.6-1.fc19 now, and releases for F20 and F21 have been released as well.

https://admin.fedoraproject.org/updates/FEDORA-2014-16273/pkcs11-helper-1.11-3.fc20,openvpn-2.3.6-1.fc20
https://admin.fedoraproject.org/updates/FEDORA-2014-16060/openvpn-2.3.6-1.fc21


-----------------------------------------------------------------------------

commit 27ab61cec7cefa645a1e02834e032eef12907598
Author: Hubert Kario <hkario>
Date:   Fri Sep 26 12:24:01 2014 +0200

    ocsp_check - double check if ocsp didn't report any errors in execution
    
    in case the reposnses are too old, ocsp tool can return text like this:
    
    Response verify OK
    ca/cert.pem: WARNING: Status times invalid.
    139990703290240:error:2707307D:OCSP routines:OCSP_check_validity:status
    expired:ocsp_cl.c:358:
    good
            This Update: Sep 21 12:12:48 2014 GMT
            Next Update: Sep 22 12:12:48 2014 GMT
    
    light change in buffering can cause "verify OK" and "ca/cert.pem: good"
    to be placed in a way that matching will be valid
    Acked-by: Steffan Karger <steffan.karger>
    Message-Id: <1411727041-11884-2-git-send-email-hkario>
    URL: http://article.gmane.org/gmane.network.openvpn.devel/9055
    
    Signed-off-by: Gert Doering <gert.de>
    (cherry picked from commit 51390f4de4f02edf377d55a7ef108798d2d8dc88)

-----------------------------------------------------------------------------


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