Bug 881411 - elinks/links: does not properly verify SSL certificates [fedora-all]
elinks/links: does not properly verify SSL certificates [fedora-all]
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: elinks (Show other bugs)
18
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kamil Dudka
Fedora Extras Quality Assurance
: Security, SecurityTracking
Depends On: 910815
Blocks: 881399
  Show dependency treegraph
 
Reported: 2012-11-28 15:55 EST by Vincent Danen
Modified: 2014-12-09 07:27 EST (History)
3 users (show)

See Also:
Fixed In Version: elinks-0.12-0.33.pre6.fc18
Doc Type: Release Note
Doc Text:
Story Points: ---
Clone Of:
: 910815 (view as bug list)
Environment:
Last Closed: 2013-10-13 15:51:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
proposed fix (1.95 KB, patch)
2013-09-18 07:53 EDT, Kamil Dudka
no flags Details | Diff
proposed fix V2 (1.97 KB, patch)
2013-09-19 12:08 EDT, Kamil Dudka
kdudka: review?
Details | Diff

  None (edit)
Description Vincent Danen 2012-11-28 15:55:32 EST
This is an automatically created tracking bug!  It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.

For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.

For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs

When creating a Bodhi update request, please use the bodhi submission link
noted in the next comment(s).  This will include the bug IDs of this
tracking bug as well as the relevant top-level CVE bugs.

Please also mention the CVE IDs being fixed in the RPM changelog and the
Bodhi notes field when available.

Please note: this issue affects multiple supported versions of Fedora.
Only one tracking bug has been filed; please ensure that it is only closed
when all affected versions are fixed.

[bug automatically created by: add-tracking-bugs]
Comment 1 Vincent Danen 2012-11-28 15:55:39 EST
Please use the following update submission link to create the Bodhi
request for this issue as it contains the top-level parent bug(s) as well
as this tracking bug.  This will ensure that all associated bugs get
updated when new packages are pushed to stable.

Please also ensure that the "Close bugs when update is stable" option
remains checked.

Bodhi update submission link:
https://admin.fedoraproject.org/updates/new/?type_=security&bugs=881399,881411
Comment 2 Kamil Dudka 2012-11-29 05:39:05 EST
This is similar to bug 873262.  Fedora elinks is built against nss_compat_ossl, so this vulnerability does not apply.  I propose to close this out.
Comment 3 Vincent Danen 2012-11-30 12:33:13 EST
But the problem exists, so how can you say it doesn't apply?  I reproduced it, using steps from the parent bug.
Comment 4 Kamil Dudka 2012-12-03 08:49:46 EST
Sorry, the above statement is incorrect.  Fedora elinks suffers from this issue.
Comment 5 Kamil Dudka 2012-12-03 10:59:20 EST
This seems to be the upstream fix:

http://repo.or.cz/w/elinks.git/commitdiff/0c3f3e09
Comment 6 Kamil Dudka 2012-12-03 11:14:26 EST
nss_compat_ossl does not seem to be ready for the upstream solutioin.  A possible hotfix would be to bypass nss_compat_ossl and call SSL_SetURL() from NSS directly.  The NSS default cert verification callback should then take care of the hostname validation.  But first I need to make sure that the NSS default cert verification callback is actually used by ELinks.
Comment 7 Kamil Dudka 2013-02-13 11:01:55 EST
(In reply to comment #6)
> nss_compat_ossl does not seem to be ready for the upstream solutioin.  A
> possible hotfix would be to bypass nss_compat_ossl and call SSL_SetURL()
> from NSS directly.  The NSS default cert verification callback should then
> take care of the hostname validation.  But first I need to make sure that
> the NSS default cert verification callback is actually used by ELinks.

I have checked the sources of nss_compat_ossl and it explicitly ignores the hostname mismatch error:

    err = PORT_GetError();

    switch (err) {
    case SEC_ERROR_CERT_VALID:
    case SSL_ERROR_BAD_CERT_DOMAIN: /* We don't set set the hostname so we can
                                     * safely ignore this. In OpenSSL the
                                     * caller is responsible. */
        err = X509_V_OK;
        break;

Consequently, calling SSL_SetURL() has no effect anyway.
Comment 8 Fedora End Of Life 2013-07-04 02:42:25 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 '17'.

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 17'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 17 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 17'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 9 Kamil Dudka 2013-09-18 07:53:41 EDT
Created attachment 799344 [details]
proposed fix

See bug #910815 for the related discussion about possible solutions.
Comment 10 Kamil Dudka 2013-09-18 08:54:02 EDT
fixed in elinks-0.12-0.37.pre6.fc21
Comment 11 Kamil Dudka 2013-09-19 12:08:33 EDT
Created attachment 800033 [details]
proposed fix V2
Comment 12 Fedora Update System 2013-10-04 10:56:32 EDT
elinks-0.12-0.36.pre6.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/elinks-0.12-0.36.pre6.fc20
Comment 13 Fedora Update System 2013-10-04 10:56:51 EDT
elinks-0.12-0.33.pre6.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/elinks-0.12-0.33.pre6.fc18
Comment 14 Fedora Update System 2013-10-04 10:57:07 EDT
elinks-0.12-0.35.pre6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/elinks-0.12-0.35.pre6.fc19
Comment 15 Fedora Update System 2013-10-04 21:43:54 EDT
Package elinks-0.12-0.36.pre6.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing elinks-0.12-0.36.pre6.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18323/elinks-0.12-0.36.pre6.fc20
then log in and leave karma (feedback).
Comment 16 Fedora Update System 2013-10-13 15:51:19 EDT
elinks-0.12-0.36.pre6.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2013-10-14 03:02:50 EDT
elinks-0.12-0.33.pre6.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2013-10-14 03:08:27 EDT
elinks-0.12-0.35.pre6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 19 Fedora Update System 2013-10-14 13:12:15 EDT
elinks-0.12-0.35.pre6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 20 Fedora Update System 2013-10-14 13:20:26 EDT
elinks-0.12-0.33.pre6.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 21 Jakub Jelinek 2014-05-20 05:36:25 EDT
Note this change caused #1099423.
Comment 22 Vincent Danen 2014-05-20 08:30:55 EDT
Just to provide more context, this patch is causing https://gcc.gnu.org from working (when it works with firefox, wget, etc.).  So there is something definitely wrong with this patch, as noted in bug #1099423.  Instead of re-opening this bug, use the other to fix and I'll note in the top-level bug that this patch caused a problem.
Comment 23 Kamil Dudka 2014-12-09 07:27:50 EST
As far as I know, there is nothing wrong with this patch.  Bug #1099423 iss a problem in nss_compat_ossl, which broke due to NSS returning failures when SSLv2 is enabled.

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