mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
7b15afcc12
Security fix (from initial round): - WantSenderStub::OnRemoteRequest now rejects the legacy WANT_SENDER_SEND IPC with ERR_NO_PERMISSION_CALLER. The direct IWantSender::Send path bypassed PendingWantManager::CheckCallerPermission and was reachable by any client holding an IWantSender handle. - BuildSendWant now honors CONSTANT_FLAG: when the key is created with CONSTANT_FLAG, sender's TriggerInfo.want params are no longer merged into the dispatched Want. Hard removal of orphaned IPC machinery (no live caller — production routes via IAbilityManager::SendWantSender → PendingWantManager::SenderInner): - IWantSender::Send virtual + WANT_SENDER_SEND enum - WantSenderProxy::Send + WriteInterfaceToken - WantSenderStub::OnRemoteRequest override + SendInner (cpp deleted, ctor/dtor switched to = default in header) - PendingWantRecord::Send override - want_sender_proxy_test/ directory - Residual Send(SenderInfo&) override fixtures in 4 test/fuzz files - Stale want_sender_stub.cpp entries from 4 BUILD.gn files Regression coverage: - Drop Send_0100 from pending_want_record_test (called deleted method) - Add BuildSendWant_ConstantFlag_RejectSenderWantParams_0100 to lock the param-isolation behaviour - Add WantSenderStubTest_OnRemoteRequest_Code0_Rejected_0100 and Code0_WithPayload_Rejected_0100 to prevent reintroduction of the IPC bypass without explicit security review - Fix want_receiver_stub_test to use IWantReceiver::WANT_RECEIVER_SEND instead of IWantSender::WANT_SENDER_SEND (copy-paste bug, same value 0) Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%]