Bug 1036950

Summary: Connections coalesced through SPDY fail with SOCKS proxy
Product: Red Hat Enterprise Linux 6 Reporter: Daniel Sands <dnsands>
Component: xulrunnerAssignee: Martin Stransky <stransky>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.5CC: cschalle, dnsands
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 12:31:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Daniel Sands 2013-12-02 23:37:12 UTC
Description of problem:
My setup uses OpenSSH's dynamic forwarding feature to set up a SOCKS tunnel from local port 10000 to the destination host.  Firefox is set to use this tunnel with its SOCKS proxy.  Remote DNS lookup is also enabled.

I discovered this problem while browsing Facebook.  Images posted by users were not showing up.  Using a combination of Page Info (Media tab) and Wireshark, I determined that to download images, it was attempting to connect to scontent-a.facebook.com and scontent-b.facebook.com using the SOCKS connect command.  Neither of these hosts exist.  I turned on HTTP logging (NSPR_LOG_MODULES=nsHttp:5 and NSPR_LOG_FILE=http.log) and discovered that the actual host names, scontent-a.xx.fbcdn.net and scontent-b.xx.fbcdn.net, were coalescing with www.facebook.com.  This seems to interact badly with the transparent proxy (SOCKS) where it attempts to contact the "coalesced" server names instead of reusing its connections as SPDY intends.

Turning off hostname coalescing in about:config is a workaround.

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

How reproducible:
Always

Steps to Reproduce:
1.  Use OpenSSH to connect to another host, and set up a dynamic port forward (-D option in OpenSSH).
2.  Set Firefox to use that dynamic port with SOCKS
3.  Browse Facebook photos

Actual results:
The page appears, sans photos.  Page Info/Media tab shows images that come from scontent-a or scontent-b hosts as 0KB and 0x0 size.

Expected results:
Photos also appear

Additional info:
A snippet of the HTTP log:
1820325632[7fea791537b0]: nsHttpConnectionMgr::GetSpdyPreferredConnection Host www.facebook.com cannot be confirmed to be joined with fbstatic-a.akamaihd.net connections. rv=0 isJoined=0
1820325632[7fea791537b0]: nsHttpConnectionMgr::ProcessPendingQForEntry [ci=.S.fbcdn-photos-f-a.akamaihd.net:443 (socks)]
1820325632[7fea791537b0]: nsHttpConnectionMgr::GetSpdyPreferredConnection Host www.facebook.com cannot be confirmed to be joined with fbcdn-photos-f-a.akamaihd.net connections. rv=0 isJoined=0
1820325632[7fea791537b0]: nsHttpConnectionMgr::ProcessPendingQForEntry [ci=.S.scontent-a.xx.fbcdn.net:443 (socks)]
1820325632[7fea791537b0]: nsHttpConnectionMgr::GetSpdyPreferredConnection Host www.facebook.com has cert valid for scontent-a.xx.fbcdn.net connections, so scontent-a.xx.fbcdn.net will be coalesced with www.facebook.com
1820325632[7fea791537b0]: nsHttpConnectionMgr::ProcessPendingQForEntry [ci=.S.fbcdn-creative-a.akamaihd.net:443 (socks)]
1820325632[7fea791537b0]: nsHttpConnectionMgr::GetSpdyPreferredConnection Host www.facebook.com cannot be confirmed to be joined with fbcdn-creative-a.akamaihd.net connections. rv=0 isJoined=0
1820325632[7fea791537b0]: nsHttpConnectionMgr::ProcessPendingQForEntry [ci=.S.fbcdn-photos-d-a.akamaihd.net:443 (socks)]
1820325632[7fea791537b0]: nsHttpConnectionMgr::GetSpdyPreferredConnection Host www.facebook.com cannot be confirmed to be joined with fbcdn-photos-d-a.akamaihd.net connections. rv=0 isJoined=0
...
1820325632[7fea791537b0]: nsHttpConnectionMgr::ProcessPendingQForEntry [ci=.S.scontent-a.facebook.com:443 (socks)]

Comment 1 Martin Stransky 2013-12-10 14:44:24 UTC
Can you test it with upstream binary package from mozilla.org? I'd also recommend to test latest nightly (ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/).

Comment 2 Daniel Sands 2013-12-10 18:24:33 UTC
In testing, the upstream FF 17 has the same problem.  I tested the latest release (26) and it did not have that problem.

Comment 3 Martin Stransky 2013-12-12 11:07:54 UTC
That sounds good. If you find corresponding  bug at https://bugzilla.mozilla.org/ we can consider to include the patch in some next update. Otherwise it will be bundled in next Firefox ESR rebase, when the 24 line comes EOL.

Comment 5 Jan Kurik 2017-12-06 12:31:48 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/