| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
事件通知sa权限最小化增加开关和etc Signed-off-by: xinking129 <xinxin13@huawei.com> | 2 年前 | |
fix(ordered_event): move HandleFinalSubscriber outside lock and fix recursive mutex deadlock - Move HandleFinalSubscriber calls out of ProcessOrderedEventQueueLocked into post-lock phase to reduce lock hold time since IPC operations should not run under orderedMutex_ - Replace CurrentOrderedEventTimeout with HandleTimeoutReceiver in CheckTimeoutForceReceive to avoid recursive locking on orderedMutex_, since ffrt::mutex is non-recursive Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Co-Authored-By: Agent Change-Id: I6ff0a7629bab164117fb2836e99de11187bf4f6e | 1 个月前 | |
fix(ces): canonicalize file path before opening ifstream in GetJsonFromFile Use realpath() to canonicalize the path parameter in InnerCommonEventManager::GetJsonFromFile. After canonicalization, add IsValidConfigPath whitelist check to ensure the canonical path is under a controlled directory (/system/etc/, /vendor/etc/, /chipset/etc/), preventing arbitrary file reads. Then open the file with std::ifstream using the canonical path. This follows the realpath+whitelist pattern used in hiviewdfx IsValidPath (faultlog_util.cpp). Add unit tests for GetJsonFromFile covering all branches: - nullptr path, non-existent path (realpath fail) - path outside whitelist (IsValidConfigPath fail) - directory in whitelist (ifstream fail) - invalid/scalar/null/empty/array JSON content (parse fail) - valid JSON object (success) Closes #1238 Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I2a2d3aa22794c96fe5e048c5915ec09dbfe1f7c8 | 3 天前 | |
fix(ces): canonicalize file path before opening ifstream in GetJsonFromFile Use realpath() to canonicalize the path parameter in InnerCommonEventManager::GetJsonFromFile. After canonicalization, add IsValidConfigPath whitelist check to ensure the canonical path is under a controlled directory (/system/etc/, /vendor/etc/, /chipset/etc/), preventing arbitrary file reads. Then open the file with std::ifstream using the canonical path. This follows the realpath+whitelist pattern used in hiviewdfx IsValidPath (faultlog_util.cpp). Add unit tests for GetJsonFromFile covering all branches: - nullptr path, non-existent path (realpath fail) - path outside whitelist (IsValidConfigPath fail) - directory in whitelist (ifstream fail) - invalid/scalar/null/empty/array JSON content (parse fail) - valid JSON object (success) Closes #1238 Co-Authored-By: Agent Signed-off-by: CheerfulRicky <yuegang7@h-partners.com> Change-Id: I2a2d3aa22794c96fe5e048c5915ec09dbfe1f7c8 | 3 天前 | |
Co-Authored-By: hanwenhui Signed-off-by: hanwenhui <hanwenhui2@h-partners.com> | 19 天前 |