android - HMS推送服务安全漏洞
问题描述
我们的安全团队发现了 Push Kit 库中存在的不安全功能,并想知道它是否会在即将发布的版本中修复或会保留,我们必须接受风险,或者是否可以进行任何定制来克服安全问题:
意图验证不当 (CWE-925)、应用程序权限 (MSTG-PLATFORM-1)
我们正在使用以下 sdk 版本:
implementation 'com.huawei.hms:hwid:5.0.1.300'
implementation 'com.huawei.hms:push:5.0.2.300'
以下是详细信息:
服务:com.huawei.hms.support.api.push.service.HmsMsgService
SDK清单文件中的服务存在如下:
<service android:name="com.huawei.hms.support.api.push.service.HmsMsgService" android:enabled="true" android:exported="true" android:process=":pushservice" android:directBootAware="true">
<intent-filter>
<action android:name="com.huawei.push.msg.NOTIFY_MSG" />
<action android:name="com.huawei.push.msg.PASSBY_MSG" />
</intent-filter>
</service>
这意味着该服务被发现与设备上的其他应用程序共享,因此设备上的任何其他应用程序都可以访问它。
因此,我们需要您的支持以protectionLevel: signatureOrSystem
通过受保护的权限添加或保护它android:permission="PermissionName"
。
任何反馈都非常感谢。
解决方案
经相关团队确认,HmsMsgService对HMS开放。HMS启动后会进行包名校验等校验。另外,该服务不是华为手机的消息接收模块,需要对HMS开放,HMS不能提前为应用设置权限。此外,该服务有两层验证,即源包名验证和HMS签名验证,不存在安全隐患。
因此,HmsMsgService 不会被其他应用程序使用,不会引起安全问题。该服务无需添加protectionLevel: signatureOrSystem
或添加android:permission="permissionName"
,不存在安全隐患。请放心使用。
推荐阅读
- c - C中的动态二维数组不读取第一个元素
- python - ModuleNotFoundError:没有名为“plotly”的模块
- regex - 使用正则表达式解析系统日志
- memory-leaks - 存在 SwapChain 导致的 DirectX 内存泄漏
- c# - 实体框架包含 - 返回 NULL
- vespa - 从所有 Vespa 集群节点中删除索引
- intellij-idea - IntelliJ 2018.3 - VCS 日志从这里交互式地变基
- json - Marvel API Swift4 JSON 解码
- mysql - 将 stock_status 从 instock 更新为 stock=0 的 outofstock
- postgresql - Postgresql REPL 将查询结果保存到变量中