首页 > 解决方案 > 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"

任何反馈都非常感谢。

标签: androidpush-notificationhuawei-mobile-serviceshuawei-push-notificationhuawei-account

解决方案


经相关团队确认,HmsMsgService对HMS开放。HMS启动后会进行包名校验等校验。另外,该服务不是华为手机的消息接收模块,需要对HMS开放,HMS不能提前为应用设置权限。此外,该服务有两层验证,即源包名验证和HMS签名验证,不存在安全隐患。

因此,HmsMsgService 不会被其他应用程序使用,不会引起安全问题。该服务无需添加protectionLevel: signatureOrSystem或添加android:permission="permissionName",不存在安全隐患。请放心使用。


推荐阅读