Changeset 230359 in webkit


Ignore:
Timestamp:
Apr 6, 2018 4:53:30 PM (6 years ago)
Author:
rniwa@webkit.org
Message:

Make all sync IPCs during ScriptDisallowedScope set DoNotProcessIncomingMessagesWhenWaitingForSyncReply
https://bugs.webkit.org/show_bug.cgi?id=182449
<rdar://problem/39222541>

Reviewed by Chris Dumez.

Release assert that a sync IPC inside ScriptDisallowedScope sets DoNotProcessIncomingMessagesWhenWaitingForSyncReply
to avoid executing arbitrary scripts as a result of processing incoming sync IPCs.

  • Platform/IPC/Connection.h:

(IPC::Connection::sendSync): Added the release assertion.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r230326 r230359  
     12018-04-05  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Make all sync IPCs during ScriptDisallowedScope set DoNotProcessIncomingMessagesWhenWaitingForSyncReply
     4        https://bugs.webkit.org/show_bug.cgi?id=182449
     5        <rdar://problem/39222541>
     6
     7        Reviewed by Chris Dumez.
     8
     9        Release assert that a sync IPC inside ScriptDisallowedScope sets DoNotProcessIncomingMessagesWhenWaitingForSyncReply
     10        to avoid executing arbitrary scripts as a result of processing incoming sync IPCs.
     11
     12        * Platform/IPC/Connection.h:
     13        (IPC::Connection::sendSync): Added the release assertion.
     14
    1152018-04-05  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebKit/Platform/IPC/Connection.h

    r230314 r230359  
    3333#include "HandleMessage.h"
    3434#include "MessageReceiver.h"
     35#include <WebCore/ScriptDisallowedScope.h>
    3536#include <atomic>
    3637#include <wtf/Condition.h>
     
    388389    COMPILE_ASSERT(T::isSync, SyncMessageExpected);
    389390
     391    RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(sendSyncOptions.contains(SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply)
     392        || WebCore::ScriptDisallowedScope::isEventAllowedInMainThread());
     393
    390394    uint64_t syncRequestID = 0;
    391395    std::unique_ptr<Encoder> encoder = createSyncMessageEncoder(T::receiverName(), T::name(), destinationID, syncRequestID);
Note: See TracChangeset for help on using the changeset viewer.