Changeset 275501 in webkit


Ignore:
Timestamp:
Apr 6, 2021 3:01:28 AM (3 years ago)
Author:
rniwa@webkit.org
Message:

IPC::decodeObject null dereference in decodeArrayInternal()
https://bugs.webkit.org/show_bug.cgi?id=224214

Patch by Ian Gilbert <iang@apple.com> on 2021-04-06
Reviewed by Ryosuke Niwa.

Add null pointer check to decodeArrayInternal.

Source/WebKit:

Test: ipc/decode-object-array-crash.html

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(IPC::decodeArrayInternal):

LayoutTests:

  • ipc/decode-object-array-crash-expected.txt: Added.
  • ipc/decode-object-array-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r275499 r275501  
     12021-04-06  Ian Gilbert  <iang@apple.com>
     2
     3        IPC::decodeObject null dereference in decodeArrayInternal()
     4        https://bugs.webkit.org/show_bug.cgi?id=224214
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Add null pointer check to decodeArrayInternal.
     9
     10        * ipc/decode-object-array-crash-expected.txt: Added.
     11        * ipc/decode-object-array-crash.html: Added.
     12
    1132021-04-06  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WebKit/ChangeLog

    r275492 r275501  
     12021-04-06  Ian Gilbert  <iang@apple.com>
     2
     3        IPC::decodeObject null dereference in decodeArrayInternal()
     4        https://bugs.webkit.org/show_bug.cgi?id=224214
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Add null pointer check to decodeArrayInternal.
     9
     10        Test: ipc/decode-object-array-crash.html
     11
     12        * Shared/Cocoa/ArgumentCodersCocoa.mm:
     13        (IPC::decodeArrayInternal):
     14
    1152021-04-05  Jiewen Tan  <jiewen_tan@apple.com>
    216
  • trunk/Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm

    r274191 r275501  
    265265    for (uint64_t i = 0; i < size; ++i) {
    266266        auto value = decodeObject(decoder, allowedClasses);
    267         if (!value)
     267        if (!value || !value.value())
    268268            return WTF::nullopt;
    269269        [array addObject:value.value().get()];
Note: See TracChangeset for help on using the changeset viewer.