Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Issue 997023002: Fix a null-pointer dereference in ChromeOS Bluetooth code. (Closed)

Created:
5 years, 9 months ago by Ilya Sherman
Modified:
5 years, 9 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a null-pointer dereference in ChromeOS Bluetooth code. The code had undefined behavior, depending on what order the compiler chose to evaluate the arguments in. Specifically, the call to RegisterProfile() required evaluation of two arguments: |profile->object_path()| and |base::Bind(success_callback, base::Passed(&profile))|. If the latter was evaluated first, then |profile| would be null by the time that the prior was evaluated. The crash stack is: Program received signal SIGSEGV, Segmentation fault. std::string::compare() const () StartsWithASCII() dbus::IsValidObjectPath() dbus::MessageWriter::AppendObjectPath() chromeos::BluetoothProfileManagerClientImpl::RegisterProfile() chromeos::BluetoothAdapterProfileChromeOS::Register() chromeos::BluetoothAdapterChromeOS::UseProfile() chromeos::BluetoothSocketChromeOS::RegisterProfile() BUG=457978 TEST=(see bug, comment #14) R=armansito@chromium.org, jamuraa@chromium.org Committed: https://crrev.com/847466627013483020c6683c303752b6fab97b97 Cr-Commit-Position: refs/heads/master@{#320139}

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M device/bluetooth/bluetooth_adapter_profile_chromeos.cc View 1 chunk +2 lines, -1 line 4 comments Download

Messages

Total messages: 15 (3 generated)
Ilya Sherman
5 years, 9 months ago (2015-03-11 04:55:25 UTC) #1
armansito
https://codereview.chromium.org/997023002/diff/1/device/bluetooth/bluetooth_adapter_profile_chromeos.cc File device/bluetooth/bluetooth_adapter_profile_chromeos.cc (left): https://codereview.chromium.org/997023002/diff/1/device/bluetooth/bluetooth_adapter_profile_chromeos.cc#oldcode32 device/bluetooth/bluetooth_adapter_profile_chromeos.cc:32: profile->object_path(), I really don't see how this is a ...
5 years, 9 months ago (2015-03-11 06:48:38 UTC) #2
Ilya Sherman
https://codereview.chromium.org/997023002/diff/1/device/bluetooth/bluetooth_adapter_profile_chromeos.cc File device/bluetooth/bluetooth_adapter_profile_chromeos.cc (left): https://codereview.chromium.org/997023002/diff/1/device/bluetooth/bluetooth_adapter_profile_chromeos.cc#oldcode32 device/bluetooth/bluetooth_adapter_profile_chromeos.cc:32: profile->object_path(), On 2015/03/11 06:48:38, armansito wrote: > I really ...
5 years, 9 months ago (2015-03-11 09:23:54 UTC) #3
Marie Janssen
good catch lgtm
5 years, 9 months ago (2015-03-11 14:03:30 UTC) #4
armansito
https://codereview.chromium.org/997023002/diff/1/device/bluetooth/bluetooth_adapter_profile_chromeos.cc File device/bluetooth/bluetooth_adapter_profile_chromeos.cc (left): https://codereview.chromium.org/997023002/diff/1/device/bluetooth/bluetooth_adapter_profile_chromeos.cc#oldcode32 device/bluetooth/bluetooth_adapter_profile_chromeos.cc:32: profile->object_path(), On 2015/03/11 09:23:54, Ilya Sherman wrote: > On ...
5 years, 9 months ago (2015-03-11 16:44:29 UTC) #5
armansito
https://codereview.chromium.org/997023002/diff/1/device/bluetooth/bluetooth_adapter_profile_chromeos.cc File device/bluetooth/bluetooth_adapter_profile_chromeos.cc (left): https://codereview.chromium.org/997023002/diff/1/device/bluetooth/bluetooth_adapter_profile_chromeos.cc#oldcode32 device/bluetooth/bluetooth_adapter_profile_chromeos.cc:32: profile->object_path(), On 2015/03/11 16:44:29, armansito wrote: > On 2015/03/11 ...
5 years, 9 months ago (2015-03-11 17:09:25 UTC) #6
Ilya Sherman
I've expanded the CL description. Sending to the CQ. Michael, could you please work with ...
5 years, 9 months ago (2015-03-11 19:02:25 UTC) #7
Ilya Sherman
On 2015/03/11 19:02:25, Ilya Sherman wrote: > I've expanded the CL description. Sending to the ...
5 years, 9 months ago (2015-03-11 19:03:00 UTC) #10
armansito
lgtm, thanks! Let's also try to get this into 42 asap.
5 years, 9 months ago (2015-03-11 19:27:08 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/997023002/1
5 years, 9 months ago (2015-03-11 19:42:01 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 9 months ago (2015-03-11 20:36:16 UTC) #14
commit-bot: I haz the power
5 years, 9 months ago (2015-03-11 20:37:10 UTC) #15
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/847466627013483020c6683c303752b6fab97b97
Cr-Commit-Position: refs/heads/master@{#320139}

Powered by Google App Engine
This is Rietveld 408576698