Bug 207415

Summary: Harden HashTable IPC decoders
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, dbates, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch cdumez: review+

Description Alex Christensen 2020-02-07 16:07:15 PST
Harden HashTable IPC decoders
Comment 1 Alex Christensen 2020-02-07 16:07:44 PST
Created attachment 390142 [details]
Patch
Comment 2 Alex Christensen 2020-02-07 16:15:04 PST
Created attachment 390144 [details]
Patch
Comment 3 Chris Dumez 2020-02-07 16:23:53 PST
Comment on attachment 390144 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390144&action=review

> Source/WebKit/Platform/IPC/ArgumentCoders.h:392
> +            if (UNLIKELY(!HashMapType::isValidValue(*key) || !hashMap.add(WTFMove(*key), WTFMove(*value)).isNewEntry)) {

I thought it was isValidKey() for HashMap and isValidValue() for HashSet?

> Source/WebKit/Platform/IPC/ArgumentCoders.h:447
> +            if (UNLIKELY(!HashSetType::isValidKey(*key) || !hashSet.add(WTFMove(*key)).isNewEntry)) {

ditto.
Comment 4 Alex Christensen 2020-02-07 16:23:56 PST
Created attachment 390145 [details]
Patch
Comment 5 Chris Dumez 2020-02-07 16:25:35 PST
Comment on attachment 390145 [details]
Patch

r=me
Comment 6 Alex Christensen 2020-02-07 16:44:16 PST
http://trac.webkit.org/r256081
Comment 7 Radar WebKit Bug Importer 2020-02-07 16:45:26 PST
<rdar://problem/59278838>