TextInputController::SetMarkedText() should take uint32_t instead of int32_t for offsets |
|||||||
Issue descriptionDetailed report: https://clusterfuzz.com/testcase?key=6643073915551744 Fuzzer: mbarbella_js_mutation_layout Job Type: linux_msan_content_shell_drt Platform Id: linux Crash Type: Abrt Crash Address: 0x03e900000001 Crash State: blink::TextIteratorAlgorithm<blink::EditingAlgorithm<blink::NodeTraversal> >::Te blink::DocumentMarkerController::AddMarkerInternal blink::DocumentMarkerController::AddCompositionMarker Sanitizer: memory (MSAN) Regressed: https://clusterfuzz.com/revisions?job=linux_msan_content_shell_drt&range=518240:518474 Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=6643073915551744 Issue filed automatically. See https://github.com/google/clusterfuzz-tools for more information.
,
Nov 26 2017
Automatically adding ccs based on suspected regression changelists: JS exposure of feature policy by loonybear@chromium.org - https://chromium.googlesource.com/chromium/src/+/f4bdf01c99906c9f59d8e6ea4993562860ab7d3d Extract FrameSelection::ComputeAbsoluteBounds method by dgozman@chromium.org - https://chromium.googlesource.com/chromium/src/+/76dd5a9c6f723b56973cc79608f0fe6ce446a956 If this is incorrect, please apply the Test-Predator-Wrong-CLs label.
,
Nov 27 2017
Pasting the test case here for reference:
<input id="test" type="text">
<script>
test.focus();
textInputController.insertText('4');
textInputController.setMarkedText('4294967284', -1, -2147483648);
</script>
The test case attempts to create a PlainTextRange with start offset > end offset due to integer overflow.
It seems too ad-hoc if we just patch the crash site to handle integer overflow. Do we have any more general approach?
,
Dec 6 2017
Lower to Pri-3 since this is testing API issue.
We should change TextInputControllerBindings::SetMarkedText(const std::string& text, int start, ine length) to take uint32_t to throw an exception for negative number.
See gin/converter.cc
bool Converter<uint32_t>::FromV8(Isolate* isolate,
Local<Value> val,
uint32_t* out) {
if (!val->IsUint32())
return false;
*out = val.As<Uint32>()->Value();
return true;
}
Note: offset in DOM is specified as "unsigned long" == uint64_t, but Blink use
|unsigned|==uint32_t.
,
Dec 6 2017
,
Dec 6
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 10
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ClusterFuzz
, Nov 26 2017Labels: Test-Predator-Auto-Components