New issue
Advanced search Search tips

Issue 911236 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

cheets_ContainerMount erroneously targets non-ARC processes

Project Member Reported by wzang@chromium.org, Dec 3

Issue description

Cc: -risan@chromium.org -ricardoq@chromium.org ricardoq@google.com risan@google.com
TL;DR: I'll wait a few minutes/hours until I have the report from the other boards.



It seems that it is failing in veyron-minnie R73-11335.
But I don't know whether it is failing in more boards or not.

Current history only reports up util 11334:
https://stainless.corp.google.com/search?test=%5echeets%5c_ContainerMount$&first_date=2018-11-05&last_date=2018-12-03&row=model&col=build&view=matrix


Cc: apronin@chromium.org derat@chromium.org hidehiko@chromium.org steve...@chromium.org jamescook@chromium.org
 Issue 911239  has been merged into this issue.
Owner: hidehiko@chromium.org
Status: Assigned (was: Untriaged)
PTAL. Thanks.
Cc: sa...@chromium.org
Stainless doesn't show failing test (including veyron-minnie R73-11336): https://stainless.corp.google.com/search?test=%5echeets%5c_ContainerMount$&first_date=2018-11-05&last_date=2018-12-03&row=model&col=build&view=matrix

Can we close this bug? (btw, hidehiko@ is OOO for several days).

Hm, on the other hand, cheets_ContainerMount fails due to another reasons on pantheon. I filed a buganizer bug for that: https://b.corp.google.com/issues/120455962
as mentioned in comment#7 closing it as 11336 is green on  stainless.
wzang@ feel free to reopen it if you think otherwise. thanks.
Status: Closed (was: Assigned)
Cc: -wzang@chromium.org lhchavez@chromium.org
Labels: -Pri-1 Pri-0
Owner: risan@google.com
Status: Assigned (was: Closed)
The PFQ is red showing the same error. Escalated this to P0. (Also updated the bug description.)

Assigning to risan@ who was the last person modifying cheets_ContainerMount.py. Is it possible to do a bisect?


Also cc'ed lhchavez@ who is the author of this error message. Do you have more context on this? Thanks!

Description: Show this description
Cc: sammc@google.com dats@google.com slangley@google.com
Adding drivefs owners.
Labels: -Pri-0 Pri-1
CL in #15 is reverted.
I don't understand what this test wants. Should DriveFS (and I guess other FUSE-mounted filesystems and maybe avfs too) change to use pivot_root somewhere or should the test change?
so what needs to happen is that any container in the system (more precisely: any mount namespace that touches /) needs to use pivot_root to avoid accidentally modifying other mount namespaces.

the test is just doing its job of alerting of bad usages of mountns, so it shouldn't need updating.
Owner: benchan@chromium.org
It looks like https://chromium-review.googlesource.com/c/chromiumos/platform2/+/513490/ is responsible for FUSE daemons running in their own mount namespaces so this test would probably complain about ntfs or sshfs mounts too if it ever saw them.
Cc: wzang@chromium.org yusukes@chromium.org
 Issue 911935  has been merged into this issue.
Labels: PFQ-Failures
Cc: -sa...@chromium.org osh...@chromium.org benchan@chromium.org
Owner: sa...@chromium.org
Reassigning to sammc@ to ensure the test is fixed before relanding the CL. (Looks like benchan@ is not working on this?)
Cc: -sammc@google.com sa...@chromium.org
Owner: amistry@chromium.org
Owner: sa...@chromium.org
According to man(2) pivot_root:
"Some of the more obscure uses of pivot_root() may quickly lead to insanity."

It's starting to slowly set in. I better leave before it's too late.
Cc: amistry@chromium.org
Owner: dats@chromium.org
Cc: dats@chromium.org
Components: -Infra>Client>ARC Platform>Apps>ARC
Labels: Target-72 CrOSFilesFeature-ARC Treadstone
Owner: yusukes@chromium.org
Status: Available (was: Assigned)
Summary: cheets_ContainerMount erroneously targets non-ARC processes (was: cheets_ContainerMount: FAIL: The following containers did not call pivot_root(2): drivefs)
This test is ARC-specific and by all signs it shouldn't assert on non-ARC processes, but apparently it was written with assumption that only ARC uses mount namespaces. It must tighten up the list of processes it verifies.
Status: Assigned (was: Available)
Owner: dats@chromium.org
it was intentionally written to assert on non-ARC processes too because there were cases when two unrelated namespaces that did not properly isolate/pivot_root(2) themselves were trampling over each other and causing leaks, mount errors, and general mayhem.

ARC was being affected the most and receiving the blame (since ARC heavily uses namespaces and was the most likely to be affected), hence the test was born. At some point I wanted to promote that test to a non-ARC security test, but I never got around to do so :(
Cc: -lhchavez@chromium.org
Project Member

Comment 32 by bugdroid1@chromium.org, Jan 11

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

commit 1cf9f3d5cac352295f7f06f24b163b8ff80c3421
Author: Sergei Datsenko <dats@google.com>
Date: Fri Jan 11 17:47:58 2019

cros-disks: Call pivot_root for FUSE sandboxes

BUG= chromium:911236 
TEST=unittests, platform_CrosDisksArchive platform_CrosDisksFilesystem platform_CrosDisksSshfs, and manual (check /proc/.../mounts of the process)

Change-Id: I82e78f5e6dcd417900dfbaa14e08f06c0fd2870a
Reviewed-on: https://chromium-review.googlesource.com/1392584
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Sergei Datsenko <dats@chromium.org>
Reviewed-by: Anand Mistry <amistry@chromium.org>

[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/fuse_mounter.h
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/fuse_helper.cc
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/sshfs_helper.cc
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/drivefs_helper.cc
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/ntfs_mounter.cc
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/exfat_mounter.cc
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/fuse_mount_manager_test.cc
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/fuse_mounter.cc
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/sandboxed_process.cc
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/sandboxed_process.h
[modify] https://crrev.com/1cf9f3d5cac352295f7f06f24b163b8ff80c3421/cros-disks/cros-disks.conf

Status: Fixed (was: Assigned)

Sign in to add a comment