More 14.1 picks + 15.1 November ASB work

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2022-11-13 18:03:16 -05:00
parent 14f7f1db32
commit 9d1efb33c3
No known key found for this signature in database
GPG key ID: B286E9F57A07424B
25 changed files with 2017 additions and 22 deletions

View file

@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brian Delwiche <delwiche@google.com>
Date: Fri, 12 Aug 2022 17:26:19 +0000
Subject: [PATCH] Add negative length check in process_service_search_rsp
Bug: 225876506
Test: run supplied POC (updated to Android T)
Tag: #security
Ignore-AOSP-First: Security
Change-Id: I0054806e47ed9d6eb8b034a41c8c872fee7f1eca
(cherry picked from commit 18d69eb958493d4879786e2edb42ff4e60334a2f)
Merged-In: I0054806e47ed9d6eb8b034a41c8c872fee7f1eca
---
stack/sdp/sdp_discovery.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stack/sdp/sdp_discovery.cc b/stack/sdp/sdp_discovery.cc
index dcacda832..11491f790 100644
--- a/stack/sdp/sdp_discovery.cc
+++ b/stack/sdp/sdp_discovery.cc
@@ -289,7 +289,7 @@ static void process_service_search_rsp(tCONN_CB* p_ccb, uint8_t* p_reply,
orig = p_ccb->num_handles;
p_ccb->num_handles += cur_handles;
- if (p_ccb->num_handles == 0) {
+ if (p_ccb->num_handles == 0 || p_ccb->num_handles < orig) {
SDP_TRACE_WARNING("SDP - Rcvd ServiceSearchRsp, no matches");
sdp_disconnect(p_ccb, SDP_NO_RECS_MATCH);
return;

View file

@ -0,0 +1,34 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brian Delwiche <delwiche@google.com>
Date: Sat, 13 Aug 2022 02:01:14 +0000
Subject: [PATCH] Add buffer in pin_reply in bluetooth.cc
Bug: 228602963
Test: make
Tag: #security
Ignore-AOSP-First: Security
Change-Id: I2a2c9a106a485c319841491f7acc2d667e4d0e75
(cherry picked from commit 0dc1c1c34961822f2f3f0a1e8e0b4819c823951b)
Merged-In: I2a2c9a106a485c319841491f7acc2d667e4d0e75
---
btif/src/bluetooth.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/btif/src/bluetooth.cc b/btif/src/bluetooth.cc
index 38f992b9c..1121a587d 100644
--- a/btif/src/bluetooth.cc
+++ b/btif/src/bluetooth.cc
@@ -285,10 +285,12 @@ static int get_connection_state(const RawAddress* bd_addr) {
static int pin_reply(const RawAddress* bd_addr, uint8_t accept, uint8_t pin_len,
bt_pin_code_t* pin_code) {
+ bt_pin_code_t tmp_pin_code;
/* sanity check */
if (interface_ready() == false) return BT_STATUS_NOT_READY;
- return btif_dm_pin_reply(bd_addr, accept, pin_len, pin_code);
+ memcpy(&tmp_pin_code, pin_code, pin_len);
+ return btif_dm_pin_reply(bd_addr, accept, pin_len, &tmp_pin_code);
}
static int ssp_reply(const RawAddress* bd_addr, bt_ssp_variant_t variant,