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

Issue 679245 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Security



Sign in to add a comment

Desktop web payments crash when closing a tab

Reported by chromium...@gmail.com, Jan 9 2017

Issue description

VERSION
Chrome Version: 57.0.2977.0 (64-bit)
Operating System: Windows 7

REPRODUCTION CASE
1. Run chromium with --enable-experimental-web-platform-features flag.
2. Visit https://rsolomakhin.github.io/pr/iframe/
3. Click on "Buy" button which is inside the first frame and reload the page.
4. Open a new tab and close the original >> Crash.

Backtrace:
        media::WebMediaPlayerImpl::`vcall'{16}' [0x1ACB9D7F+19]
        base::internal::Invoker<base::internal::BindState<void (blink::PaymentRequest::*)(payments::mojom::PaymentErrorReason) __attribute__((thiscall)),blink::WeakPers
istent<blink::PaymentRequest>,payments::mojom::PaymentErrorReason>,void ()>::Run [0x1898D103+113]
        mojo::InterfaceEndpointClient::NotifyError [0x12EF0A8E+510]
        base::MessageLoop::~MessageLoop [0x12D5626B+939]
        base::MessageLoop::~MessageLoop [0x12D539EB+11]
        content::RenderThreadImpl::Shutdown [0x19013760+2636]
        content::ChildProcess::~ChildProcess [0x152680BB+123]
        content::RendererMain [0x18FC51BC+1332] (C:\b\c\b\win_asan_release\src\content\renderer\renderer_main.cc:210)
        content::RunNamedProcessTypeMain [0x12BE0FA4+486] (C:\b\c\b\win_asan_release\src\content\app\content_main_runner.cc:416)
        content::ContentMainRunnerImpl::Run [0x12BE2641+587] (C:\b\c\b\win_asan_release\src\content\app\content_main_runner.cc:793)
        content::ContentMain [0x12BE0B7D+117] (C:\b\c\b\win_asan_release\src\content\app\content_main.cc:20)
        ChromeMain [0x0F7F11FF+511] (C:\b\c\b\win_asan_release\src\chrome\app\chrome_main.cc:112)
        MainDllLoader::Launch [0x00C57B78+702] (C:\b\c\b\win_asan_release\src\chrome\app\main_dll_loader_win.cc:173)
        main [0x00C51944+2372] (C:\b\c\b\win_asan_release\src\chrome\app\chrome_exe_main_win.cc:262)
        __scrt_common_main_seh [0x00E660DE+249] (f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253)
        BaseThreadInitThunk [0x77023677+18]
        RtlInitializeExceptionChain [0x77549D72+99]
        RtlInitializeExceptionChain [0x77549D45+54]
=================================================================
==4652==ERROR: AddressSanitizer: access-violation on unknown address 0x52210054 (pc 0x1acb9d7f bp 0x0045e4b8 sp 0x0045e4b4 T0)
==4652==The signal is caused by a READ memory access.
==4652==*** WARNING: Failed to initialize DbgHelp!              ***
==4652==*** Most likely this means that the app is already      ***
==4652==*** using DbgHelp, possibly with incompatible flags.    ***
==4652==*** Due to technical reasons, symbolization might crash ***
==4652==*** or produce wrong results.                           ***
    #0 0x1acb9d7e  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x1b4c9d7e)
    #1 0x1898d102  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x1919d102)
    #2 0x12ef0a8d  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x13700a8d)
    #3 0x12d5626a  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x1356626a)
    #4 0x12d539ea  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x135639ea)
    #5 0x1901375f  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x1982375f)
    #6 0x152680ba  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x15a780ba)
    #7 0x18fc51bb  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x197d51bb)
    #8 0x12be0fa3  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x133f0fa3)
    #9 0x12be2640  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x133f2640)
    #10 0x12be0b7c  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x133f0b7c)
    #11 0xf7f11fe  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome_child.dll+0x100011fe)
    #12 0xc57b77  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome.exe+0x407b77)
    #13 0xc51943  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome.exe+0x401943)
    #14 0xe660dd  (C:\Users\admin\Desktop\asan-win32-release-440681\chrome.exe+0x6160dd)
    #15 0x77023676  (C:\Windows\syswow64\kernel32.dll+0x7dd73676)
    #16 0x77549d71  (C:\Windows\SysWOW64\ntdll.dll+0x7dea9d71)
    #17 0x77549d44  (C:\Windows\SysWOW64\ntdll.dll+0x7dea9d44)

 

Comment 1 Deleted

Cc: rouslan@chromium.org
Labels: Needs-Feedback
Doesn't crash for me on 57.0.2972.0

Could you please provide a testcase that works without user interaction? It should be easy to automate button-clicking Thanks!

Comment 3 Deleted

mmoroz@, And now I can repro this easly without user interaction.
testcase.html
5.9 KB View Download
This seems like a use-after-free vulnerability. Sorry I cannot get the ASan trace symbolized on Windows.
heap-use-after-free_ASan.txt
10.3 KB View Download
Components: Blink>Media
Labels: Security_Impact-Head M-57 Security_Severity-High OS-Windows Pri-1
Owner: jrumm...@chromium.org
Status: Assigned (was: Unconfirmed)
I reproduced the crash. Over to a media/ owner to take a look. I find it weird that the crashes ends in the WebMediaPlayer when this is a payments request. Is that really expected or did the stack get corrupted? Does this affect stable or just head?
Project Member

Comment 7 by sheriffbot@chromium.org, Jan 17 2017

Labels: ReleaseBlock-Beta
This issue is a security regression. If you are not able to fix this quickly, please revert the change that introduced it.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Doesn't repro on stable.
Components: -Blink>Media Blink>Payments
Owner: ma...@chromium.org
I doubt this has anything to do with media::WebMediaPlayerImpl, since there appears to be no media player involved. I was able to get my local build to crash as well (crash/3ca010fa80000000, SIGSEGV @ 0x00000000), and using objdump this is what I see:

SF0 (chrome + 0x047f8e21)       payments::PaymentRequest::Cancel()	
SF1 (chrome + 0x041f37fc)       payments::PaymentRequestDialog::Cancel()
SF2 (libviews.so + 0x002f92c2)  views::DialogDelegate::Close()
SF3 (libviews.so + 0x002f6dc9)  views::DialogClientView::CanClose()
SF4 (libviews.so + 0x002fb81f)  views::NonClientView::CanClose()
SF5 (libviews.so + 0x002dda0e)  views::Widget::Close()
SF6 (chrome + 0x05d9c0d1)       constrained_window::NativeWebContentsModalDialogManagerViews::Close()
SF7 (chrome + 0x03907499)       web_modal::WebContentsModalDialogManager::DidNavigateMainFrame()
SF8 (chrome + 0x03907714)       web_modal::WebContentsModalDialogManager::WebContentsDestroyed()

Looks like a problem with payments, which makes sense since that is what the repro is testing. Assigning to mathp@ who added the cancel code a few days ago. My guess is that the mojo pipe is already closed when Cancel() tries to use it.

I will note that my crash followed the steps in the initial bug, not the test case in #4. My crash callstack has 100+ entries (on Linux, not Windows), but I only listed the first 9 above.

Any updates on this bug?

A friendly reminder that M57 Beta launch is coming soon on February 2nd! Your bug is labelled as Beta ReleaseBlock, pls make sure to land the fix and get it merged into the release branch (2987) ASAP so it gets enough baking time in Dev (before Beta promotion). Thank you!
Cc: anthonyvd@chromium.org
Components: UI>Browser>Autofill>Payments
Labels: -ReleaseBlock-Beta -Needs-Feedback -M-57
Since you had to enable --enable-experimental-web-platform-feature flag, this does not affect regular users, so it's not a release blocker.

Desktop implementation of web payments is highly experimental, unreleased, and hidden behind a command-line flag. I appreciate you giving it a go, but please don't be alarmed if it does not work quite right yet.

We're working on a similar issue in  http://crbug.com/683731  with a patch in code review at http://crrev.com/2649683002.
Summary: Desktop web payments crash when closing a tab (was: Security: UNKNOWN in media::WebMediaPlayerImpl::`vcall'{16}')
Project Member

