Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b21c169a1e5eac2379544b133ea2ee7a038c979a
      
https://github.com/WebKit/WebKit/commit/b21c169a1e5eac2379544b133ea2ee7a038c979a
  Author: Simon Lewis <[email protected]>
  Date:   2025-11-21 (Fri, 21 Nov 2025)

  Changed paths:
    M Source/WebKit/DerivedSources-input.xcfilelist
    M Source/WebKit/DerivedSources.make
    M Source/WebKit/Scripts/generate-message-receiver.py
    M Source/WebKit/Scripts/generate-serializers.py
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Scripts/webkit/model.py
    A Source/WebKit/Scripts/webkit/opaque_ipc_types.py
    A Source/WebKit/Scripts/webkit/opaque_ipc_types.tracking.in
    M Source/WebKit/Scripts/webkit/parser_unittest.py
    M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
    M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h
    M Source/WebKit/Scripts/webkit/tests/Makefile
    M Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp
    M Source/WebKit/Scripts/webkit/tests/MessageNames.cpp
    M Source/WebKit/Scripts/webkit/tests/MessageNames.h
    M Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp
    M Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in
    M Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiver.messages.in
    M 
Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp
    M Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessages.h
    M Source/WebKit/Scripts/webkit/tests/TestWithoutAttributes.messages.in
    M 
Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp
    M Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessages.h
    A Source/WebKit/Scripts/webkit/tests/test_opaque_ipc_types.tracking.in
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  -----------
  Track and manage Opaque Data Types in CoreIPC
https://bugs.webkit.org/show_bug.cgi?id=299055
rdar://160811093

Reviewed by Alex Christensen and Mike Wyrzykowski.

The goal of this change is to track and manage Opaque Data Types (which 
represent a sandbox escape risk) in the CoreIPC flows.

Tracking of Opaque Data Types is done via 
Source/WebKit/Scripts/webkit/opaque_ipc_types.tracking.in

What is considered an Opaque Data Type can be seen in 
Source/WebKit/Scripts/webkit/opaque_ipc_types.py.

