[mime_handler] Validate URL during MIME handler fallback re-navigation [chromium/src : main]

0 views
Skip to first unread message

Andy Phan (Gerrit)

unread,
Jul 1, 2026, 6:58:24 PM (7 days ago) Jul 1
to Maksim Sisov, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, extension...@chromium.org, chromium-a...@chromium.org
Attention needed from Maksim Sisov

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Sisov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: I21a70d101dbcbe5878e80bcda7b6316fc579fe35
Gerrit-Change-Number: 8031969
Gerrit-PatchSet: 2
Gerrit-Owner: Andy Phan <andy...@chromium.org>
Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
Gerrit-Reviewer: Maksim Sisov <msi...@igalia.com>
Gerrit-Attention: Maksim Sisov <msi...@igalia.com>
Gerrit-Comment-Date: Wed, 01 Jul 2026 22:58:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Maksim Sisov (Gerrit)

unread,
Jul 2, 2026, 3:04:53 AM (7 days ago) Jul 2
to Andy Phan, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, extension...@chromium.org, chromium-a...@chromium.org
Attention needed from Andy Phan

Maksim Sisov added 1 comment

File chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
Line 181, Patchset 2 (Latest): if (stream_manager && stream_manager->IsPendingNativeFallback(
Maksim Sisov . unresolved

I wonder if this results in 2 abortAndFallbacks.. eg cached body was stored for url A, 3p extension aborted, server redirected to url B, 3p extension loads again but for url B now, server returns body for url B now, built-in extension now loads.

PS I have a pending task to avoid reloading of the embedder and rather reload the mime handler iframe instead avoiding any network requests. That must fix both problems.

Open in Gerrit

Related details

Attention is currently required from:
  • Andy Phan
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: I21a70d101dbcbe5878e80bcda7b6316fc579fe35
    Gerrit-Change-Number: 8031969
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Maksim Sisov <msi...@igalia.com>
    Gerrit-Attention: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Jul 2026 07:04:31 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andy Phan (Gerrit)

    unread,
    Jul 7, 2026, 7:46:17 PM (22 hours ago) Jul 7
    to Maksim Sisov, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, extension...@chromium.org, chromium-a...@chromium.org
    Attention needed from Maksim Sisov

    Andy Phan added 1 comment

    File chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
    Line 181, Patchset 2 (Latest): if (stream_manager && stream_manager->IsPendingNativeFallback(
    Maksim Sisov . unresolved

    I wonder if this results in 2 abortAndFallbacks.. eg cached body was stored for url A, 3p extension aborted, server redirected to url B, 3p extension loads again but for url B now, server returns body for url B now, built-in extension now loads.

    PS I have a pending task to avoid reloading of the embedder and rather reload the mime handler iframe instead avoiding any network requests. That must fix both problems.

    Andy Phan

    I believe so, but this is probably the secure and correct behavior. We can't splice A's cached body into B's navigation, but we also cannot assume B should bypass the 3p extension. This is also likely a rare edge case and won't have large performance impact.

    Unless the task is small and easy to merge, it may be better to proceed with this smaller security fix and merge back.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Maksim Sisov
    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: I21a70d101dbcbe5878e80bcda7b6316fc579fe35
    Gerrit-Change-Number: 8031969
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Maksim Sisov <msi...@igalia.com>
    Gerrit-Attention: Maksim Sisov <msi...@igalia.com>
    Gerrit-Comment-Date: Tue, 07 Jul 2026 23:46:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Maksim Sisov <msi...@igalia.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Maksim Sisov (Gerrit)

    unread,
    5:28 AM (12 hours ago) 5:28 AM
    to Andy Phan, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, extension...@chromium.org, chromium-a...@chromium.org
    Attention needed from Andy Phan

    Maksim Sisov voted and added 1 comment

    Votes added by Maksim Sisov

    Code-Review+1

    1 comment

    File chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
    Line 181, Patchset 2 (Latest): if (stream_manager && stream_manager->IsPendingNativeFallback(
    Maksim Sisov . resolved

    I wonder if this results in 2 abortAndFallbacks.. eg cached body was stored for url A, 3p extension aborted, server redirected to url B, 3p extension loads again but for url B now, server returns body for url B now, built-in extension now loads.

    PS I have a pending task to avoid reloading of the embedder and rather reload the mime handler iframe instead avoiding any network requests. That must fix both problems.

    Andy Phan

    I believe so, but this is probably the secure and correct behavior. We can't splice A's cached body into B's navigation, but we also cannot assume B should bypass the 3p extension. This is also likely a rare edge case and won't have large performance impact.

    Unless the task is small and easy to merge, it may be better to proceed with this smaller security fix and merge back.

    Maksim Sisov

    sounds good.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andy Phan
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I21a70d101dbcbe5878e80bcda7b6316fc579fe35
      Gerrit-Change-Number: 8031969
      Gerrit-PatchSet: 2
      Gerrit-Owner: Andy Phan <andy...@chromium.org>
      Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
      Gerrit-Reviewer: Maksim Sisov <msi...@igalia.com>
      Gerrit-Attention: Andy Phan <andy...@chromium.org>
      Gerrit-Comment-Date: Wed, 08 Jul 2026 09:28:06 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Andy Phan <andy...@chromium.org>
      Comment-In-Reply-To: Maksim Sisov <msi...@igalia.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Andy Phan (Gerrit)

      unread,
      3:58 PM (2 hours ago) 3:58 PM
      to Lei Zhang, Devlin Cronin, Maksim Sisov, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, extension...@chromium.org, chromium-a...@chromium.org
      Attention needed from Devlin Cronin and Lei Zhang

      Andy Phan added 1 comment

      Patchset-level comments
      File-level comment, Patchset 2:
      Andy Phan . resolved

      +thestig@ for //chrome
      +rdevlin.cronin@ for //extensions/browser/api/mime_handler/mime_handler_api_unittest.cc

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Devlin Cronin
      • Lei Zhang
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I21a70d101dbcbe5878e80bcda7b6316fc579fe35
      Gerrit-Change-Number: 8031969
      Gerrit-PatchSet: 3
      Gerrit-Owner: Andy Phan <andy...@chromium.org>
      Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
      Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
      Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
      Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
      Gerrit-Attention: Lei Zhang <the...@chromium.org>
      Gerrit-Comment-Date: Wed, 08 Jul 2026 19:57:38 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Lei Zhang (Gerrit)

      unread,
      4:11 PM (2 hours ago) 4:11 PM
      to Andy Phan, Lei Zhang, Devlin Cronin, Maksim Sisov, Chromium LUCI CQ, chromium...@chromium.org, android-bu...@system.gserviceaccount.com, extension...@chromium.org, chromium-a...@chromium.org
      Attention needed from Andy Phan and Devlin Cronin

      Lei Zhang voted and added 2 comments

      Votes added by Lei Zhang

      Code-Review+1

      2 comments

      Commit Message
      Line 15, Patchset 3 (Latest):reload was redirected (e.g. HTTP 302) to a different origin, the
      attacker's cached body could be spliced under the victim's URL, leading
      Lei Zhang . unresolved

      Maybe this can be "a hostile 3P extension" to clarify who the attacker is?

      File chrome/browser/extensions/api/mime_handlers/mime_handler_fallback_browsertest.cc
      Line 430, Patchset 3 (Latest): EXPECT_GT(page_count, 1);
      Lei Zhang . unresolved

      Just check for exactly 3 pages here?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andy Phan
      • Devlin Cronin
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: I21a70d101dbcbe5878e80bcda7b6316fc579fe35
        Gerrit-Change-Number: 8031969
        Gerrit-PatchSet: 3
        Gerrit-Owner: Andy Phan <andy...@chromium.org>
        Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
        Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
        Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
        Gerrit-Reviewer: Maksim Sisov <msi...@igalia.com>
        Gerrit-Attention: Andy Phan <andy...@chromium.org>
        Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
        Gerrit-Comment-Date: Wed, 08 Jul 2026 20:10:36 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages