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

Issue 834971 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

NULL for application or startup ID can cause chrome to crash

Project Member Reported by reve...@chromium.org, Apr 19 2018

Issue description

Aura shell interface allows application and startup ID to be NULL. Exo shell surface code assumes that it's never null and might try to create a std::string from nullptr as a result.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 19 2018

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

commit 8bc1641aca75f25f995b55910f2b4e94562cb24f
Author: David Reveman <reveman@chromium.org>
Date: Thu Apr 19 21:59:11 2018

exo: Don't assume that application and startup IDs are non-null.

Use base::Optional for startup and application ID in order to
handle null values properly. Setting one of these to null will
now clear the window property.

Bug:  834971 
Test: exo_unittests --gtest_filter=ShellSurfaceTest.Set*Id
Change-Id: I395fb02200f310b027060eb28e0132d8976532ab
Reviewed-on: https://chromium-review.googlesource.com/1020042
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552178}
[modify] https://crrev.com/8bc1641aca75f25f995b55910f2b4e94562cb24f/components/exo/shell_surface_base.cc
[modify] https://crrev.com/8bc1641aca75f25f995b55910f2b4e94562cb24f/components/exo/shell_surface_base.h
[modify] https://crrev.com/8bc1641aca75f25f995b55910f2b4e94562cb24f/components/exo/shell_surface_unittest.cc

Labels: Merge-Request-67
This change is limited to arc++ and crostini.
this is a fairly big change.  Tested and verified no ill effects?
I've been exercising this on my local machine for a day without issues. I think it's a safe merge but happy to hold off until next week if you prefer.

FYI, it's not critical for arc++ as we shouldn't be setting a null app id in that case but allowing arc++ to crash chrome is generally bad. Crostini depends on this fix but M67 is less important for that use-case.
Project Member

Comment 6 by sheriffbot@chromium.org, Apr 20 2018

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

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

Comment 7 by bugdroid1@chromium.org, Apr 20 2018

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a393157fd6bcf2762a87597d0ea73dd4001c5e4

commit 5a393157fd6bcf2762a87597d0ea73dd4001c5e4
Author: David Reveman <reveman@chromium.org>
Date: Fri Apr 20 23:39:48 2018

exo: Don't assume that application and startup IDs are non-null.

Use base::Optional for startup and application ID in order to
handle null values properly. Setting one of these to null will
now clear the window property.

TBR=reveman@chromium.org

(cherry picked from commit 8bc1641aca75f25f995b55910f2b4e94562cb24f)

Bug:  834971 
Test: exo_unittests --gtest_filter=ShellSurfaceTest.Set*Id
Change-Id: I395fb02200f310b027060eb28e0132d8976532ab
Reviewed-on: https://chromium-review.googlesource.com/1020042
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#552178}
Reviewed-on: https://chromium-review.googlesource.com/1023012
Reviewed-by: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/branch-heads/3396@{#187}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/5a393157fd6bcf2762a87597d0ea73dd4001c5e4/components/exo/shell_surface_base.cc
[modify] https://crrev.com/5a393157fd6bcf2762a87597d0ea73dd4001c5e4/components/exo/shell_surface_base.h
[modify] https://crrev.com/5a393157fd6bcf2762a87597d0ea73dd4001c5e4/components/exo/shell_surface_unittest.cc

Status: Fixed (was: Assigned)
Components: OS>Systems>Containers

Sign in to add a comment