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

Issue 641372 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 641366



Sign in to add a comment

Protect mounts in cryptohome by a lock

Project Member Reported by apronin@chromium.org, Aug 26 2016

Issue description

To avoid unsafe map operations (changing the map, e.g. calling erase(), while other threads are iterating - see  issue 641366 ), protect mounts_ field of cryptohome::Service by mounts_lock_ for all accesses. Make sure no blocking operations are performed with the mounts_lock_ held.
 
Blocking: 641366
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/dde00b69078d25ba44f8ee5e8e3eea8ed46cfeb3

commit dde00b69078d25ba44f8ee5e8e3eea8ed46cfeb3
Author: Andrey Pronin <apronin@google.com>
Date: Sat Aug 27 01:41:34 2016

cryptohome: protect all iterators over mounts map with lock

To avoid unsafe map operations (changing the map, e.g. calling erase(),
while other threads are iterating - see BUG description), protect mounts_
member of cryptohome::Service by mounts_lock_ for all iterators.

BUG= chromium:641372 
TEST=cbuildbot --hwtest on monroe, peach_pit, daisy_skate
     test_that dut login_Cryptohome login_OwnershipNotRetaken
     unittests

Change-Id: I1738b4524c44fab9f86d65f3d2f78323bc172320
Reviewed-on: https://chromium-review.googlesource.com/376966
Commit-Ready: Andrey Pronin <apronin@chromium.org>
Tested-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>

[modify] https://crrev.com/dde00b69078d25ba44f8ee5e8e3eea8ed46cfeb3/cryptohome/service.cc

Status: Fixed (was: Assigned)
Cc: dkrahn@chromium.org jrbarnette@chromium.org apronin@chromium.org wad@chromium.org bfreed@chromium.org
 Issue 361247  has been merged into this issue.

Sign in to add a comment