Firefox allows user to visit webpages with revoked certificate when non-resolving proxy is set
Categories
(Core :: Networking, defect, P2)
Tracking
()
People
(Reporter: bigon, Assigned: kershaw)
Details
(Keywords: csectype-other, sec-moderate, Whiteboard: [necko-triaged][adv-main102+][adv-esr91.11+])
Attachments
(5 files, 4 obsolete files)
142.73 KB,
application/gzip
|
Details | |
1.01 KB,
application/octet-stream
|
Details | |
50.91 KB,
application/gzip
|
Details | |
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-esr91+
|
Details | Review |
250 bytes,
text/plain
|
Details |
Hello
On my work laptop, I've a proxy setup (via a .pac file) in GNOME configuration. In Firefox, the configuration is set to use the system settings.
With the proxy is setup (when I'm disconnected from the VPN, the pac file or the proxy is not reachable, so it doesn't seem to matter if the proxy is actually used) if I go to https://revoked.badssl.com/ I get a red scary page telling me that I shouldn't be seeing this.
As soon as I disable the proxy in the GNOME configuration, I'm getting the SEC_ERROR_REVOKED_CERTIFICATE as expected.
Reporter | ||
Comment 2•3 years ago
|
||
I've the same issue when I'm at home and not connected to the company VPN and there port OSCP/80 is definitely not blocked
![]() |
||
Comment 3•3 years ago
|
||
What's the value of security.OCSP.enabled
in about:config
?
What does Firefox do if you set security.OCSP.require
to true
?
Can you capture the packets of the handshake (and any OCSP requests) with https://revoked.badssl.com/
using Wireshark and attach the results here?
Thanks!
Reporter | ||
Comment 4•3 years ago
|
||
security.OCSP.enabled
is set to 1
With the proxy set via a pac file, but nor the pac file nor the proxy is reachable (not at the office or connected via the VPN):
-
When I'm forcing
security.OCSP.require
to true, I get theSEC_ERROR_OCSP_SERVER_ERROR
for https://revoked.badssl.com/. I also get the same error when browsing to google.com -
When I'm forcing
security.OCSP.require
to true, going to my own website that has https via let's encrypt with OCSP stapling, it works. If I disable thesecurity.ssl_enable_ocsp_stapling
, my website become unreachable with theSEC_ERROR_OCSP_SERVER_ERROR
error -
I don't see any call to the OCSP server (http://ocsp.digicert.com, IP: 93.184.220.29)
So really, if a proxy is set, direct queries to the OCSP server are disabled completely. I doubt it's that the expected behavior?
![]() |
||
Comment 5•3 years ago
|
||
It's expected that OCSP requests don't occur while the PAC is loading, but they should happen when it's done loading (or presumably when it fails to load and Firefox continues without it).
Kershaw, any ideas as to if this is behaving correctly?
Assignee | ||
Comment 6•3 years ago
|
||
Hi Reporter,
Could you try to capture a http log for this?
Please also add pipnss:5,proxy:5
to MOZ_LOG
environment variable.
Thanks.
Reporter | ||
Comment 7•3 years ago
|
||
Hello,
I can reproduce this by literally setting http://proxy.example.com/proxy.pac
as a pac file directly in firefox
I've attached the requested logs
Comment 8•3 years ago
|
||
Moving this out of the Fx frontend product as this seems like a necko/tls issue.
Updated•3 years ago
|
Comment 9•3 years ago
|
||
What's happening makes sense, the question is how do we best help users? Warn them when their specified proxy isn't loading? Or maybe we just aren't communicating that the PAC loading failed back to the OCSP checking code?
Reporter | ||
Comment 10•3 years ago
|
||
So if I understand properly, when the proxy is reachable, the OCSP validation is not done by Firefox but is supposed to be delegated to the proxy?
![]() |
||
Comment 11•3 years ago
|
||
No, if the proxy is reachable, OCSP requests should still occur.
Reporter | ||
Comment 12•3 years ago
|
||
I'm asking because that doesn't seem to happen either
I'll have to get the logs when I'm able to connect to the proxy also then
Reporter | ||
Comment 13•3 years ago
|
||
Logs when the connection to the proxy succeed
Reporter | ||
Comment 14•3 years ago
|
||
Scratch my last comment (comment 12 and 13), the proxy is doing MITM by replacing the certificate but does not add OCSP information to it.
![]() |
||
Comment 15•3 years ago
|
||
Kershaw, is this just bug 1639914? (see in particular bug 1639914 comment 4)
Assignee | ||
Comment 16•3 years ago
|
||
(In reply to Dana Keeler (she/her) (use needinfo) (:keeler for reviews) from comment #15)
Kershaw, is this just bug 1639914? (see in particular bug 1639914 comment 4)
No, I think the problem in this bug is not about pac
request being cancelled.
I think the problem is in comment #4:
When I'm forcing security.OCSP.require to true, going to my own website that has https via let's encrypt with OCSP stapling, it works. If I disable the security.ssl_enable_ocsp_stapling, my website become unreachable with the SEC_ERROR_OCSP_SERVER_ERROR error
Why does the reporter's website work when the proxy is not reachable?
I am guessing maybe the content is loaded from cache.
Reporter, the log file is not completed because you only set MOZ_LOG
to pipnss:5,proxy:5
. We need to turn on more logging.
In this case, I think setting MOZ_LOG
to nsHttp:5,cache2:5,nsSocketTransport:5,nsHostResolver:5,pipnss:5,proxy:5
should be enough.
Could you try to capture the log again? Thanks.
Reporter | ||
Comment 17•3 years ago
|
||
I really don't think this has anything to do with the cache.
Forcing OCSP (via security.OCSP.require
) and then toggling security.ssl_enable_ocsp_stapling
prevents me (or not) to access my personal website.
You cannot reproduce this behavior on your side?
Reporter | ||
Comment 18•3 years ago
|
||
Reporter | ||
Comment 19•3 years ago
|
||
When the pac file is not reachable, firefox tries to connect directly: D/proxy pac not available, use DIRECT
Assignee | ||
Comment 20•3 years ago
|
||
(In reply to Laurent Bigonville from comment #17)
Created attachment 9278822 [details]
log.txt-main.378256.moz_log.gzI really don't think this has anything to do with the cache.
Forcing OCSP (via
security.OCSP.require
) and then togglingsecurity.ssl_enable_ocsp_stapling
prevents me (or not) to access my personal website.
Thanks for the log. It shows Firefox sending one ocsp request.
[Parent 378256: SSL Cert #2]: D/pipnss DoOCSPRequest to 'http://r3.o.lencr.org'
Dana, do you have any idea here? Why toggling security.ssl_enable_ocsp_stapling
makes difference?
![]() |
||
Comment 21•3 years ago
|
||
Disabling OCSP stapling means the server won't include OCSP information in the TLS handshake, so Firefox won't have any OCSP information (assuming fetching OCSP is failing, which it looks like is happening). Combining that with security.OCSP.require
would prevent you from reaching sites, as expected.
This bug is getting a bit confusing to me - you've outlined a number of different scenarios, and it's unclear to me what's happening and what you're expecting to happen. Can you maybe lay out the configurations you're concerned about in an ordered fashion?
Also, again, it would be very helpful to have a packet trace to see what requests Firefox is making and what responses it's getting. Thank you!
Reporter | ||
Comment 22•3 years ago
|
||
Well not sure what's confusing here, when the pac file is not reachable, firefox is not sending any OCSP requests, I can reproduce that 100% of the time here. pac file not being reachable can happen often when people are using a corporate computer and not connected to their VPN or not being inside the corporate network
Anyway where what I'm doing:
- Create an empty profile
- Set the proxy to http://proxy.example.com:8080/proxy.pac
- Set
security.OCSP.require
to true - Set
security.ssl.enable_ocsp_stapling
to false - Go to https://bigon.be
- Website is not reachable (
SEC_ERROR_OCSP_SERVER_ERROR
error) - Set
security.ssl.enable_ocsp_stapling
to true - Go to https://bigon.be again
- Website is reachable
That seems to suggest that OCSP is not completely broken, just OCSP requests are not being done as the proxy is not reachable
Reporter | ||
Comment 23•3 years ago
|
||
Reporter | ||
Comment 24•3 years ago
|
||
I attach here the capture my last attempt
I used the following filter: (ipv6.addr == 2001:bc8:25f1:100::1 and tcp.port == 443) or ocsp
As you can see, no OCSP requests are made
When disabling the proxy, I can see the OCSP requests being made again
Assignee | ||
Comment 25•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 26•3 years ago
|
||
I found a problem that GetIsPACLoading
always returns true when the pac is not reachable. This blocks sending ocsp request here.
Comment 27•3 years ago
|
||
If the PAC is actually loading we don't want to send OCSP because it's quite possible the OCSP request is for the PAC file itself. So it'd really be nice to know the difference between actually-loading and failed-loading.
Especially so if we've decided to let other network requests continue without waiting for the PAC to load.
This probably isn't that useful as an attack vector so maybe we can unhide the bug.
![]() |
||
Comment 28•3 years ago
|
||
Clear PAC loader when the load is failed, r=necko-reviewers,dragana
https://hg.mozilla.org/integration/autoland/rev/f6c203dbc605c69887d1547d5e89f4fb44c9ffcc
https://hg.mozilla.org/mozilla-central/rev/f6c203dbc605
Comment 29•3 years ago
|
||
Should we uplift this to 102?
Assignee | ||
Comment 30•3 years ago
|
||
(In reply to Mike Kaply [:mkaply] from comment #29)
Should we uplift this to 102?
I can uplift this, since the change is not risky.
Assignee | ||
Comment 31•3 years ago
|
||
Comment on attachment 9279092 [details]
Bug 1770123 - Clear PAC loader when the load is failed, r=#necko
Beta/Release Uplift Approval Request
- User impact if declined: If there is a PAC URL set and the server that hosts the PAC is not reachable, OCSP requests are blocked.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: N/A
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This change is straightforward.
- String changes made/needed: N/A
- Is Android affected?: Yes
Comment 32•3 years ago
|
||
Comment on attachment 9279092 [details]
Bug 1770123 - Clear PAC loader when the load is failed, r=#necko
Approved for 102 beta 6, thanks.
Comment 33•3 years ago
|
||
uplift |
Comment 34•3 years ago
|
||
Is that something we should uplift to the ESR 91 branch as well? ESR 102 will inherit from the uplift to the 102 beta branch.
Updated•3 years ago
|
Assignee | ||
Comment 35•3 years ago
|
||
(In reply to Pascal Chevrel:pascalc from comment #34)
Is that something we should uplift to the ESR 91 branch as well? ESR 102 will inherit from the uplift to the 102 beta branch.
Sure, I think we can also uplift to ESR 91.
Thanks.
Assignee | ||
Comment 36•3 years ago
|
||
Comment on attachment 9279092 [details]
Bug 1770123 - Clear PAC loader when the load is failed, r=#necko
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: If there is a PAC URL set and the server that hosts the PAC is not reachable, OCSP requests are blocked.
- User impact if declined: If there is a PAC URL set and the server that hosts the PAC is not reachable, OCSP requests are blocked.
- Fix Landed on Version: 103
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This patch is straightforward.
Comment 37•3 years ago
|
||
Comment on attachment 9279092 [details]
Bug 1770123 - Clear PAC loader when the load is failed, r=#necko
Approved for 91.11esr.
Comment 38•3 years ago
|
||
uplift |
Updated•3 years ago
|
Updated•3 years ago
|
Comment 39•3 years ago
|
||
I've reproduced this bug using an affected Nightly build from 2022-05-19, using the STR from comment 22.
The issue is verified as fixed on the latest builds: ESR 91.11, Beta 102.0b8 and latest Nightly 103.0a1.
Updated•3 years ago
|
Comment 40•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Description
•