Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Issue 2797523002: Prevent multiple simultaneous calls to GetProof (Closed)

Created:
3 years, 8 months ago by Zhongyi Shi
Modified:
3 years, 8 months ago
Reviewers:
Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent multiple simultaneous calls to GetProof If a malicious or buggy client sends a bunch of CHLOs close together, we can end up in the following pathological situation: - The first CHLO is processed in QuicCryptoServerStream::OnHandshakeMessage, and triggers a call to ValidateClientHello. - The ValidateClientHello completes into QuicCryptoServerStream::FinishProcessingHandshakeMessage, which kicks off a call to ProcessClientHello. - While that's going on, another CHLO arrives and QuicCryptoServerStream::OnHandshakeMessage is called again, kicking off another call to ValidateClientHello. Now we are in a situation where two calls to GetProof can be running at the same time, which is not allowed. The fix is to note and enforce that the validate_client_hello_cb_ and process_client_hello_cb_ fields should not be populated at the same time. Now, the second call to OnHandshakeMessage will detect that CHLO processing is already in progress, and close the connection. relnote: Avoid a QUIC crash which can be triggered by a malicious or buggy client, especially when GFE is using Mentat for signing. Protected by default-enabled flag quic_reloadable_flag_fix_quic_callback_crash. Merge internal change: 151698587 BUG=

Patch Set 1 #

Patch Set 2 : Change to use MockClock #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -16 lines) Patch
M net/quic/core/quic_crypto_server_stream.h View 2 chunks +8 lines, -7 lines 0 comments Download
M net/quic/core/quic_crypto_server_stream.cc View 7 chunks +12 lines, -9 lines 0 comments Download
M net/quic/core/quic_crypto_server_stream_test.cc View 1 2 chunks +53 lines, -0 lines 0 comments Download
M net/quic/core/quic_flags_list.h View 1 chunk +4 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 11 (9 generated)
Zhongyi Shi
3 years, 8 months ago (2017-04-03 21:19:18 UTC) #8
Ryan Hamilton
3 years, 8 months ago (2017-04-03 23:05:57 UTC) #9
lgtm

Powered by Google App Engine
This is Rietveld 408576698