New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2012
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment
link

Issue 141643: Anti-DDoS inversion of logic: Enabled for everything _except_ extension requests, not the other way around.

Reported by joi@chromium.org, Aug 9 2012 Project Member

Issue description

While investigating  issue 141081  I discovered a bad inversion of logic.

In http://crrev.com/128196 (March 22nd, 2012) we changed the anti-DDoS mechanism so that it only had effect on requests initiated by extensions.

In an architectural clean-up change, http://crrev.com/141000 (June 7th, first released to the stable channel on July 31st AFAICT), the logic was accidentally reversed, so anti-DDoS applies to all requests _except_ extension requests.  The change also introduced  issue 141081 .

I will be fixing both of these and recommending that we merge the fixes to the Beta and Stable channels.  I will also introduce better tests on the main branch to ensure such a regression can't happen again.
 

Comment 1 by bugdroid1@chromium.org, Aug 9 2012

Project Member
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=150928

------------------------------------------------------------------------
r150928 | joi@chromium.org | 2012-08-09T22:48:46.818922Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/chrome_network_delegate.cc?r1=150928&r2=150927&pathrev=150928
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/chrome_network_delegate.h?r1=150928&r2=150927&pathrev=150928

Fix a bad inversion of logic (see OnCanThrottleRequest) and a bug
related to how a flag was persisted.

BUG= 141081 , 141643 


Review URL: https://chromiumcodereview.appspot.com/10854069
------------------------------------------------------------------------

Comment 2 by joi@google.com, Aug 10 2012

Will test on Canary once available, and then request merge to Beta and Stable.

Comment 3 by joi@chromium.org, Aug 13 2012

Labels: ReleaseBlock-Stable Merge-Requested
I've tested on Canary that the fix works correctly.  Requesting to merge r150928 to the M21 branch.

Comment 4 by bugdroid1@chromium.org, Aug 15 2012

Project Member
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=151683

------------------------------------------------------------------------
r151683 | joi@chromium.org | 2012-08-15T11:13:11.281900Z

Changed paths:
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/chrome_network_delegate_unittest.cc?r1=151683&r2=151682&pathrev=151683
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/chrome_network_delegate.h?r1=151683&r2=151682&pathrev=151683
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/chrome_tests.gypi?r1=151683&r2=151682&pathrev=151683

Regression test for anti-DDoS bugs in ChromeNetworkDelegate.

This ensures:
a) That when g_never_throttle_requests_ is false, only
extension requests may be throttled (rather than the inverse);
b) That setting the flag applies to all instances of
ChromeNetworkDelegate, not just the one it is set on.

If we'd had these tests earlier, they would have prevented the
bugs below from being introduced.

TBR=thakis@chromium.org
BUG= 141081 , 141643 


Review URL: https://chromiumcodereview.appspot.com/10828284
------------------------------------------------------------------------

Comment 5 by kareng@google.com, Aug 15 2012

Labels: -Merge-Requested Merge-Approved

Comment 6 by kareng@google.com, Aug 15 2012

Status: Fixed
joi closing this since it's fixed, right?

Comment 7 by joi@chromium.org, Aug 15 2012

I just landed the merge of r150928 on the Chrome 21 branch, so this is now fixed, and should go live with the first release of Chrome 21 that picks up the merge, r151761.

Comment 8 by mmenke@google.com, Aug 15 2012

You'll need to merge into M22, too, right?

Comment 9 by bugdroid1@chromium.org, Aug 15 2012

Project Member
Labels: -Merge-Approved merge-merged-1180
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=151761

------------------------------------------------------------------------
r151761 | joi@chromium.org | 2012-08-15T21:55:53.903890Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/1180/src/chrome/browser/net/chrome_network_delegate.h?r1=151761&r2=151760&pathrev=151761
   M http://src.chromium.org/viewvc/chrome/branches/1180/src/chrome/browser/net/chrome_network_delegate.cc?r1=151761&r2=151760&pathrev=151761

Merge 150928 - Fix a bad inversion of logic (see OnCanThrottleRequest) and a bug
related to how a flag was persisted.

BUG= 141081 , 141643 


Review URL: https://chromiumcodereview.appspot.com/10854069

TBR=joi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10828333
------------------------------------------------------------------------

Comment 10 by joi@chromium.org, Aug 15 2012

Labels: -Mstone-21 Mstone-22 Merge-Requested
Status: Started
mmenke:  Thanks for pointing that out, you're right, I missed the 22 branch by one day.  Requesting that merge now on this bug and  issue 141081 .

kerz:  This is already in the 21 branch, hence the merge-merged-1180 label, but as mmenke pointed out, it needs to be merged to 22 as well.  I'll get you that whisky next time I'm in MTV ;)

Comment 11 by k...@google.com, Aug 15 2012

Labels: -Merge-Requested Merge-Approved

Comment 12 by bugdroid1@chromium.org, Aug 15 2012

Project Member
Labels: -Merge-Approved merge-merged-1229
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=151767

------------------------------------------------------------------------
r151767 | joi@chromium.org | 2012-08-15T22:20:57.909608Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/1229/src/chrome/browser/net/chrome_network_delegate.cc?r1=151767&r2=151766&pathrev=151767
   M http://src.chromium.org/viewvc/chrome/branches/1229/src/chrome/browser/net/chrome_network_delegate.h?r1=151767&r2=151766&pathrev=151767

Merge 150928 - Fix a bad inversion of logic (see OnCanThrottleRequest) and a bug
related to how a flag was persisted.

BUG= 141081 , 141643 


Review URL: https://chromiumcodereview.appspot.com/10854069

TBR=joi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10830344
------------------------------------------------------------------------

Comment 13 by joi@chromium.org, Aug 15 2012

Status: Fixed
This is now on trunk, 21 and 22, and trunk has an added regression test, so that should be the end of this problem.

Comment 14 by joi@chromium.org, Aug 22 2012

The first Chrome 21 version to have the fix is 21.0.1180.81 so if you have that version or later you should no longer experience it.  The versions currently being distributed on the stable channel are 21.0.1180.81 and later.

Comment 15 by bugdroid1@chromium.org, Oct 13 2012

Project Member
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.

Comment 16 by bugdroid1@chromium.org, Mar 10 2013

Project Member
Labels: -Area-Internals -Internals-Network-HTTP -Mstone-22 M-22 Cr-Internals-Network-HTTP Cr-Internals

Comment 17 by bugdroid1@chromium.org, Mar 14 2013

Project Member
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue

Comment 18 by efoo@chromium.org, Jul 6 2018

Components: Internals>Network

Comment 19 by efoo@chromium.org, Jul 6 2018

Components: -Internals>Network>HTTP

Sign in to add a comment