Comment 14 by sheriffbot@chromium.org, Jan 23 2017

mathp: Uh oh! This issue still open and hasn't been updated in the last 14 days. This is a serious vulnerability, and we want to ensure that there's progress. Could you please leave an update with the current status and any potential blockers?

If you're not the right owner for this issue, could you please remove yourself as soon as possible or help us find the right one?

If the issue is fixed or you can't reproduce it, please close the bug. If you've started working on a fix, please set the status to Started.

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
Project Member

Comment 15 by sheriffbot@chromium.org, Jan 23 2017

Labels: M-57
Project Member

Comment 16 by sheriffbot@chromium.org, Jan 23 2017

Labels: ReleaseBlock-Beta
This issue is a security regression. If you are not able to fix this quickly, please revert the change that introduced it.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -ReleaseBlock-Beta -M-57 Disable-Nags

Comment 18 by ma...@chromium.org, Jan 23 2017

Status: Started (was: Assigned)
Project Member

Comment 19 by bugdroid1@chromium.org, Jan 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f4bc50e24731fad2ef8ac320f6347aa60fe70532

commit f4bc50e24731fad2ef8ac320f6347aa60fe70532
Author: mathp <mathp@chromium.org>
Date: Tue Jan 24 05:17:50 2017

[Payments] Improve the closing of the PR dialog.