Test: Source/WebKit/Scripts/webkit/opaque_ipc_types.py
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Scripts/generate-message-receiver.py:
(main):
* Source/WebKit/Scripts/generate-serializers.py:
(SerializedType.enforce_opaque_ipc_types_usage):
(UsingStatement.enforce_opaque_ipc_types_usage):
(encode_type):
(main):
* Source/WebKit/Scripts/webkit/messages.py:
(message_to_struct_declaration):
* Source/WebKit/Scripts/webkit/model.py:
(MessageReceiver.enforce_opaque_ipc_types_usage):
* Source/WebKit/Scripts/webkit/opaque_ipc_types.py: Added.
(_is_odt_concern):
(_remove_const_and_whitespace):
(_split_template_parameters):
(_array_special_parsing):
(_get_container_info):
(_get_parameters_to_check):
(_contains_opaque_data):
(OpaqueIPCTypeEntry):
(OpaqueIPCTypeEntry.__init__):
(OpaqueIPCTypeEntry._parse_attributes):
(OpaqueIPCTypes):
(OpaqueIPCTypes.__init__):
(OpaqueIPCTypes._parse_group_header):
(OpaqueIPCTypes._parse_alias_param):
(OpaqueIPCTypes._parse_structure_param):
(OpaqueIPCTypes._parse_message_param):
(OpaqueIPCTypes._parse_line):
(OpaqueIPCTypes._add_entry):
(OpaqueIPCTypes._query_entries):
(OpaqueIPCTypes._is_webcontent_dispatchable):
(OpaqueIPCTypes.message_param_tracked):
(OpaqueIPCTypes.message_param_reply_tracked):
(OpaqueIPCTypes.alias_param_tracked):
(OpaqueIPCTypes.structure_param_tracked):
(OpaqueIPCTypes.webcontent_dispatchable):
(OpaqueIPCTypes.reply_webcontent_dispatchable):
(OpaqueIPCTypes.structure_webcontent_dispatchable):
(is_opaque_type):
(TestOpaqueTypes):
(TestOpaqueTypes.test_is_odt_concern_function):
(TestOpaqueTypes.test_contains_opaque_data_function):
(TestOpaqueTypes.test_direct_opaque_types):
(TestOpaqueTypes.test_container_types_with_odt_concerns):
(TestOpaqueTypes.test_container_types_without_odt_concerns):
(TestOpaqueTypes.test_infinite_recursion_protection):
(TestOpaqueTypes.test_bad_formatting):
(TestOpaqueTypes.test_context_propagation_through_simple_wrappers):
(TestOpaqueTypes.test_context_reset_in_structural_containers):
(TestOpaqueTypes.test_retainptr_with_direct_opaque_types):
(TestOpaqueTypes.test_deeply_nested_types):
(TestOpaqueTypes.test_opaque_ipc_types_parsing):
(TestOpaqueTypes.test_production_tracking_file_parses):
* Source/WebKit/Scripts/webkit/opaque_ipc_types.tracking.in: Added.
* Source/WebKit/Scripts/webkit/parser_unittest.py:
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
(IPC::ArgumentCoder<Namespace::OtherClass>::encode):
(IPC::ArgumentCoder<WebCore::OpaqueTypeObject>::encode):
(IPC::ArgumentCoder<WebCore::OpaqueTypeObject>::decode):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h:
* Source/WebKit/Scripts/webkit/tests/Makefile:
* Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp:
(IPC::jsValueForArguments):
(IPC::jsValueForReplyArguments):
(IPC::messageArgumentDescriptions):
(IPC::messageReplyArgumentDescriptions):
* Source/WebKit/Scripts/webkit/tests/MessageNames.cpp:
* Source/WebKit/Scripts/webkit/tests/MessageNames.h:
* Source/WebKit/Scripts/webkit/tests/SerializedTypeInfo.cpp:
(WebKit::allSerializedTypes):
* Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in:
* Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiver.messages.in:
* Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:
(WebKit::TestWithLegacyReceiver::didReceiveMessage):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_OpaqueTypeSecurityAssertion>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithLegacyReceiver_OpaqueTypeSecurityAssertion>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_OpaqueTypeSecurityAssertionReply>):
* Source/WebKit/Scripts/webkit/tests/TestWithLegacyReceiverMessages.h:
(Messages::TestWithLegacyReceiver::OpaqueTypeSecurityAssertion::name):
(Messages::TestWithLegacyReceiver::OpaqueTypeSecurityAssertion::asyncMessageReplyName):
(Messages::TestWithLegacyReceiver::OpaqueTypeSecurityAssertion::OpaqueTypeSecurityAssertion):
(Messages::TestWithLegacyReceiver::OpaqueTypeSecurityAssertion::encode):
(Messages::TestWithLegacyReceiver::OpaqueTypeSecurityAssertionReply::name):
(Messages::TestWithLegacyReceiver::OpaqueTypeSecurityAssertionReply::OpaqueTypeSecurityAssertionReply):
(Messages::TestWithLegacyReceiver::OpaqueTypeSecurityAssertionReply::encode):
* Source/WebKit/Scripts/webkit/tests/TestWithoutAttributes.messages.in:
* Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:
(WebKit::TestWithoutAttributes::didReceiveMessage):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_OpaqueTypeSecurityAssertion>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithoutAttributes_OpaqueTypeSecurityAssertion>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_OpaqueTypeSecurityAssertionReply>):
* Source/WebKit/Scripts/webkit/tests/TestWithoutAttributesMessages.h:
(Messages::TestWithoutAttributes::OpaqueTypeSecurityAssertion::name):
(Messages::TestWithoutAttributes::OpaqueTypeSecurityAssertion::asyncMessageReplyName):
(Messages::TestWithoutAttributes::OpaqueTypeSecurityAssertion::OpaqueTypeSecurityAssertion):
(Messages::TestWithoutAttributes::OpaqueTypeSecurityAssertion::encode):
(Messages::TestWithoutAttributes::OpaqueTypeSecurityAssertionReply::name):
(Messages::TestWithoutAttributes::OpaqueTypeSecurityAssertionReply::OpaqueTypeSecurityAssertionReply):
(Messages::TestWithoutAttributes::OpaqueTypeSecurityAssertionReply::encode):
* Source/WebKit/Scripts/webkit/tests/test_opaque_ipc_types.tracking.in: Added.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/303390@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to