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

Issue 2870743004: [value-serializer] Ensure deserialized JSRegExp flags are valid (Closed)

Created:
3 years, 7 months ago by jgruber
Modified:
3 years, 7 months ago
CC:
jbroman+watch_chromium.org, v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[value-serializer] Verify deserialized JSRegExp flags One of the serializer fuzzers passes in random data to the deserializer, which can then be used to deserialize a JSRegExp instance with random flag contents. This can cause issues since the JSRegExp::Flag enum statically contains kDotAll - but it is only valid to set kDotAll iff FLAG_harmony_regexp_dotall is set. This CL verifies deserialized flags before constructing the JSRegExp and bails out if they are invalid. R=jbroman@chromium.org,yangguo@chromium.org BUG=chromium:719280 Review-Url: https://codereview.chromium.org/2870743004 Cr-Commit-Position: refs/heads/master@{#45222} Committed: https://chromium.googlesource.com/v8/v8/+/540419b660ae8da1d24767be5b95fc0421680580

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comments #

Patch Set 3 : Add a unit test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -1 line) Patch
M src/value-serializer.cc View 1 1 chunk +12 lines, -1 line 0 comments Download
M test/unittests/value-serializer-unittest.cc View 1 2 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (21 generated)
jgruber
Hi, please take a look.
3 years, 7 months ago (2017-05-09 07:52:33 UTC) #3
jbroman
https://codereview.chromium.org/2870743004/diff/1/src/value-serializer.cc File src/value-serializer.cc (right): https://codereview.chromium.org/2870743004/diff/1/src/value-serializer.cc#newcode1477 src/value-serializer.cc:1477: const uint32_t masked_flags = raw_flags & flags_mask; Hmm. WDYT ...
3 years, 7 months ago (2017-05-09 14:52:23 UTC) #6
jgruber
https://codereview.chromium.org/2870743004/diff/1/src/value-serializer.cc File src/value-serializer.cc (right): https://codereview.chromium.org/2870743004/diff/1/src/value-serializer.cc#newcode1477 src/value-serializer.cc:1477: const uint32_t masked_flags = raw_flags & flags_mask; On 2017/05/09 ...
3 years, 7 months ago (2017-05-09 15:02:58 UTC) #9
jbroman
lgtm
3 years, 7 months ago (2017-05-09 15:05:01 UTC) #10
jbroman
On 2017/05/09 at 15:05:01, jbroman wrote: > lgtm (though a unit test in value-serializer-unittest.cc might ...
3 years, 7 months ago (2017-05-09 15:05:24 UTC) #11
jgruber
On 2017/05/09 15:05:24, jbroman wrote: > On 2017/05/09 at 15:05:01, jbroman wrote: > > lgtm ...
3 years, 7 months ago (2017-05-10 07:30:02 UTC) #16
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/2870743004/40001
3 years, 7 months ago (2017-05-10 08:45:37 UTC) #21
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 7 months ago (2017-05-10 08:45:41 UTC) #24
Jakob Kummerow
lgtm
3 years, 7 months ago (2017-05-10 08:50:28 UTC) #27
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/2870743004/40001
3 years, 7 months ago (2017-05-10 08:50:48 UTC) #29
commit-bot: I haz the power
3 years, 7 months ago (2017-05-10 08:52:29 UTC) #32
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/v8/v8/+/540419b660ae8da1d24767be5b95fc04216...

Powered by Google App Engine
This is Rietveld 408576698