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

Issue 698622 link

Starred by 5 users

UaF outside the sandbox (Print in onunload)

Reported by wadih.ma...@gmail.com, Mar 6 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Steps to reproduce the problem:
1. Open http://localhost/poc.html

What is the expected behavior?
No crash should occur.

What went wrong?
When the cross process navigation occurs, the onunload event of the iframe calls print() and PrintPreviewHandler::HandleGetPreview is called and manipulates freed memory (see stacktrace.txt).

This bug is in the browser process, outside the sandbox.

Did this work before? N/A 

Chrome version: 56.0.2924.87  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:

 
poc.zip
2.8 KB Download
Project Member

Comment 1 by ClusterFuzz, Mar 6 2017

ClusterFuzz is analyzing your testcase. Developers can follow the progress at https://cluster-fuzz.appspot.com/testcase?key=5314343278477312
Project Member

Comment 2 by ClusterFuzz, Mar 6 2017

ClusterFuzz is analyzing your testcase. Developers can follow the progress at https://cluster-fuzz.appspot.com/testcase?key=5808830782111744
Summary: UaF outside the sandbox (Print in onunload) (was: UaF outside the sandbox)
This sounds similar to Issue 646671

Comment 4 by vakh@chromium.org, Mar 6 2017

Cc: thestig@chromium.org
Components: Internals>Printing
Labels: OS-Linux
Owner: dcheng@chromium.org
dcheng@ -- do you want to take a stab at this or help find the owner?
thestig@ -- your CL touched that line last: http://crrev.com/2508923003

Comment 5 by vakh@chromium.org, Mar 6 2017

Status: Assigned (was: Unconfirmed)
Project Member

Comment 6 by ClusterFuzz, Mar 7 2017

Labels: Security_Severity-Critical
Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5314343278477312

Job Type: linux_asan_chrome_mp
Crash Type: Heap-use-after-free READ 8
Crash Address: 0x61a00009fc88
Crash State:
  PrintPreviewHandler::HandleGetPreview
  content::WebUIImpl::ProcessWebUIMessage
  bool IPC::MessageT<ViewHostMsg_WebUISend_Meta, std::__1::tuple<GURL, std::__1::b
  
Sanitizer: address (ASAN)

Recommended Security Severity: Critical

Reproducer Testcase: https://cluster-fuzz.appspot.com/download/AMIfv978LCtynPSNHrJmwFLvN_iGTF0JhMNfDZcyecn9cXI8_1-ecgLZjKkHFu8qrc7xjFTY-pFUAQY_sCo6BarVQ_tGKLW_4VseqH4IyMPyGfbsDozSprLVCM8kxFo27xGLETnb0J3uIH9x0MmrreJWa3I7iRZ2MSbFnF6x3Mdriykete3VNE0xWZZG2ptD08p0d12r0MxKZ_ODhpeKfXVGmr47u_zC4f1ZC0AIKzQEi9ERMvobSqQ1tcUyykaUSylA_cIrJQffRlyYUcGUGZZ6cLdhtmMWJFdRgT01o65lkXkUQfn1RmMWNNSw5MMxYcAbSi2kwKJW1BzYKRUbqMrcsB6ziIvRvseit6amcUt_K_ewoNCrOuo?testcase_id=5314343278477312


See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.

A recommended severity was added to this bug. Please change the severity if it is inaccurate.

Project Member

Comment 7 by sheriffbot@chromium.org, Mar 7 2017

Labels: -Pri-2 Pri-0
This looks like  bug 694382 , actually.
Cc: -thestig@chromium.org dcheng@chromium.org
Labels: -Pri-0 Pri-1
Owner: thestig@chromium.org
Status: Started (was: Assigned)
Labels: M-57 Security_Impact-Stable

Comment 12 by creis@chromium.org, Mar 16 2017

Cc: creis@chromium.org rpop@chromium.org nasko@chromium.org
Note for release managers: This bug also causes  issue 702085 , where users of the PDF Viewer extension will have all navigations and network requests fail if they click Back while the extension's print preview dialog is open (until Chrome restarts or the extension process is killed or restarted).  I assume it will be merged anyway due to the critical severity (which thestig@ confirmed), but I just wanted to note the additional impact in case it affects respin decisions.
Status: Fixed (was: Started)
Project Member

Comment 14 by sheriffbot@chromium.org, Mar 18 2017

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Project Member

Comment 15 by sheriffbot@chromium.org, Mar 20 2017

Labels: Merge-Request-58
Project Member

Comment 16 by sheriffbot@chromium.org, Mar 20 2017

Labels: -Merge-Request-58 Hotlist-Merge-Approved Merge-Approved-58
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Approved -Merge-Approved-58 merge-merged-3029 M-58
M58 merge from last week: https://chromium.googlesource.com/chromium/src/+/23107311dcb2bc1ecfa1c0fbe63f5f210c154049
Labels: reward-topanel
Labels: Merge-Request-57
I haven't seen any bug reports related to the merge on M58+, so requesting a M57 merge.
+awhalley@ for M57 merge review.
Cc: awhalley@chromium.org
Cc: amineer@chromium.org
govind@ - got 3 days of beta coverage from #17, looks good for 57
Labels: -Merge-Request-57 Merge-Approved-57
Approving merge to M57 branch 2987 based on comment #12, #19 and #22. Please merge before 4:00 PM PT Monday (03/27). Thank you.
Project Member

Comment 24 by bugdroid1@chromium.org, Mar 27 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8839f8f3d22dc169ede6edad06d75735dbf3c34a

commit 8839f8f3d22dc169ede6edad06d75735dbf3c34a
Author: Lei Zhang <thestig@chromium.org>
Date: Mon Mar 27 03:40:04 2017

M57: Properly clean up in PrintViewManager::RenderFrameCreated().

BUG= 694382 , 698622 

Review-Url: https://codereview.chromium.org/2742853003
Cr-Commit-Position: refs/heads/master@{#457363}
(cherry picked from commit 746da1cc6b2fbc2f725934542eedc49b41e5f17b)

Review-Url: https://codereview.chromium.org/2775133002 .
Cr-Commit-Position: refs/branch-heads/2987@{#881}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/8839f8f3d22dc169ede6edad06d75735dbf3c34a/chrome/browser/printing/print_view_manager.cc
[add] https://crrev.com/8839f8f3d22dc169ede6edad06d75735dbf3c34a/chrome/browser/printing/print_view_manager_unittest.cc
[modify] https://crrev.com/8839f8f3d22dc169ede6edad06d75735dbf3c34a/chrome/test/BUILD.gn

Cc: pbomm...@chromium.org ranjitkan@chromium.org
Cc: beherad@google.com brajkumar@chromium.org durga.behera@chromium.org
Labels: Release-1-M57
Labels: TE-Verified-M58 TE-Verified-57.0.2987.130 TE-Verified-M57 TE-Verified-58.0.3029.40
Verified the issue on Win 10 and Ubuntu 14.04 using 58.0.3029.40 & 57.0.2987.130 and its working fine.
698622_Mar_28.ogv
783 KB View Download
Labels: CVE-2017-5055
Labels: -reward-topanel reward-unpaid reward-9337
Very nice!  The panel decided to award $8,000 for this bug, and also award a $1,337 bonus! (though they noted the initial report was rather bare - see g.co/ChromeBugRewards for what we consider a high quality report).  Thanks!
Labels: -reward-unpaid reward-inprocess
Thanks for the award and thanks for the bonus :)
Project Member

Comment 34 by sheriffbot@chromium.org, Jun 24 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
Labels: CVE_description-submitted

Sign in to add a comment