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

Issue 2683823004: Protect heap metadata in Oilpan. (Closed)

Created:
3 years, 10 months ago by palmer
Modified:
3 years, 10 months ago
Reviewers:
haraken, jschuh, sof
CC:
Mads Ager (chromium), blink-reviews, chromium-reviews, kinuko+watch, kouhei+heap_chromium.org, oilpan-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Protect heap metadata in Oilpan. Rather than checking a static 16-bit magic value to check a HeapObjectHeader's integrity when DCHECK_IS_ON, use a random 32-bit canary value in all builds. Place it before the HeapObjectHeader value, rather than after, so that linear overwrites (e.g. from OOB writes starting from lower addresses) are more likely to corrupt it. This is not a complete fix for 633030; more work on other heap metadata is coming next. This is the simplest possible start. In particular, in future work we may xor the |m_encoded| field with the canary as well, to obfuscate its meaning to attackers using an infoleak to learn about the Oilpan heap. BUG=633030 Review-Url: https://codereview.chromium.org/2683823004 Cr-Commit-Position: refs/heads/master@{#450598} Committed: https://chromium.googlesource.com/chromium/src/+/40cd3c13c54f9aa73fc0b47e59a7d962037e2f94

Patch Set 1 #

Patch Set 2 : remove unnecessary 4-byte padding. #

Total comments: 3

Patch Set 3 : Move the implementation of |getMagic| down. #

Patch Set 4 : Unconditionally assert 8-byte HOH size. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -42 lines) Patch
M third_party/WebKit/Source/platform/heap/HeapPage.h View 1 2 3 8 chunks +49 lines, -42 lines 0 comments Download

Messages

Total messages: 24 (14 generated)
palmer
Here's the simplest possible version of a metadata canary CL. (I closed the previous one, ...
3 years, 10 months ago (2017-02-10 01:03:53 UTC) #11
haraken
The change looks good. I want to see performance results for blink_perf.* and dromaeo.dom* on ...
3 years, 10 months ago (2017-02-10 06:02:47 UTC) #12
palmer
> I want to see performance results for blink_perf.* and dromaeo.dom* on 64-bit and 32-bit ...
3 years, 10 months ago (2017-02-11 00:37:43 UTC) #13
sof
https://codereview.chromium.org/2683823004/diff/20001/third_party/WebKit/Source/platform/heap/HeapPage.h File third_party/WebKit/Source/platform/heap/HeapPage.h (right): https://codereview.chromium.org/2683823004/diff/20001/third_party/WebKit/Source/platform/heap/HeapPage.h#newcode184 third_party/WebKit/Source/platform/heap/HeapPage.h:184: #if CPU(64BIT) To the extent that it is still ...
3 years, 10 months ago (2017-02-11 06:38:10 UTC) #15
palmer
https://codereview.chromium.org/2683823004/diff/20001/third_party/WebKit/Source/platform/heap/HeapPage.h File third_party/WebKit/Source/platform/heap/HeapPage.h (right): https://codereview.chromium.org/2683823004/diff/20001/third_party/WebKit/Source/platform/heap/HeapPage.h#newcode243 third_party/WebKit/Source/platform/heap/HeapPage.h:243: // Returns a random value. > Just a syntactic ...
3 years, 10 months ago (2017-02-14 22:49:51 UTC) #16
palmer
> third_party/WebKit/Source/platform/heap/HeapPage.h:184: #if CPU(64BIT) > To the extent that it is still useful, this static_assert() ...
3 years, 10 months ago (2017-02-14 22:58:51 UTC) #17
palmer
(The perf results are in Patchset 2; Patchsets 3 and 4 should have no perf ...
3 years, 10 months ago (2017-02-14 23:03:42 UTC) #18
haraken
On 2017/02/14 23:03:42, palmer wrote: > (The perf results are in Patchset 2; Patchsets 3 ...
3 years, 10 months ago (2017-02-14 23:51:41 UTC) #19
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/2683823004/60001
3 years, 10 months ago (2017-02-14 23:55:58 UTC) #21
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 06:37:58 UTC) #24
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/40cd3c13c54f9aa73fc0b47e59a7...

Powered by Google App Engine
This is Rietveld 408576698