remoting multi-process Linux: Fix crash reporting [chromium/src : main]

0 views
Skip to first unread message

Yuwei Huang (Gerrit)

unread,
Apr 2, 2026, 11:20:45 PM (18 hours ago) Apr 2
to Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
Attention needed from Joe Downing

Yuwei Huang voted and added 1 comment

Votes added by Yuwei Huang

Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Yuwei Huang . resolved

PTAL thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Joe Downing
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ifb0e95f2789cf49b7fb3d464de7e6253a086a0eb
Gerrit-Change-Number: 7728566
Gerrit-PatchSet: 6
Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
Gerrit-Attention: Joe Downing <joe...@chromium.org>
Gerrit-Comment-Date: Fri, 03 Apr 2026 03:20:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Yuwei Huang (Gerrit)

unread,
Apr 2, 2026, 11:47:45 PM (17 hours ago) Apr 2
to Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
Attention needed from Joe Downing

Yuwei Huang added 1 comment

File remoting/base/crash/crashpad_database_manager.cc
Line 60, Patchset 6 (Latest): return base::FilePath("/tmp/chromoting.crashpad." + username);
Yuwei Huang . unresolved

AI makes the following suggestion, which makes sense to me. I'll think more about this:

---

Using a predictable directory name in a world-writable location like `/tmp` is a security vulnerability (CWE-377). Any local user can pre-create this directory or use a symlink to perform a denial-of-service, read other users' crash dumps (which may contain sensitive memory), or potentially gain privilege escalation.

For regular user processes, they have a home directory, so consider using a path within it (e.g. `~/.config/chrome-remote-desktop/crashpad`). For system/network daemon processes, consider using a secure system directory like `/var/log/chromoting/` or `/var/lib/chrome-remote-desktop/` with appropriate restrictive permissions.

Open in Gerrit

Related details

