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

Issue 739490 link

Starred by 5 users

Issue metadata

Status: Archived
Owner:
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

vmlog permission errors in chrome://system

Project Member Reported by teravest@chromium.org, Jul 5 2017

Issue description

It looks like the /var/log/vmlog directory is created with 700 permissions and owner root, so chrome://system and feedback reports can't report the information inside.
 
Cc: puneetster@chromium.org
Interestingly enough this bug appears in 60 for the first time since the directory doesn't even exist in R59.
It looks like we might be missing some umask calls before and after the CreateDirectory operation in the constructor for VmlogWriter.  Here is what I found in biod:
  std::unique_ptr<ScopedUmask> owner_only_umask(new ScopedUmask(~(0700)));

  FilePath record_storage_filename = root_path_.Append(record.GetUserId())
                                         .Append(kBiod)
                                         .Append(biometrics_manager_name_)
                                         .Append(kRecordFileName + record_id);
  if (!base::CreateDirectory(record_storage_filename.DirName())) {
    LOG(ERROR) << "Cannot create directory: "
               << record_storage_filename.DirName().value() << ".";
    return false;
  }

  owner_only_umask.reset(new ScopedUmask(~(0600)));


We will probably need some extra code to set the mode bits correctly in the case where the directory already exists.

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 6 2017

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

commit 2dd3b80efb331f1f4fcc8095e968df8e7616396f
Author: Justin TerAvest <teravest@chromium.org>
Date: Thu Jul 06 04:54:57 2017

metrics: Fix permissions error on vmlog dir.

The default permissions on this log directory were too restrictive
(0700, owned by root), and chrome://system and feedback reports are
unable to read this data. This relaxes the permissions so that other
users can read this information (there's nothing sensitive in here, so
it should be fine).

BUG= chromium:739490 
TEST=Deploy, Checked directory perms and chrome://system

Change-Id: Ib0eaa40dba8aa87cd05657b14651595f5ef0e3c0
Reviewed-on: https://chromium-review.googlesource.com/560073
Commit-Ready: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>

[modify] https://crrev.com/2dd3b80efb331f1f4fcc8095e968df8e7616396f/metrics/vmlog_writer.cc

Cc: bhthompson@chromium.org
Labels: Merge-Request-60
This is a very low risk change that will help us debug memory-related issues when they arise. Any opposition to getting it in 60?
Project Member

Comment 6 by sheriffbot@chromium.org, Jul 11 2017

Labels: -Merge-Request-60 Hotlist-Merge-Review Merge-Review-60
This bug requires manual review: We are only 13 days from stable.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

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

Comment 8 by bugdroid1@chromium.org, Jul 13 2017

Labels: merge-merged-release-R60-9592.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/959d16d2fa59f14a2479bbba51c8a5df3a8ba1e5

commit 959d16d2fa59f14a2479bbba51c8a5df3a8ba1e5
Author: Justin TerAvest <teravest@chromium.org>
Date: Thu Jul 13 21:36:27 2017

metrics: Fix permissions error on vmlog dir.

The default permissions on this log directory were too restrictive
(0700, owned by root), and chrome://system and feedback reports are
unable to read this data. This relaxes the permissions so that other
users can read this information (there's nothing sensitive in here, so
it should be fine).

BUG= chromium:739490 
TEST=Deploy, Checked directory perms and chrome://system

Change-Id: Ib0eaa40dba8aa87cd05657b14651595f5ef0e3c0
Reviewed-on: https://chromium-review.googlesource.com/560073
Commit-Ready: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
(cherry picked from commit 2dd3b80efb331f1f4fcc8095e968df8e7616396f)
Reviewed-on: https://chromium-review.googlesource.com/571080
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>

[modify] https://crrev.com/959d16d2fa59f14a2479bbba51c8a5df3a8ba1e5/metrics/vmlog_writer.cc

Status: Fixed (was: Assigned)
Project Member

Comment 10 by sheriffbot@chromium.org, Jul 17 2017

Cc: bhthompson@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
Labels: -Merge-Approved-60

Comment 12 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment