New issue
Advanced search Search tips

Issue 887683 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 28
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Prevent multiple simultaneous computations and uploads of EIDs

Project Member Reported by drcrash@chromium.org, Sep 20

Issue description

The EnrollmentPolicyObserver (just like the AttestationPolicyObserver) starts work from both its constructors and when notified as a policy observer, which can lead to multiple simultaneous requests and uploads.

We still want to allow separate multiple uploads in case the server loses data and re-requests it.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5115783a743c7e3e38fa2530c9ba61ef3c1b69c7

commit 5115783a743c7e3e38fa2530c9ba61ef3c1b69c7
Author: Yves Arrouye <drcrash@google.com>
Date: Thu Sep 27 16:39:37 2018

Do not allow simultaneous computations and uploads of the EID

In some situations, Start() would be called from both the constructor
and the observer notification method quickly, yielding to multiple
concurrent flows. Prevent those.

In addition, redo the tests so that they test both work from the
observer notification method and from an existing policy. Also add
a test that triggers the concurrency situation and verifies that
there is only one flow running in that situation.

BUG= chromium:887683 
TEST=unit_tests --gtest_filter=*EnrollmentPolicyObserverTest*
CQ-DEPEND=CL:1234373

Change-Id: Ice6b46e19bf77a837b4c4908f332e9af6c5189f5
Reviewed-on: https://chromium-review.googlesource.com/1237242
Commit-Queue: Yves Arrouye <drcrash@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594751}
[modify] https://crrev.com/5115783a743c7e3e38fa2530c9ba61ef3c1b69c7/chrome/browser/chromeos/attestation/enrollment_policy_observer.cc
[modify] https://crrev.com/5115783a743c7e3e38fa2530c9ba61ef3c1b69c7/chrome/browser/chromeos/attestation/enrollment_policy_observer.h
[modify] https://crrev.com/5115783a743c7e3e38fa2530c9ba61ef3c1b69c7/chrome/browser/chromeos/attestation/enrollment_policy_observer_unittest.cc
[modify] https://crrev.com/5115783a743c7e3e38fa2530c9ba61ef3c1b69c7/chromeos/dbus/fake_cryptohome_client.cc

Labels: Merge-Rejected-70
Status: Fixed (was: Assigned)
Labels: -Pri-2 OS-Chrome Pri-1
Labels: -Merge-Rejected-70 Merge-Request-70
Project Member

Comment 5 by sheriffbot@chromium.org, Sep 28

Labels: -Merge-Request-70 Merge-Review-70 Hotlist-Merge-Review
This bug requires manual review: M70 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-70 Merge-Approved-70
Project Member

Comment 7 by sheriffbot@chromium.org, Oct 2

Cc: geo...@google.com
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 8 by sheriffbot@chromium.org, Oct 5

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 8

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/adc798944da6b347b5cc6cd80e15d9ecbaecc04b

commit adc798944da6b347b5cc6cd80e15d9ecbaecc04b
Author: Alexander Hendrich <hendrich@chromium.org>
Date: Mon Oct 08 11:01:28 2018

[Merge M70] Do not allow simultaneous computations and uploads of the EID

In some situations, Start() would be called from both the constructor
and the observer notification method quickly, yielding to multiple
concurrent flows. Prevent those.

In addition, redo the tests so that they test both work from the
observer notification method and from an existing policy. Also add
a test that triggers the concurrency situation and verifies that
there is only one flow running in that situation.

BUG= chromium:887683 
TEST=unit_tests --gtest_filter=*EnrollmentPolicyObserverTest*
CQ-DEPEND=CL:1234373

TBR=drcrash@google.com

(cherry picked from commit 5115783a743c7e3e38fa2530c9ba61ef3c1b69c7)

Change-Id: Ice6b46e19bf77a837b4c4908f332e9af6c5189f5
Reviewed-on: https://chromium-review.googlesource.com/1237242
Commit-Queue: Yves Arrouye <drcrash@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#594751}
Reviewed-on: https://chromium-review.googlesource.com/c/1267500
Reviewed-by: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#888}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/adc798944da6b347b5cc6cd80e15d9ecbaecc04b/chrome/browser/chromeos/attestation/enrollment_policy_observer.cc
[modify] https://crrev.com/adc798944da6b347b5cc6cd80e15d9ecbaecc04b/chrome/browser/chromeos/attestation/enrollment_policy_observer.h
[modify] https://crrev.com/adc798944da6b347b5cc6cd80e15d9ecbaecc04b/chrome/browser/chromeos/attestation/enrollment_policy_observer_unittest.cc
[modify] https://crrev.com/adc798944da6b347b5cc6cd80e15d9ecbaecc04b/chromeos/dbus/fake_cryptohome_client.cc

Labels: Merge-Merged-70-3538
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/adc798944da6b347b5cc6cd80e15d9ecbaecc04b

Commit: adc798944da6b347b5cc6cd80e15d9ecbaecc04b
Author: hendrich@chromium.org
Commiter: hendrich@chromium.org
Date: 2018-10-08 11:01:28 +0000 UTC

[Merge M70] Do not allow simultaneous computations and uploads of the EID

In some situations, Start() would be called from both the constructor
and the observer notification method quickly, yielding to multiple
concurrent flows. Prevent those.

In addition, redo the tests so that they test both work from the
observer notification method and from an existing policy. Also add
a test that triggers the concurrency situation and verifies that
there is only one flow running in that situation.

BUG= chromium:887683 
TEST=unit_tests --gtest_filter=*EnrollmentPolicyObserverTest*
CQ-DEPEND=CL:1234373

TBR=drcrash@google.com

(cherry picked from commit 5115783a743c7e3e38fa2530c9ba61ef3c1b69c7)

Change-Id: Ice6b46e19bf77a837b4c4908f332e9af6c5189f5
Reviewed-on: https://chromium-review.googlesource.com/1237242
Commit-Queue: Yves Arrouye <drcrash@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#594751}
Reviewed-on: https://chromium-review.googlesource.com/c/1267500
Reviewed-by: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#888}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}

Sign in to add a comment