Attention is currently required from:
  • Joe Downing
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ifb0e95f2789cf49b7fb3d464de7e6253a086a0eb
    Gerrit-Change-Number: 7728566
    Gerrit-PatchSet: 6
    Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Attention: Joe Downing <joe...@chromium.org>
    Gerrit-Comment-Date: Fri, 03 Apr 2026 03:47:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yuwei Huang (Gerrit)

    unread,
    Apr 2, 2026, 11:47:56 PM (17 hours ago) Apr 2
    to Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org

    Yuwei Huang removed Joe Downing from this change

    Deleted Reviewers:
    • Joe Downing
    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: deleteReviewer
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ifb0e95f2789cf49b7fb3d464de7e6253a086a0eb
    Gerrit-Change-Number: 7728566
    Gerrit-PatchSet: 6
    Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yuwei Huang (Gerrit)

    unread,
    4:55 AM (12 hours ago) 4:55 AM
    to Lambros Lambrou, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
    Attention needed from Lambros Lambrou

    Yuwei Huang voted and added 2 comments

    Votes added by Yuwei Huang

    Auto-Submit+1

    2 comments

    Patchset-level comments
    Yuwei Huang . resolved

    PTAL thanks!

    File remoting/base/crash/crashpad_database_manager.cc
    Line 60, Patchset 6: return base::FilePath("/tmp/chromoting.crashpad." + username);
    Yuwei Huang . resolved

    AI makes the following suggestion, which makes sense to me. I'll think more about this:

    ---

    Using a predictable directory name in a world-writable location like `/tmp` is a security vulnerability (CWE-377). Any local user can pre-create this directory or use a symlink to perform a denial-of-service, read other users' crash dumps (which may contain sensitive memory), or potentially gain privilege escalation.

    For regular user processes, they have a home directory, so consider using a path within it (e.g. `~/.config/chrome-remote-desktop/crashpad`). For system/network daemon processes, consider using a secure system directory like `/var/log/chromoting/` or `/var/lib/chrome-remote-desktop/` with appropriate restrictive permissions.

    Yuwei Huang

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lambros Lambrou
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ifb0e95f2789cf49b7fb3d464de7e6253a086a0eb
      Gerrit-Change-Number: 7728566
      Gerrit-PatchSet: 10
      Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
      Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
      Gerrit-CC: Joe Downing <joe...@chromium.org>
      Gerrit-Attention: Lambros Lambrou <lambros...@chromium.org>
      Gerrit-Comment-Date: Fri, 03 Apr 2026 08:55:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Yuwei Huang <yuw...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Joe Downing (Gerrit)

      unread,
      1:06 PM (4 hours ago) 1:06 PM
      to Yuwei Huang, Lambros Lambrou, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
      Attention needed from Lambros Lambrou and Yuwei Huang

      Joe Downing added 4 comments

      File remoting/base/crash/crashpad_database_manager.cc
      Line 79, Patchset 11 (Latest): PLOG(ERROR) << "Failed to chown " << path << " to "
      << GetNetworkProcessUsername();
      return;
      }
      // Make sure the directory is only accessible by the network process.
      if (HANDLE_EINTR(chmod(path.value().c_str(), 0700)) != 0) {
      PLOG(ERROR) << "Failed to chmod " << path;
      Joe Downing . unresolved

      Should we delete the directory if we fail to secure it?

      Line 117, Patchset 11 (Latest): // Use /tmp as a fallback. This is susceptible to CWE-377.
      return base::FilePath("/tmp/crd_crashpad_" + username);
      Joe Downing . unresolved

      Maybe it's best to not log crashes at all in this case, WDYT?

      File remoting/host/usage_stats_consent_linux.cc
      Line 36, Patchset 11 (Latest): base::TrimWhitespaceASCII(consent_content, base::TRIM_ALL) == "true";
      Joe Downing . unresolved

      I'm fine landing this as-is for testing and such but I'm wondering if this should be a JSON file instead.

      One of the interesting differences between Crashpad and Breakpad is that you have more control over how and when crash reports are sent for Crashpad. I'm not sure whether we'll need to extend the file to use it in this way or not but starting with a JSON format will allow us to extend it in the future if we choose to.

      Line 71, Patchset 11 (Latest):bool SetUsageStatsConsent(bool allowed) {
      NOTIMPLEMENTED();
      Joe Downing . unresolved

      Are you going to implement this function in a follow-up?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Lambros Lambrou
      • Yuwei Huang
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ifb0e95f2789cf49b7fb3d464de7e6253a086a0eb
        Gerrit-Change-Number: 7728566
        Gerrit-PatchSet: 11
        Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
        Gerrit-CC: Joe Downing <joe...@chromium.org>
        Gerrit-Attention: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Comment-Date: Fri, 03 Apr 2026 17:06:42 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Joe Downing (Gerrit)

        unread,
        1:08 PM (4 hours ago) 1:08 PM
        to Yuwei Huang, Lambros Lambrou, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
        Attention needed from Lambros Lambrou and Yuwei Huang

        Joe Downing added 1 comment

        Patchset-level comments
        File-level comment, Patchset 11 (Latest):
        Joe Downing . resolved

        Oh sorry, I saw this and assumed I was the requested reviewer since I worked with Gary on the original Crashpad impl : )

        Gerrit-Comment-Date: Fri, 03 Apr 2026 17:07:55 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Yuwei Huang (Gerrit)

        unread,
        2:40 PM (3 hours ago) 2:40 PM
        to Joe Downing, Lambros Lambrou, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
        Attention needed from Joe Downing and Lambros Lambrou

        Yuwei Huang voted and added 1 comment

        Votes added by Yuwei Huang

        Auto-Submit+1

        1 comment

        Patchset-level comments
        Joe Downing . resolved

        Oh sorry, I saw this and assumed I was the requested reviewer since I worked with Gary on the original Crashpad impl : )

        Yuwei Huang

        No worry! I did originally added you as the reviewer, but then I had to do a lot of Linux specific changes in this CL so I made Lambros the reviewer. I've added you as the reviewer now :)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joe Downing
        • Lambros Lambrou
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ifb0e95f2789cf49b7fb3d464de7e6253a086a0eb
        Gerrit-Change-Number: 7728566
        Gerrit-PatchSet: 11
        Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
        Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Attention: Joe Downing <joe...@chromium.org>
        Gerrit-Attention: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Comment-Date: Fri, 03 Apr 2026 18:39:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Joe Downing <joe...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Yuwei Huang (Gerrit)

        unread,
        3:25 PM (2 hours ago) 3:25 PM
        to Joe Downing, Lambros Lambrou, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
        Attention needed from Joe Downing and Lambros Lambrou

        Yuwei Huang voted Auto-Submit+0

        Auto-Submit+0
        Gerrit-Comment-Date: Fri, 03 Apr 2026 19:25:34 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Lambros Lambrou (Gerrit)

        unread,
        4:00 PM (1 hour ago) 4:00 PM
        to Yuwei Huang, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
        Attention needed from Joe Downing

        Lambros Lambrou added 2 comments

        Commit Message
        Line 14, Patchset 11 (Latest):* Daemon/root: /etc/chrome-remote-desktop/crashpad.daemon
        Lambros Lambrou . unresolved

        I don't think the FHS allows this. Several backup and config tools assume that `/etc/` contains only static text files or scripts.

        Can we use `/var/lib/chrome-remote-desktop/` instead? We can put large binary crash dumps and UNIX domain sockets there.

        The pairing registry (if it is plain text/JSON, not binary protobufs) can stay under `/etc/`, or it could go under `/var/` with the other files.

        File remoting/base/crash/crashpad_database_manager.cc
        Line 117, Patchset 11 (Latest): // Use /tmp as a fallback. This is susceptible to CWE-377.
        return base::FilePath("/tmp/crd_crashpad_" + username);
        Joe Downing . unresolved

        Maybe it's best to not log crashes at all in this case, WDYT?

        Lambros Lambrou

        I don't think `/tmp` is a good place for large crash dumps. Some systems might mount `/tmp` on a RAM-based filesystem.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joe Downing
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ifb0e95f2789cf49b7fb3d464de7e6253a086a0eb
        Gerrit-Change-Number: 7728566
        Gerrit-PatchSet: 11
        Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
        Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Attention: Joe Downing <joe...@chromium.org>
        Gerrit-Comment-Date: Fri, 03 Apr 2026 19:59:54 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Joe Downing <joe...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Joe Downing (Gerrit)

        unread,
        4:05 PM (1 hour ago) 4:05 PM
        to Yuwei Huang, Lambros Lambrou, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org
        Attention needed from Yuwei Huang

        Joe Downing added 1 comment

        File remoting/base/crash/crashpad_database_manager.cc
        Line 117, Patchset 11 (Latest): // Use /tmp as a fallback. This is susceptible to CWE-377.
        return base::FilePath("/tmp/crd_crashpad_" + username);
        Joe Downing . unresolved

        Maybe it's best to not log crashes at all in this case, WDYT?

        Lambros Lambrou

        I don't think `/tmp` is a good place for large crash dumps. Some systems might mount `/tmp` on a RAM-based filesystem.

        Joe Downing

        IIRC we only collect minidumps so it's not a big issue, we used to place the crash files in /tmp with Breakpad. I'm mostly concerned about using a fallback which may have an exploit since crash collection is best effort anyway.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Yuwei Huang
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ifb0e95f2789cf49b7fb3d464de7e6253a086a0eb
        Gerrit-Change-Number: 7728566
        Gerrit-PatchSet: 11
        Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Reviewer: Joe Downing <joe...@chromium.org>
        Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Comment-Date: Fri, 03 Apr 2026 20:05:45 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Lambros Lambrou <lambros...@chromium.org>
        Comment-In-Reply-To: Joe Downing <joe...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages