aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Peng <phui@google.com>2023-09-05 14:04:39 -0700
committerJulian Veit <claymore1298@gmail.com>2023-12-06 13:30:09 +0100
commitc8c9aaef545052baba5c9c7870cdd538cb7a447f (patch)
tree3c436ef15724fb8970427364d724f8308c421901
parentdb98b9191d71886b289c68a31dd05437e57f4a3e (diff)
Reject access to secure service authenticated from a temp bonding [3]
Allow access to rfcomm PSM by default Original bug Bug: 294854926 Nearby regressions: Bug: 298539299 Test: m com.android.btservices Ignore-AOSP-First: security (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9e4cef217f1d1e11fb7b74765ec17200e618bc24) Merged-In: If1f7c9278a9e877f64ae78b6f067c597fb5d0e66 Change-Id: If1f7c9278a9e877f64ae78b6f067c597fb5d0e66
-rw-r--r--system/stack/btm/btm_sec.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/stack/btm/btm_sec.cc b/system/stack/btm/btm_sec.cc
index da174f40b5..0f38b9169f 100644
--- a/system/stack/btm/btm_sec.cc
+++ b/system/stack/btm/btm_sec.cc
@@ -1661,15 +1661,15 @@ tBTM_STATUS btm_sec_l2cap_access_req_by_requirement(
btm_cb.security_mode == BTM_SEC_MODE_SC) {
if (BTM_SEC_IS_SM4(p_dev_rec->sm4)) {
if (is_originator) {
- /* SM4 to SM4 -> always authenticate & encrypt */
- security_required |= (BTM_SEC_OUT_AUTHENTICATE | BTM_SEC_OUT_ENCRYPT);
+ /* SM4 to SM4 -> always encrypt */
+ security_required |= BTM_SEC_OUT_ENCRYPT;
} else /* acceptor */
{
/* SM4 to SM4: the acceptor needs to make sure the authentication is
* already done */
chk_acp_auth_done = true;
- /* SM4 to SM4 -> always authenticate & encrypt */
- security_required |= (BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT);
+ /* SM4 to SM4 -> always encrypt */
+ security_required |= BTM_SEC_IN_ENCRYPT;
}
} else if (!(BTM_SM4_KNOWN & p_dev_rec->sm4)) {
/* the remote features are not known yet */