Android Security Bulletin Analysis (March 2021)
- Reference: https://source.android.google.cn/security/bulletin/2021-03-01
- 由于本人水平有限,所以框架相关漏洞分析的会较详细,很多媒体和短距的漏洞,写的较为简略,有兴趣的读者可以自行阅读原始patch,还请理解。
2021-03-01 security patch level vulnerability details
Android runtime
CVE-2021-0395
- init在重启过程中存在一个潜在的UAF漏洞,由于init在遍历需停止的服务列表时使用原始的服务对象指针,遍历到已停止的服务时可能存在UAF漏洞。
Framework
CVE-2021-0391
-
对多用户选择窗口添加
SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS
标志,防止悬浮窗劫持攻击。
CVE-2021-0398
-
在ActiveServices的
bindServiceLocked
方法中,调用shouldAllowWhileInUsePermissionInFgsLocked()
方法时传入了Binder.getCallingPid()
和Binder.getCallingUid()
的返回值作为pid和uid。然而在调用这些方法之前,先调用了Binder.clearCallingIdentity()
,这会导致获取到的pid和uid不正确。
// frameworks/base/services/core/java/com/android/server/am/ActiveServices.java int bindServiceLocked(IApplicationThread caller, IBinder token, Intent service, String resolvedType, final IServiceConnection connection, int flags, String instanceName, String callingPackage, final int userId) throws TransactionTooLargeException { //... + final int callingPid = Binder.getCallingPid(); + final int callingUid = Binder.getCallingUid(); //... final long origId = Binder.clearCallingIdentity(); //... if (!s.mAllowWhileInUsePermissionInFgs) { s.mAllowWhileInUsePermissionInFgs = shouldAllowWhileInUsePermissionInFgsLocked(callingPackage, - Binder.getCallingPid(), Binder.getCallingUid(), + callingPid, callingUid, service, s, false); } //... }
System
CVE-2021-0397
- 只会发起SDP扫描一次,如果已经有进行中的扫描,则直接返回。
// system/bt/bta/ag/bta_ag_sdp.cc + if (p_scb->p_disc_db != nullptr) { + android_errorWriteLog(0x534e4554, "174052148"); + APPL_TRACE_ERROR("Discovery already in progress... returning."); + return; + } +
CVE-2017-14491
- 在dnsmasq 2.78之前的版本中基于堆的缓冲区溢出允许远程攻击者通过精心设计的DNS响应导致拒绝服务(崩溃)或执行任意代码。这是一个历史漏洞。
- 详细分析: https://www.anquanke.com/post/id/87085
CVE-2021-0393
- V8的NewCapacity函数中存在一个堆缓冲区溢出,可能导致整型溢出。这是一个2018年的V8历史漏洞。
- 详情: https://bugs.chromium.org/p/chromium/issues/detail?id=914736
CVE-2021-0396
- V8的Builtins_MovExtraWideHandler中存在参数个数溢出,应该不能超过65534个。这是一个2018年的V8历史漏洞。
- 详情: https://bugs.chromium.org/p/chromium/issues/detail?id=902610
CVE-2021-0390
- 对WifiConfigManager中的部分Wi-Fi操作相关接口,要求必须是前台才允许调用。
CVE-2021-0392
- wificond中存在一个UAF漏洞,该漏洞是从上游同步的。
// system/connectivity/wificond/main.cpp android::wificond::NetlinkUtils netlink_utils(&netlink_manager); android::wificond::ScanUtils scan_utils(&netlink_manager); - unique_ptr<android::wificond::Server> server(new android::wificond::Server( + android::sp<android::wificond::Server> server(new android::wificond::Server( unique_ptr<InterfaceTool>(new InterfaceTool), &netlink_utils, &scan_utils)); - RegisterServiceOrCrash(server.get()); + RegisterServiceOrCrash(server); WifiKeystoreHalConnector keystore_connector; keystore_connector.start();
CVE-2021-0394
-
在ART的代码中,对
JNI::NewStringUTF()
增加校验,并且增加了SafetyNet日志记录。
2021-03-05 security patch level vulnerability details
「其他文章」