Verify sessionId in incoming protocol messages from renderer [chromium/src : main]

1 view
Skip to first unread message

Danil Somsikov (Gerrit)

unread,
Apr 14, 2026, 2:53:54 AMApr 14
to devtools...@chromium.org, Andrey Kosyakov, chromiu...@luci-project-accounts.iam.gserviceaccount.com, android-bu...@system.gserviceaccount.com
Attention needed from Andrey Kosyakov

Danil Somsikov voted and added 2 comments

Votes added by Danil Somsikov

Auto-Submit+1

2 comments

Patchset-level comments
File-level comment, Patchset 3:
Danil Somsikov . resolved

Andrey, wdyt? Is it worth it?

Danil Somsikov

Resolved

Commit Message
Line 7, Patchset 4:Forcefully inject sessionId into child DevTools session messages
Andrey Kosyakov . resolved

The sessionId should already be put there by a child, so rather than injecting it, perhaps we can validate that a correct id is there and kill the child for bad IPC if it's not? Perhaps this would be both cheaper to implement and prevent a compromised renderer from trying other paths?

Danil Somsikov

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Andrey Kosyakov
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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
Gerrit-Change-Number: 7718168
Gerrit-PatchSet: 14
Gerrit-Owner: Danil Somsikov <d...@chromium.org>
Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
Gerrit-Comment-Date: Tue, 14 Apr 2026 06:53:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
Comment-In-Reply-To: Danil Somsikov <d...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Danil Somsikov (Gerrit)

unread,
Apr 14, 2026, 2:54:01 AMApr 14
to devtools...@chromium.org, Andrey Kosyakov, chromiu...@luci-project-accounts.iam.gserviceaccount.com, android-bu...@system.gserviceaccount.com
Attention needed from Andrey Kosyakov

Danil Somsikov voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Andrey Kosyakov
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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
Gerrit-Change-Number: 7718168
Gerrit-PatchSet: 15
Gerrit-Comment-Date: Tue, 14 Apr 2026 06:53:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Andrey Kosyakov (Gerrit)

unread,
Apr 16, 2026, 7:45:04 PMApr 16
to Danil Somsikov, Code Review Nudger, devtools...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com
Attention needed from Danil Somsikov

Andrey Kosyakov added 4 comments

File content/browser/devtools/devtools_session.cc
Line 557, Patchset 18 (Latest): crdtp::cbor::CBORTokenizer tokenizer(crdtp::SpanFrom(message));
Andrey Kosyakov . unresolved

That's a bit scary logic to have in such a place! In general, something using tokenizer so extensively belongs to crdtp (see `AppendString8EntryToCBORMap()` for example), but I think here we can do without dedicated low-level code and go with existent form of lazy patching. One option would be using a (Dispatchable)[https://source.chromium.org/chromium/chromium/src/+/main:third_party/inspector_protocol/crdtp/dispatch.h;bpv=1;bpt=1], another would be utilizing protocol core support for deferred messages, please see an [example here](https://source.chromium.org/chromium/chromium/src/+/main:v8/third_party/inspector_protocol/crdtp/protocol_core_test.cc;l=421).

Line 711, Patchset 18 (Latest): message->data = mojo_base::BigBuffer(cbor);
Andrey Kosyakov . unresolved

Is there a reason we're not doing this on the test side? The less test-specific code we have in the prod files the better. Let's just make it a trivial wrapper around DispatchProtocolNotification, i.e. `DispatchProtocolNotificationForTesting(blink::mojom::DevToolsMessagePtr message)`, and handle json-to-cbor business on the test side.

