Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344939 - net-misc/wget: missing SAE check causes github downloads to fail
Summary: net-misc/wget: missing SAE check causes github downloads to fail
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://savannah.gnu.org/bugs/index.p...
Whiteboard:
Keywords:
: 346273 348470 349072 349244 (view as bug list)
Depends on:
Blocks: 344495
  Show dependency tree
 
Reported: 2010-11-10 15:12 UTC by Michał Górny
Modified: 2010-12-21 04:28 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Failing build log (20101110-160240.log,1.11 KB, text/plain)
2010-11-10 16:06 UTC, Michał Górny
Details
wget-sae.patch (wget-sae.patch,8.02 KB, patch)
2010-11-26 08:41 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-11-10 15:12:26 UTC
As reported in bug #344495, recent github switch to https causes download problems with the current version of wget. The bug has been reported upstream (the report linked in the 'URL' field), and a fix has been committed.

However, there was no release since and thus the issue still applies to all Gentoo users, causing trouble with all packages with downloads originating from github. Thus, I suggest either convincing upstream to make a release, making a snapshot or backporting the patches to the current version.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-10 15:54:36 UTC
This is because of --no-check-certificate, right? Could you attach a build log where this fails?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-11-10 16:06:16 UTC
Created attachment 253901 [details]
Failing build log

Sure. Here you are.

Mirroring fails to catch it too. Thus, I am currently feeding the mirrors using distfiles-local but I don't think that's a good long-term solution.
Comment 3 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-16 00:38:00 UTC
openssl s_client -connect github.com:443
CONNECTED(00000003)
depth=3 L = ValiCert Validation Network, O = "ValiCert, Inc.", OU = ValiCert Class 2 Policy Validation Authority, CN = http://www.valicert.com/, emailAddress = info@valicert.com
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
 0 s:/O=*.github.com/OU=Domain Control Validated/CN=*.github.com
   i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287
 1 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287
   i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
 2 s:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
   i:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com
 3 s:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com
   i:/L=ValiCert Validation Network/O=ValiCert, Inc./OU=ValiCert Class 2 Policy Validation Authority/CN=http://www.valicert.com//emailAddress=info@valicert.com
....
subject=/O=*.github.com/OU=Domain Control Validated/CN=*.github.com
issuer=/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=07969287

Besides having a self-signed cert in the certificate chain, the certificate has CN=*.github.com while the server name is github.com. This seems to me to be a bad configuration on github.com - so it's up to them to fix it.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-16 22:09:50 UTC
You can work around the problem by setting the certificate as trusted locally, of course.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-11-20 15:47:04 UTC
(In reply to comment #4)
> You can work around the problem by setting the certificate as trusted locally,
> of course.

Yeah but the problem is not me but users. I don't want them to have trouble downloading my packages because of known & fixed wget bug (as github states it is). And I certainly don't want to force users to use our mirrors.
Comment 6 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-20 23:24:37 UTC
(In reply to comment #3)
....
> Besides having a self-signed cert in the certificate chain, the certificate has
> CN=*.github.com while the server name is github.com. This seems to me to be a
> bad configuration on github.com - so it's up to them to fix it.


(In reply to comment #5)
> (In reply to comment #4)
> > You can work around the problem by setting the certificate as trusted locally,
> > of course.
> 
> Yeah but the problem is not me but users. I don't want them to have trouble
> downloading my packages because of known & fixed wget bug (as github states it
> is). And I certainly don't want to force users to use our mirrors.

If you read my above comment, I don't see where there's a wget bug. The github certificate isn't appropriate for the hostname and wget seems to be strict in the validation check - that is a sane implementation.
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2010-11-24 01:33:00 UTC
*** Bug 346273 has been marked as a duplicate of this bug. ***
Comment 8 Hans de Graaff gentoo-dev Security 2010-11-26 08:06:54 UTC
(In reply to comment #6)

> If you read my above comment, I don't see where there's a wget bug. The github
> certificate isn't appropriate for the hostname and wget seems to be strict in
> the validation check - that is a sane implementation.

The certificate *is* appropriate for the hostname, and all major browser implementations accept this certificate as valid. If you check the "Certificate Subject Alt Name" field of the certificate extensions you'll notice DNS entries for *.github.com and github.com. wget is not properly checking this field, and this is what the upstream bug fix fixes.

Assigning this to base-system so this can be fixed ASAP.
Comment 9 SpanKY gentoo-dev 2010-11-26 08:41:38 UTC
Created attachment 255463 [details, diff]
wget-sae.patch

be useful to provide some useful pointers to upstream that actually fix your problem and you've tested ...

based on the vague info in the upstream reports, try this commit
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-11-26 12:38:17 UTC
(In reply to comment #9)
> based on the vague info in the upstream reports, try this commit

Yep, wget now downloads the file correctly, without any complaints.
Comment 11 SpanKY gentoo-dev 2010-11-26 22:50:50 UTC
added to wget-1.12-r3 then ... thanks for testing
Comment 12 Mike Hammill 2010-11-29 17:17:50 UTC
(In reply to comment #9)
Your patched wget also fixes my problem in bug #346273.  Thanks!

Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-12-12 16:55:46 UTC
*** Bug 348470 has been marked as a duplicate of this bug. ***
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-12-19 14:57:57 UTC
*** Bug 349072 has been marked as a duplicate of this bug. ***
Comment 15 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-21 04:28:20 UTC
*** Bug 349244 has been marked as a duplicate of this bug. ***