haikuwebkit/LayoutTests/ipc
Ian Gilbert bc6e57953c Crash due to VectorBuffer pre-allocation failure
https://bugs.webkit.org/show_bug.cgi?id=224840

Patch by Ian Gilbert <iang@apple.com> on 2021-04-20
Reviewed by Sam Weinig.

Source/WebKit:

Vector decoder could attempt to allocate a large buffer and on failure would crash.
Changed decode to avoid allocating a Vector based on the decoded size.

Test: ipc/large-vector-allocate-failure-crash.html

* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<Vector<RefPtr<ApplePayError>>>::decode):

LayoutTests:

Added a regression test.

* ipc/large-vector-allocate-failure-crash-expected.txt: Added.
* ipc/large-vector-allocate-failure-crash.html: Added.

Canonical link: https://commits.webkit.org/236819@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@276341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-04-21 01:20:17 +00:00
..
analytics-logger-crash-expected.txt [CoreIPC] Crash in logDiagnosticMessage code 2021-04-13 04:57:38 +00:00
analytics-logger-crash.html [CoreIPC] Crash in logDiagnosticMessage code 2021-04-13 04:57:38 +00:00
argument-coders-crash-expected.txt Crash in IPC::decode(Decoder& decoder, RetainPtr<SecKeychainItemRef>& result) 2021-02-19 01:16:29 +00:00
argument-coders-crash.html Crash in IPC::decode(Decoder& decoder, RetainPtr<SecKeychainItemRef>& result) 2021-02-19 01:16:29 +00:00
decode-object-array-crash-expected.txt IPC::decodeObject null dereference in decodeArrayInternal() 2021-04-06 10:01:28 +00:00
decode-object-array-crash.html IPC::decodeObject null dereference in decodeArrayInternal() 2021-04-06 10:01:28 +00:00
large-vector-allocate-failure-crash-expected.txt Crash due to VectorBuffer pre-allocation failure 2021-04-21 01:20:17 +00:00
large-vector-allocate-failure-crash.html Crash due to VectorBuffer pre-allocation failure 2021-04-21 01:20:17 +00:00
pasteboard-write-custom-data-expected.txt Null check platformData when decoding 2021-03-04 13:53:24 +00:00
pasteboard-write-custom-data.html Change test to not ASSERT in Debug 2021-03-06 00:02:38 +00:00
set-text-indicator-expected.txt
set-text-indicator.html
web-authenticator-get-assertion-expected.txt
web-authenticator-get-assertion.html