Line 781, Patchset 18 (Latest): for (DevToolsSession* root_session : host->sessions_) {
Andrey Kosyakov . unresolved

Can we just extract `DevToolsAgentHostImpl::GetSessionForTesting()` and move the rest of the logic to the test side? This would also let us get rid of on_before_dispatch, as you would be able to straigthen the logic on the test side:

  • find session
  • get agent host and process host
  • dispatch the message.
Line 790, Patchset 18 (Latest): if (!session) {
Andrey Kosyakov . unresolved

Is there a meaningful scneario where we would hit that? Perhaps CHECK() instead?

Open in Gerrit

Related details

Attention is currently required from:
  • Danil Somsikov
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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
    Gerrit-Change-Number: 7718168
    Gerrit-PatchSet: 18
    Gerrit-Owner: Danil Somsikov <d...@chromium.org>
    Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
    Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Comment-Date: Thu, 16 Apr 2026 23:44:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Danil Somsikov (Gerrit)

    unread,
    Apr 18, 2026, 4:56:32 PMApr 18
    to Code Review Nudger, devtools...@chromium.org, Andrey Kosyakov, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com
    Attention needed from Andrey Kosyakov

    Danil Somsikov voted and added 4 comments

    Votes added by Danil Somsikov

    Auto-Submit+1
    Commit-Queue+1

    4 comments

    File content/browser/devtools/devtools_session.cc
    Line 557, Patchset 18: crdtp::cbor::CBORTokenizer tokenizer(crdtp::SpanFrom(message));
    Andrey Kosyakov . resolved

    That's a bit scary logic to have in such a place! In general, something using tokenizer so extensively belongs to crdtp (see `AppendString8EntryToCBORMap()` for example), but I think here we can do without dedicated low-level code and go with existent form of lazy patching. One option would be using a (Dispatchable)[https://source.chromium.org/chromium/chromium/src/+/main:third_party/inspector_protocol/crdtp/dispatch.h;bpv=1;bpt=1], another would be utilizing protocol core support for deferred messages, please see an [example here](https://source.chromium.org/chromium/chromium/src/+/main:v8/third_party/inspector_protocol/crdtp/protocol_core_test.cc;l=421).

    Danil Somsikov

    Done

    Line 711, Patchset 18: message->data = mojo_base::BigBuffer(cbor);
    Andrey Kosyakov . resolved

    Is there a reason we're not doing this on the test side? The less test-specific code we have in the prod files the better. Let's just make it a trivial wrapper around DispatchProtocolNotification, i.e. `DispatchProtocolNotificationForTesting(blink::mojom::DevToolsMessagePtr message)`, and handle json-to-cbor business on the test side.

    Danil Somsikov

    Done

    Line 781, Patchset 18: for (DevToolsSession* root_session : host->sessions_) {
    Andrey Kosyakov . resolved

    Can we just extract `DevToolsAgentHostImpl::GetSessionForTesting()` and move the rest of the logic to the test side? This would also let us get rid of on_before_dispatch, as you would be able to straigthen the logic on the test side:

    • find session
    • get agent host and process host
    • dispatch the message.
    Danil Somsikov

    Done

    Line 790, Patchset 18: if (!session) {
    Andrey Kosyakov . resolved

    Is there a meaningful scneario where we would hit that? Perhaps CHECK() instead?

    Danil Somsikov

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrey Kosyakov
    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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
      Gerrit-Change-Number: 7718168
      Gerrit-PatchSet: 22
      Gerrit-Owner: Danil Somsikov <d...@chromium.org>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Comment-Date: Sat, 18 Apr 2026 20:56:11 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Andrey Kosyakov (Gerrit)

      unread,
      Apr 22, 2026, 9:56:00 PM (12 days ago) Apr 22
      to Danil Somsikov, Code Review Nudger, devtools...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com
      Attention needed from Danil Somsikov

      Andrey Kosyakov added 4 comments

      File content/browser/devtools/devtools_session.cc
      Line 740, Patchset 25 (Latest):DevToolsSession* DevToolsSession::GetSessionById(const std::string& session_id) {
      Andrey Kosyakov . unresolved

      So all the class methods are just trivial wrappers now? Can we get rid of the class and expose ....ForTesting() methods directly as we do elsewhere please?

      Line 754, Patchset 25 (Latest): crdtp::json::ConvertJSONToCBOR(crdtp::SpanFrom(json), &cbor);
      Andrey Kosyakov . unresolved

      This one can certainly be done directly in the test.

      File third_party/inspector_protocol/crdtp/cbor.h
      File-level comment, Patchset 25 (Latest):
      Andrey Kosyakov . unresolved

      Please note this is a rolled dependency, this needs to be landed upstream in crdtp and rolled here.

      File third_party/inspector_protocol/crdtp/cbor.cc
      Line 1078, Patchset 25 (Latest):span<uint8_t> GetString8ValueFromMap(span<uint8_t> message,
      Andrey Kosyakov . unresolved

      Please also provide a unit test for this.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Danil Somsikov
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
      Gerrit-Change-Number: 7718168
      Gerrit-PatchSet: 25
      Gerrit-Owner: Danil Somsikov <d...@chromium.org>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Danil Somsikov <d...@chromium.org>
      Gerrit-Comment-Date: Thu, 23 Apr 2026 01:55:53 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Danil Somsikov (Gerrit)

      unread,
      Apr 24, 2026, 3:13:59 AM (11 days ago) Apr 24
      to Code Review Nudger, devtools...@chromium.org, Andrey Kosyakov, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com
      Attention needed from Andrey Kosyakov

      Danil Somsikov voted and added 4 comments

      Votes added by Danil Somsikov

      Auto-Submit+1
      Commit-Queue+1

      4 comments

      File content/browser/devtools/devtools_session.cc
      Line 740, Patchset 25:DevToolsSession* DevToolsSession::GetSessionById(const std::string& session_id) {
      Andrey Kosyakov . resolved

      So all the class methods are just trivial wrappers now? Can we get rid of the class and expose ....ForTesting() methods directly as we do elsewhere please?

      Danil Somsikov

      Done

      Line 754, Patchset 25: crdtp::json::ConvertJSONToCBOR(crdtp::SpanFrom(json), &cbor);
      Andrey Kosyakov . resolved

      This one can certainly be done directly in the test.

      Danil Somsikov

      Done

      File third_party/inspector_protocol/crdtp/cbor.h
      File-level comment, Patchset 25:
      Andrey Kosyakov . resolved

      Please note this is a rolled dependency, this needs to be landed upstream in crdtp and rolled here.

      Danil Somsikov
      File third_party/inspector_protocol/crdtp/cbor.cc
      Line 1078, Patchset 25:span<uint8_t> GetString8ValueFromMap(span<uint8_t> message,
      Andrey Kosyakov . resolved

      Please also provide a unit test for this.

      Danil Somsikov

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrey Kosyakov
      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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
      Gerrit-Change-Number: 7718168
      Gerrit-PatchSet: 44
      Gerrit-Owner: Danil Somsikov <d...@chromium.org>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Comment-Date: Fri, 24 Apr 2026 07:13:45 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Danil Somsikov (Gerrit)

      unread,
      Apr 30, 2026, 11:28:09 AM (4 days ago) Apr 30
      to Code Review Nudger, devtools...@chromium.org, Andrey Kosyakov, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com
      Attention needed from Andrey Kosyakov

      Danil Somsikov voted

      Auto-Submit+1
      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrey Kosyakov
      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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
      Gerrit-Change-Number: 7718168
      Gerrit-PatchSet: 46
      Gerrit-Owner: Danil Somsikov <d...@chromium.org>
      Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Andrey Kosyakov <ca...@chromium.org>
      Gerrit-Comment-Date: Thu, 30 Apr 2026 15:27:57 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Andrey Kosyakov (Gerrit)

      unread,
      Apr 30, 2026, 3:28:33 PM (4 days ago) Apr 30
      to Danil Somsikov, Code Review Nudger, devtools...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com
      Attention needed from Danil Somsikov

      Andrey Kosyakov voted and added 1 comment

      Votes added by Andrey Kosyakov

      Code-Review+1

      1 comment

      File content/browser/devtools/protocol/devtools_protocol_browsertest.cc
      File-level comment, Patchset 46 (Latest):
      Andrey Kosyakov . unresolved

      Hmm.. What happened to the tests though?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Danil Somsikov
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement 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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
        Gerrit-Change-Number: 7718168
        Gerrit-PatchSet: 46
        Gerrit-Owner: Danil Somsikov <d...@chromium.org>
        Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
        Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Attention: Danil Somsikov <d...@chromium.org>
        Gerrit-Comment-Date: Thu, 30 Apr 2026 19:28:17 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Danil Somsikov (Gerrit)

        unread,
        Apr 30, 2026, 3:37:27 PM (4 days ago) Apr 30
        to Andrey Kosyakov, Code Review Nudger, devtools...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com

        Danil Somsikov voted and added 1 comment

        Votes added by Danil Somsikov

        Auto-Submit+1

        1 comment

        File content/browser/devtools/protocol/devtools_protocol_browsertest.cc
        File-level comment, Patchset 46:
        Andrey Kosyakov . resolved

        Hmm.. What happened to the tests though?

        Danil Somsikov

        Not sure, restored.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
          Gerrit-Change-Number: 7718168
          Gerrit-PatchSet: 47
          Gerrit-Owner: Danil Somsikov <d...@chromium.org>
          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Comment-Date: Thu, 30 Apr 2026 19:37:04 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Andrey Kosyakov <ca...@chromium.org>
          satisfied_requirement
          open
          diffy

          Danil Somsikov (Gerrit)

          unread,
          Apr 30, 2026, 3:37:27 PM (4 days ago) Apr 30
          to Andrey Kosyakov, Code Review Nudger, devtools...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com

          Danil Somsikov voted Commit-Queue+2

          Commit-Queue+2
          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
          Gerrit-Change-Number: 7718168
          Gerrit-PatchSet: 47
          Gerrit-Owner: Danil Somsikov <d...@chromium.org>
          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Comment-Date: Thu, 30 Apr 2026 19:37:09 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Danil Somsikov (Gerrit)

          unread,
          Apr 30, 2026, 4:15:19 PM (4 days ago) Apr 30
          to Andrey Kosyakov, Code Review Nudger, devtools...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com

          Danil Somsikov voted Commit-Queue+2

          Commit-Queue+2
          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
          Gerrit-Change-Number: 7718168
          Gerrit-PatchSet: 48
          Gerrit-Owner: Danil Somsikov <d...@chromium.org>
          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Comment-Date: Thu, 30 Apr 2026 20:14:58 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Danil Somsikov (Gerrit)

          unread,
          11:06 AM (5 hours ago) 11:06 AM
          to Andrey Kosyakov, Code Review Nudger, devtools...@chromium.org, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com

          Danil Somsikov voted Commit-Queue+2

          Commit-Queue+2
          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I7667858f0b3f7de56c6a3242ba01a079840ac55b
          Gerrit-Change-Number: 7718168
          Gerrit-PatchSet: 54
          Gerrit-Owner: Danil Somsikov <d...@chromium.org>
          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Comment-Date: Mon, 04 May 2026 15:06:39 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          12:52 PM (3 hours ago) 12:52 PM
          to Danil Somsikov, Andrey Kosyakov, Code Review Nudger, devtools...@chromium.org, android-bu...@system.gserviceaccount.com

          Chromium LUCI CQ submitted the change with unreviewed changes

          Unreviewed changes

          46 is the latest approved patch-set.
          The change was submitted with unreviewed changes in the following files:

          ```
          The name of the file: content/browser/devtools/protocol/devtools_protocol_browsertest.cc
          Insertions: 182, Deletions: 0.

          The diff is too large to show. Please review the diff.
          ```
          ```
          The name of the file: content/browser/devtools/devtools_session.h
          Insertions: 1, Deletions: 2.

          The diff is too large to show. Please review the diff.
          ```
          ```
          The name of the file: content/browser/devtools/devtools_session.cc
          Insertions: 52, Deletions: 39.

          The diff is too large to show. Please review the diff.
          ```

          Change information

          Commit message:
          Verify sessionId in incoming protocol messages from renderer

          In DevTools "flattened" protocol mode, the renderer process is responsible
          for including the correct sessionId in every protocol response and
          notification. Previously, the browser process forwarded these messages to
          the client without verification. A compromised renderer could deliberately
          omit or spoof the sessionId, potentially allowing it to inject events into
          the root session or other child sessions.

          This CL fixes the vulnerability by having the browser process verify the
          sessionId of every protocol message originating from a renderer-side
          session. If the sessionId is missing, incorrect, or unexpectedly present
          (in the case of the root session), the browser now considers the renderer
          compromised and terminates it using bad_message::ReceivedBadMessage.
          Bug: 497532918
          Change-Id: I7667858f0b3f7de56c6a3242ba01a079840ac55b
          Auto-Submit: Danil Somsikov <d...@chromium.org>
          Commit-Queue: Danil Somsikov <d...@chromium.org>
          Reviewed-by: Andrey Kosyakov <ca...@chromium.org>
          Cr-Commit-Position: refs/heads/main@{#1624769}
          Files:
          • M content/browser/devtools/devtools_agent_host_impl.cc
          • M content/browser/devtools/devtools_agent_host_impl.h
          • M content/browser/devtools/devtools_session.cc
          • M content/browser/devtools/devtools_session.h
          • M content/browser/devtools/protocol/devtools_protocol_browsertest.cc
          • M content/test/BUILD.gn
          Change size: L
          Delta: 6 files changed, 291 insertions(+), 4 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Andrey Kosyakov
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I7667858f0b3f7de56c6a3242ba01a079840ac55b
          Gerrit-Change-Number: 7718168
          Gerrit-PatchSet: 55
          Gerrit-Owner: Danil Somsikov <d...@chromium.org>
          Gerrit-Reviewer: Andrey Kosyakov <ca...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages