+++ This bug was initially created as a clone of Bug #881411 +++ --- Additional comment from Kamil Dudka on 2012-12-03 16:59:20 CET --- This seems to be the upstream fix: http://repo.or.cz/w/elinks.git/commitdiff/0c3f3e09 --- Additional comment from Kamil Dudka on 2012-12-03 17:14:26 CET --- 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. --- Additional comment from Kamil Dudka on 2013-02-13 17:01:55 CET --- (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.
How can one verify the certificate hostname without <openssl/asn1.h>? Will nss_compat_ossl wrap the ASN1 decoder provided by NSS?
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.
Kamil, Looking at the "elink" OpenSSL code used to provide a subject name validity check as described in: Bugzilla Bug #881411 - elinks/links: does not properly verify SSL certificates It appears that they may be hanging on the call "ASN1_STRING_to_UTF8()" call which is NOT provided by "nss_compat_ossl". However, upon a closer review of the "elink" OpenSSL code used to provide a subject name validity check, it appears that there were numerous other calls that are not currently provided by "nss_compat_ossl" including: * V_ASN1_OCTET_STRING * GENERAL_NAMES * X509_STORE_CTX_get_error_depth() * X509_NAME_ENTRY * X509_NAME_get_index_by_NID() * X509_NAME_get_entry() * X509_NAME_ENTRY_get_data() In the initial comment above, you had suggested that a workaround for this issue might be to utilize a direct call to NSS via SSL_SetURL(), but then added that this would not work due to the default error code handler provided by "nss_compat_ossl" (note that it may be reasonable for some applications to allow a subject name validity mismatch). Although not ideal, could it be possibly suggested to use SSL_SetURL() without using the default error code handler provided by "nss_compat_ossl" (e. g. - registry of an alternative error code handler) instead? I realize that this somewhat defeats the purpose of having a compatibility library, but as there is currently no specific timeline on when/if these calls would be supported by "nss_compat_ossl", this may be a more timely solution for the elinks project.
(In reply to Matthew Harmsen from comment #3) > I realize that this somewhat defeats the purpose of having a compatibility > library, but as there is currently no specific timeline on when/if these > calls would be supported by "nss_compat_ossl", this may be a more timely > solution for the elinks project. The problem is that the vast majority of (potential?) clients of nss_compat_ossl need to verify the hostname as elinks does. Are all of them supposed to bypass the compatibility layer and use the NSS API directly in order not to have security issues?
(In reply to Kamil Dudka from comment #4) > (In reply to Matthew Harmsen from comment #3) > > I realize that this somewhat defeats the purpose of having a compatibility > > library, but as there is currently no specific timeline on when/if these > > calls would be supported by "nss_compat_ossl", this may be a more timely > > solution for the elinks project. > > The problem is that the vast majority of (potential?) clients of > nss_compat_ossl need to verify the hostname as elinks does. Are all of them > supposed to bypass the compatibility layer and use the NSS API directly in > order not to have security issues? I think this is impossible to fix until OpenSSL gets its own host name validation function. X509_check_host will be part of the next release, but it won't help until it's actually used by client code. At present, code that reimplements X509_check_host uses difficult-to-predict parts of the OpenSSL ASN.1 and X.509 support routines, and it doesn't make much sense to support all of that in a compatibility wrapper.
Anybody feels like doing a review of attachment #799344 [details]? Thanks in advance!
Hello mharmsen, Could you please fix this soon?
(In reply to pjp from comment #8) > Hello mharmsen, > > Could you please fix this soon? Unfortunately, there are no current plans to address the issues outlined in this bug. As always, we welcome patches! -- Matt
Hello mharmsen, You plan to fix this soon?
This is impossible to fix. nss_compat_ossl is terminally broken and should be retired. Its few reverse dependencies can just use OpenSSL instead.
ELinks is already switched to use OpenSSL in rawhide: http://pkgs.fedoraproject.org/cgit/elinks.git/commit/?id=6e8e7242 In stable Fedora, there is a workaround for this bug: http://pkgs.fedoraproject.org/cgit/elinks.git/commit/?id=8ceec5fa
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. 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 EOL if it remains open with a Fedora 'version' of '23'. 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 23 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.
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 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. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
nss_compat_ossl has been retired.
This was fixed upstream as part of tmux 2.2, with commit 64571368dc19219fc1ef9b6c20034ee143cbed0d.
(In reply to Florian Weimer from comment #21) > This was fixed upstream as part of tmux 2.2, with commit > 64571368dc19219fc1ef9b6c20034ee143cbed0d. It looks like the above comment is misplaced. I see no relation between the above mentioned tmux commit and nss_compat_ossl. Switching the resolution back to WONTFIX...
(In reply to Kamil Dudka from comment #22) > (In reply to Florian Weimer from comment #21) > > This was fixed upstream as part of tmux 2.2, with commit > > 64571368dc19219fc1ef9b6c20034ee143cbed0d. > > It looks like the above comment is misplaced. I see no relation between the > above mentioned tmux commit and nss_compat_ossl. Switching the resolution > back to WONTFIX... Correct, I updated the wrong bug by accident. Sorry about that.