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

Issue 835623003: Add a delay when unlocking WebSocket endpoints. (Closed)

Created:
5 years, 11 months ago by Adam Rice
Modified:
5 years, 11 months ago
CC:
cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a delay when unlocking WebSocket endpoints. The synchronous nature of endpoint unlocks for WebSocket throttling permits denial-of-service attacks. Make it asynchronous, and add a small delay to make attack timing harder. BUG=442756 TEST=net_unittests, layout tests Committed: https://crrev.com/bafe0f29a763c8325690cbdc42c29fc54d487d4f Cr-Commit-Position: refs/heads/master@{#312774}

Patch Set 1 #

Patch Set 2 : Small fixes. #

Patch Set 3 : Nit-pick fixes. #

Total comments: 2

Patch Set 4 : Add a "Scoped" prefix to WebSocketEndpointZeroUnlockDela #

Total comments: 7

Patch Set 5 : Document WebSocketEndpointLockManager #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -30 lines) Patch
M net/socket/socket_test_util.h View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M net/socket/socket_test_util.cc View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download
M net/socket/websocket_endpoint_lock_manager.h View 1 2 3 4 5 chunks +43 lines, -8 lines 0 comments Download
M net/socket/websocket_endpoint_lock_manager.cc View 1 2 4 chunks +49 lines, -11 lines 0 comments Download
M net/socket/websocket_endpoint_lock_manager_unittest.cc View 1 2 3 10 chunks +73 lines, -0 lines 0 comments Download
M net/socket/websocket_transport_client_socket_pool_unittest.cc View 1 2 3 14 chunks +22 lines, -11 lines 0 comments Download
M net/websockets/websocket_stream_test.cc View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
Adam Rice
5 years, 11 months ago (2015-01-05 22:05:52 UTC) #2
Adam Rice
ping
5 years, 11 months ago (2015-01-20 00:15:59 UTC) #3
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/835623003/diff/40001/net/socket/socket_test_util.h File net/socket/socket_test_util.h (right): https://codereview.chromium.org/835623003/diff/40001/net/socket/socket_test_util.h#newcode1325 net/socket/socket_test_util.h:1325: class WebSocketEndpointZeroUnlockDelay { [optional] add a prefix "Scoped"?
5 years, 11 months ago (2015-01-20 07:22:07 UTC) #4
Adam Rice
https://codereview.chromium.org/835623003/diff/40001/net/socket/socket_test_util.h File net/socket/socket_test_util.h (right): https://codereview.chromium.org/835623003/diff/40001/net/socket/socket_test_util.h#newcode1325 net/socket/socket_test_util.h:1325: class WebSocketEndpointZeroUnlockDelay { On 2015/01/20 07:22:07, tyoshino wrote: > ...
5 years, 11 months ago (2015-01-20 07:33:54 UTC) #5
tyoshino (SeeGerritForStatus)
lgtm
5 years, 11 months ago (2015-01-20 07:34:54 UTC) #6
Adam Rice
+mmenke for net/ OWNERS.
5 years, 11 months ago (2015-01-20 07:36:49 UTC) #8
mmenke
https://codereview.chromium.org/835623003/diff/60001/net/socket/socket_test_util.cc File net/socket/socket_test_util.cc (right): https://codereview.chromium.org/835623003/diff/60001/net/socket/socket_test_util.cc#newcode1997 net/socket/socket_test_util.cc:1997: old_delay_); Suggest adding protection against having two of these ...
5 years, 11 months ago (2015-01-20 15:50:53 UTC) #9
mmenke
https://codereview.chromium.org/835623003/diff/60001/net/socket/websocket_endpoint_lock_manager.h File net/socket/websocket_endpoint_lock_manager.h (right): https://codereview.chromium.org/835623003/diff/60001/net/socket/websocket_endpoint_lock_manager.h#newcode33 net/socket/websocket_endpoint_lock_manager.h:33: static WebSocketEndpointLockManager* GetInstance(); On 2015/01/20 15:50:53, mmenke wrote: > ...
5 years, 11 months ago (2015-01-20 17:46:21 UTC) #10
Adam Rice
https://codereview.chromium.org/835623003/diff/60001/net/socket/socket_test_util.cc File net/socket/socket_test_util.cc (right): https://codereview.chromium.org/835623003/diff/60001/net/socket/socket_test_util.cc#newcode1997 net/socket/socket_test_util.cc:1997: old_delay_); On 2015/01/20 15:50:53, mmenke wrote: > Suggest adding ...
5 years, 11 months ago (2015-01-21 08:54:02 UTC) #11
mmenke
Thanks for making the changes! LGTM, deferring to tyoshino on the correctness of the code. ...
5 years, 11 months ago (2015-01-21 15:20:34 UTC) #12
Adam Rice
tyoshino, can you take a quick look at patch set 5?
5 years, 11 months ago (2015-01-22 02:02:19 UTC) #13
tyoshino (SeeGerritForStatus)
On 2015/01/22 02:02:19, Adam Rice wrote: > tyoshino, can you take a quick look at ...
5 years, 11 months ago (2015-01-22 12:57:44 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/835623003/80001
5 years, 11 months ago (2015-01-23 03:13:36 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 11 months ago (2015-01-23 05:32:01 UTC) #17
commit-bot: I haz the power
5 years, 11 months ago (2015-01-23 05:32:45 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/bafe0f29a763c8325690cbdc42c29fc54d487d4f
Cr-Commit-Position: refs/heads/master@{#312774}

Powered by Google App Engine
This is Rietveld 408576698