mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-13 09:54:36 -05:00
59bf3b75c7
https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/353117 https://review.lineageos.org/q/topic:Q_asb_2023-03 https://review.lineageos.org/q/topic:Q_asb_2023-04 https://review.lineageos.org/q/topic:Q_asb_2023-05 https://review.lineageos.org/q/topic:Q_asb_2023-06 https://review.lineageos.org/q/topic:Q_asb_2023-07 https://review.lineageos.org/q/topic:Q_asb_2023-08 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376560 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376561 https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376562 https://review.lineageos.org/q/topic:Q_asb_2023-09 https://review.lineageos.org/q/topic:Q_asb_2023-10 https://review.lineageos.org/q/topic:Q_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/376563 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_webp/+/376568 https://review.lineageos.org/q/topic:Q_asb_2023-12 https://review.lineageos.org/q/topic:Q_asb_2024-01 https://review.lineageos.org/q/topic:Q_asb_2024-02 https://review.lineageos.org/q/topic:Q_asb_2024-03 Signed-off-by: Tavi <tavi@divested.dev>
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Hui Peng <phui@google.com>
|
|
Date: Sat, 2 Sep 2023 04:27:29 +0000
|
|
Subject: [PATCH] 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
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5e0e907ec4948f06b3a35ecf08725c020d533ccb)
|
|
Merged-In: I10fcc2dcd78fc22ffbe3c425669fc9889b94a166
|
|
Change-Id: I10fcc2dcd78fc22ffbe3c425669fc9889b94a166
|
|
---
|
|
stack/btm/btm_sec.cc | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/stack/btm/btm_sec.cc b/stack/btm/btm_sec.cc
|
|
index d4377a1fe..6163c3fb7 100644
|
|
--- a/stack/btm/btm_sec.cc
|
|
+++ b/stack/btm/btm_sec.cc
|
|
@@ -2425,6 +2425,11 @@ tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr, uint16_t psm,
|
|
mx_chan_id, 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(LOG_TAG, "Trying to access a secure rfcomm service from a temp bonding, reject");
|
|
+ rc = BTM_FAILED_ON_SECURITY;
|
|
+ }
|
|
/* access granted */
|
|
if (p_callback) {
|
|
(*p_callback)(&bd_addr, transport, p_ref_data, (uint8_t)rc);
|