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

Issue 2691373003: Fix out of bounds write in ReadRemoteData (Closed)

Created:
3 years, 10 months ago by Nico
Modified:
3 years, 10 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix out of bounds write in ReadRemoteData https://codereview.chromium.org/2685213002 made us pass data instead of &data to ReadProcessMemory() but it didn't update the sizeof() arg. ReadRemoteData() is called with LONG and DWORDs which have size 4, but sizeof(data) on 64-bit is the size of a pointer, i.e. 8 -- so ReadProcessMemory() now reads 8 bytes into a 4-byte buffer. Fix this. BUG=692561 Review-Url: https://codereview.chromium.org/2691373003 Cr-Commit-Position: refs/heads/master@{#450751} Committed: https://chromium.googlesource.com/chromium/src/+/2c8e9d56d99a51c887ec4d15cbde5309533a96fb

Patch Set 1 #

Total comments: 1

Patch Set 2 : better #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M chrome/browser/conflicts/module_event_sink_impl_win.cc View 1 1 chunk +2 lines, -2 lines 2 comments Download

Messages

Total messages: 22 (10 generated)
Nico
first to stamp wins!
3 years, 10 months ago (2017-02-15 16:06:56 UTC) #3
Patrick Monette
Thanks for fixing it. LGTM
3 years, 10 months ago (2017-02-15 16:12:14 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2691373003/1
3 years, 10 months ago (2017-02-15 16:15:17 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/367003)
3 years, 10 months ago (2017-02-15 17:42:27 UTC) #10
Nico
That's a failure of this test on the 64 rel bot: ModuleEventSinkImplTest.CallsForwardedAsExpected (run #1): [ ...
3 years, 10 months ago (2017-02-15 17:43:45 UTC) #11
Nico
https://codereview.chromium.org/2691373003/diff/1/chrome/browser/conflicts/module_event_sink_impl_win.cc File chrome/browser/conflicts/module_event_sink_impl_win.cc (right): https://codereview.chromium.org/2691373003/diff/1/chrome/browser/conflicts/module_event_sink_impl_win.cc#newcode71 chrome/browser/conflicts/module_event_sink_impl_win.cc:71: if (bytes_read != sizeof(data)) ah, i need to change ...
3 years, 10 months ago (2017-02-15 17:45:41 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2691373003/20001
3 years, 10 months ago (2017-02-15 17:47:36 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/2c8e9d56d99a51c887ec4d15cbde5309533a96fb
3 years, 10 months ago (2017-02-15 19:00:00 UTC) #18
chrisha
https://codereview.chromium.org/2691373003/diff/20001/chrome/browser/conflicts/module_event_sink_impl_win.cc File chrome/browser/conflicts/module_event_sink_impl_win.cc (right): https://codereview.chromium.org/2691373003/diff/20001/chrome/browser/conflicts/module_event_sink_impl_win.cc#newcode67 chrome/browser/conflicts/module_event_sink_impl_win.cc:67: if (!::ReadProcessMemory(process, typed_address, data, sizeof(*data), Pointers are hard /facepalm ...
3 years, 10 months ago (2017-02-15 21:23:43 UTC) #19
Nico
https://codereview.chromium.org/2691373003/diff/20001/chrome/browser/conflicts/module_event_sink_impl_win.cc File chrome/browser/conflicts/module_event_sink_impl_win.cc (right): https://codereview.chromium.org/2691373003/diff/20001/chrome/browser/conflicts/module_event_sink_impl_win.cc#newcode67 chrome/browser/conflicts/module_event_sink_impl_win.cc:67: if (!::ReadProcessMemory(process, typed_address, data, sizeof(*data), On 2017/02/15 21:23:42, chrisha ...
3 years, 10 months ago (2017-02-15 21:47:58 UTC) #20
chrisha
> Do we have 64-bit sanitizer bots? The clang/asan runtime at least isn't quite > ...
3 years, 10 months ago (2017-02-16 15:20:52 UTC) #21
Nico
3 years, 10 months ago (2017-02-16 16:21:31 UTC) #22
Message was sent while issue was closed.
Nice :-)

On Feb 16, 2017 10:20 AM, <chrisha@chromium.org> wrote:

> > Do we have 64-bit sanitizer bots? The clang/asan runtime at least isn't
> quite
> > ready on 64-bit yet.
>
> Yeah, forgot about that. According to etienneb@ Win64 ASAN needs 1 last
> CL in
> LLVM, then some DEPS rolls and we should be good to go. All tests
> instrumenting
> and running on his dev box!
>
> https://codereview.chromium.org/2691373003/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698