Bug 207415 - Harden HashTable IPC decoders
Summary: Harden HashTable IPC decoders
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-07 16:07 PST by Alex Christensen
Modified: 2020-02-07 16:45 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.18 KB, patch)
2020-02-07 16:07 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (3.33 KB, patch)
2020-02-07 16:15 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (3.60 KB, patch)
2020-02-07 16:23 PST, Alex Christensen
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>