Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9878a84e authored by Hui Peng's avatar Hui Peng
Browse files

Reject access to secure services authenticated from temp bonding [2]

Reject access to service running on rfcomm

this is a backport of
I10fcc2dcd78fc22ffbe3c425669fc9889b94a166

Bug: 294854926
Test: m com.android.btservices
Ignore-AOSP-First: security
Merged-In: I10fcc2dcd78fc22ffbe3c425669fc9889b94a166
Change-Id: I10fcc2dcd78fc22ffbe3c425669fc9889b94a166
parent 232f4f81
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1898,6 +1898,11 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr,
                               security_required, p_callback, p_ref_data);
    } else /* rc == BTM_SUCCESS */
    {
      if (access_secure_service_from_temp_bond(p_dev_rec,
          is_originator, security_required)) {
        LOG_ERROR("Trying to access a secure rfcomm service from a temp bonding, reject");
        rc = BTM_FAILED_ON_SECURITY;
      }
      if (p_callback) {
        LOG_DEBUG("Notifying client that security access has been granted");
        (*p_callback)(&bd_addr, transport, p_ref_data, rc);