Various changes around the dialog's disappearance.
* The PaymentRequest object, through its delegate, can now close the
  dialog. This will need to happen if the Mojo pipe is closed by the
  renderer (can happen on failure or success of the PR logic).
* Similarly, when the user closes the dialog through an explicit
  action, the PaymentRequest object will inform the renderer and
  subsequently self destruct (this is not new but is improved)
* Some logic is added to avoid cycles: if the dialog is closing and it
  informs PaymentRequest, PaymentRequest will not ask to close it again
  (and vice versa). This is done through closing the bindings.
* abort() is implemented, it currently simply returns onAbort(true) to
  the caller (to be improved).
* As a result of the Mojo connection closing on navigation, reload,
  etc, the dialog will now close too.
* PaymentRequestDialog is renamed PaymentRequestDialogView and
  implements a new interface, PaymentRequestDialog.
* The tests are now a WidgetObserver to be warned of all possible
  closures of the dialog.

BUG= 683731 ,  679245 
TEST=PaymentRequest interactive_ui_tests

Review-Url: https://codereview.chromium.org/2649683002
Cr-Commit-Position: refs/heads/master@{#445652}

[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/payments/chrome_payment_request_delegate.cc
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/payments/chrome_payment_request_delegate.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/browser_dialogs.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/order_summary_view_controller.cc
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/order_summary_view_controller.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_method_view_controller.cc
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_method_view_controller.h
[rename] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_request_dialog_view.cc
[rename] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_request_dialog_view.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_request_interactive_uitest.cc
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.cc
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_request_sheet_controller.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/payment_sheet_view_controller.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/test_chrome_payment_request_delegate.cc
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/chrome/browser/ui/views/payments/test_chrome_payment_request_delegate.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/components/payments/BUILD.gn
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/components/payments/payment_request.cc
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/components/payments/payment_request.h
[modify] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/components/payments/payment_request_delegate.h
[add] https://crrev.com/f4bc50e24731fad2ef8ac320f6347aa60fe70532/components/payments/payment_request_dialog.h

Project Member

Comment 20 by sheriffbot@chromium.org, Jan 24 2017

Labels: M-57
Project Member

Comment 21 by sheriffbot@chromium.org, Jan 24 2017

Labels: ReleaseBlock-Beta
This issue is a security regression. If you are not able to fix this quickly, please revert the change that introduced it.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 22 by ma...@chromium.org, Jan 24 2017

Status: Fixed (was: Started)
Project Member

Comment 23 by sheriffbot@chromium.org, Jan 25 2017

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Since this bug needs to enable --enable-experimental-web-platform-features flag, is it qualified for a chromium security reward? Thanks.
Cc: zkoch@chromium.org
I don't think so, but let me loop in some more people to offer their opinion as well. +Zach.

Comment 26 by zkoch@chromium.org, Jan 27 2017

Cc: awhalley@chromium.org
I'm not familiar with the chrome security award procedures, so adding awhalley, but I suspect this won't qualify as it's behind an experimental flag.
Labels: -ReleaseBlock-Beta -M-57 reward-topanel M-58
If the report caused us to fix a security bug that would have affected stable when we ship the feature then it should be up for consideration. (Unless we're totally sure we would have found it ourselves before shipping).  Adding reward-topanel
Labels: -Security_Severity-High Security_Severity-Medium
Labels: -reward-topanel reward-unpaid reward-500
Thanks for the report! The panel noted the limited use this bug would be to an attacker, but decided to award $500.
Labels: -reward-unpaid reward-inprocess
Project Member

Comment 32 by sheriffbot@chromium.org, May 3 2017

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -UI>Browser>Autofill>Payments UI>Browser>Payments

Sign in to add a comment