已合并
harden IPC and render node safety: null checks, boundary and permission fixes with L0 tests #31451
LyBbq创建于 7月21日
harden IPC and render node safety: null checks, boundary and permission fixes with L0 tests #31451
已合并
Pull Request已成功合入, 合并人@openharmony_ci
(感谢 LyBbq 的贡献)7月21日 添加了label:waiting_on_author
openharmony_ci
7月21日 评论:
7月21日 评论:
感谢提交 Pull Requests!如果您提交的PR已经开发完毕,请评论 "start build" 触发门禁,更多交互操作,请访问OpenHarmony社区支持命令清单。如果需要调整订阅PR、Issue的变更状态,请访问订阅链接。
Thanks for submitting the pull request. If your Pull Request has already been developed, you can leave a "start build" comment to trigger the gated system. For more commands, please visit OpenHarmony Command List. If you need to change the subscription of a Pull Request or Issue, please visit the link.


7月21日 添加了label:dco检查成功
此处折叠了48条消息 查看更多
7月23日 合入了pull request,合并节点 SHA:e7836a082cf993ebde735aca9067463c9be07833
7月23日 删除了label:waiting_for_review
7月23日 添加了label:merged
Description:
问题背景:
代码安全加固(safe 专项)排查出的一批缺陷:IPC 入参边界与回写值未初始化、多处外部返回值未判空、水印接口缺少调用方校验、异常路径资源泄漏、析构与其它线程竞争。
修复方案:
CheckCreateNodeAndSurface的 nodeType 校验由> nodeTypeMax改为>= nodeTypeMax,封堵NODE_MAX哨兵值越界传入CreateNode/CreateDisplayNode在 agent 为空时补写success = false,stub 侧bool success初始化,避免向客户端回写未初始化值SetSurfaceWatermark/ClearSurfaceWatermarkForNodes/ClearSurfaceWatermark对非系统调用方增加GetCallingPid() == pid校验,防止应用越权操作其他进程水印RSRenderService::GetConnectiontoken 判空、GetSurfaceRootNodeIdagent 判空、RSRenderNode::SetNeedClearRenderGroupCache的stagingRenderParams_判空、RSUiCaptureTaskParallel::CreateResources的endNodeParams判空CopyDataToPixelMap改new (std::nothrow)并在失败时munmap/close释放;RSUiCaptureSoloTaskParallel获取 SharedGPUContext 失败时补ClearNodeCacheSurface清理Issue number:https://gitcode.com/openharmony/graphic_graphic_2d/issues/25038
Test & Result:
CodeCheck:
L0新增用例自检结果