OSDN Git Service

android-x86/system-bt.git
4 years ago[automerger skipped] GattServcer: Check invalid offset am: c14c1fb864 -s ours am...
Automerger Merge Worker [Tue, 10 Mar 2020 21:39:14 +0000 (21:39 +0000)]
[automerger skipped] GattServcer: Check invalid offset am: c14c1fb864 -s ours am: e3b33dec09 -s ours am: 2dd6490cfe -s ours

am skip reason: Change-Id I97e2c3ae15fccc482d07d8d621c455cc74900cfd with SHA-1 7674de8fc8 is in history

Change-Id: I498e1841598b1142881eb386ef9e46faa754cabb

4 years ago[automerger skipped] GattServcer: Check invalid offset am: c14c1fb864 -s ours am...
Automerger Merge Worker [Tue, 10 Mar 2020 21:22:16 +0000 (21:22 +0000)]
[automerger skipped] GattServcer: Check invalid offset am: c14c1fb864 -s ours am: e3b33dec09 -s ours

am skip reason: Change-Id I97e2c3ae15fccc482d07d8d621c455cc74900cfd with SHA-1 7674de8fc8 is in history

Change-Id: Id5714e151ff13706e496b71898712b9410be7746

4 years ago[automerger skipped] GattServcer: Check invalid offset am: c14c1fb864 -s ours
Automerger Merge Worker [Tue, 10 Mar 2020 21:02:22 +0000 (21:02 +0000)]
[automerger skipped] GattServcer: Check invalid offset am: c14c1fb864 -s ours

am skip reason: Change-Id I97e2c3ae15fccc482d07d8d621c455cc74900cfd with SHA-1 7674de8fc8 is in history

Change-Id: Ied357d149b40fd00da201593f9d3e16c899fa7ca

4 years agoGattServcer: Check invalid offset
Hansong Zhang [Thu, 13 Feb 2020 19:40:44 +0000 (11:40 -0800)]
GattServcer: Check invalid offset

Test: manual
Bug: 143231677
Change-Id: I0396380f431cdb7f91c78db6de9043ea0f373dfe
Merged-In: I97e2c3ae15fccc482d07d8d621c455cc74900cfd
Merged-In: I0ca22e7c60292d61c758120c1cd67f6e6edd8ae8

4 years agoGattServcer: Check invalid offset am: 7674de8fc8 am: 8b1db2dabf
Automerger Merge Worker [Tue, 10 Mar 2020 03:12:00 +0000 (03:12 +0000)]
GattServcer: Check invalid offset am: 7674de8fc8 am: 8b1db2dabf

Change-Id: I1d497b86f89219c8a8885f17bf969a670c6433b6

4 years agoGattServcer: Check invalid offset am: 7674de8fc8
Automerger Merge Worker [Tue, 10 Mar 2020 02:51:00 +0000 (02:51 +0000)]
GattServcer: Check invalid offset am: 7674de8fc8

Change-Id: I84a04a3671ff7d501bf9bfb483830ec48d30ce62

4 years agoGattServcer: Check invalid offset
Hansong Zhang [Thu, 13 Feb 2020 19:40:44 +0000 (11:40 -0800)]
GattServcer: Check invalid offset

Test: manual
Bug: 143231677
Change-Id: I97e2c3ae15fccc482d07d8d621c455cc74900cfd
Merged-In: I0ca22e7c60292d61c758120c1cd67f6e6edd8ae8

4 years agoAAC Decoder: Use osi_free() to free buffers allocated by osi_malloc() am: 7a6fd5459e...
Automerger Merge Worker [Tue, 3 Mar 2020 23:49:37 +0000 (23:49 +0000)]
AAC Decoder: Use osi_free() to free buffers allocated by osi_malloc() am: 7a6fd5459e am: c4d6c95107

Change-Id: I7f0f617b594bd6800a92d5a04e8ef0ce0f285cd2

4 years agoAAC Decoder: Use osi_free() to free buffers allocated by osi_malloc() am: 7a6fd5459e
Automerger Merge Worker [Tue, 3 Mar 2020 23:32:21 +0000 (23:32 +0000)]
AAC Decoder: Use osi_free() to free buffers allocated by osi_malloc() am: 7a6fd5459e

Change-Id: I8fb43f7467aedd4e36237d7f355c8ed175e1e33c

4 years agoAAC Decoder: Use osi_free() to free buffers allocated by osi_malloc()
Hansong Zhang [Tue, 11 Feb 2020 23:15:22 +0000 (15:15 -0800)]
AAC Decoder: Use osi_free() to free buffers allocated by osi_malloc()

* buffers allocated by osi_malloc() have canary bytes around it and need special method
  osi_free() to free them

Bug: 148107188
Test: manual
Change-Id: Ifcfe494737c47e33755297214d3f637852a8be0b
(cherry picked from commit b88f8057fd28ca271ccd436a17f6489d4cf46697)

4 years agoL2CAP socket: Stop L2CAP server by ID instead of PSM
Jack He [Tue, 28 Jan 2020 03:33:45 +0000 (19:33 -0800)]
L2CAP socket: Stop L2CAP server by ID instead of PSM

* There could be multiple L2CAP socket control blocks with the same PSM
* The unique identifier for a L2CAP socket control block should be the
  unique ID allocated during control block initialization
* Use this ID to track L2CAP socket control block instead of PSM ensure
  that we close the correct socket
* Reset GAP handle and L2CAP socket ID to 0 when calling
  bta_jv_free_l2c_cb() so that disconnected L2CAP control blocks does
  not count

Test: CtsVerifier
Bug: 147997447
Bug: 144148429
Change-Id: Ideb428bc73aa0b36b8deb20fac280e44c8fe7db1
(cherry picked from commit ad23e6b2f473829b1819918cd3f927d1134c83b3)

4 years agoL2CAP Socket: Keep track of last allocated socket ID
Jack He [Tue, 28 Jan 2020 01:09:17 +0000 (17:09 -0800)]
L2CAP Socket: Keep track of last allocated socket ID

* Keep track of last allocated socket ID in L2CAP socket stack
* Use last_sock_id + 1 as new IDs when allocating new socket blocks
* The de-dupe and overflow detection mechanism in btsock_l2cap_alloc_l()
  would handle the uint32_t overflow and duplicate ID cases

Test: CtsBluetoothTestCases
Bug: 144148429
Change-Id: Ieb9791ffa34eef919a32e4aff6f4b514859c69c0
(cherry picked from commit 79eda3270bbd23814b5ec73ee3fd96ac80222db8)

4 years agoLE-COC: Free LE-COC server resource when BluetoothServerSocket is closed
Jack He [Fri, 17 Jan 2020 00:20:06 +0000 (16:20 -0800)]
LE-COC: Free LE-COC server resource when BluetoothServerSocket is closed

* When BluetoothServerSocket is closed in the Java layer, the native
  layer should respond by freeing all resources used by the server
  including file descriptors, structs, PSMs, and security IDs
* We did this correctly for BR_EDR L2CAP COC channels after
  I4e37dcd858af258fbd64fbfb2fbf0083bd743e06, but the same fix did not
  apply to LE COC
* This CL make sure LE COC server resources are freed propertly upon
  server fd closure

Test: open and close LE COC server repeatedly on an Android phone
Fixes: 144148429
Change-Id: I16fa10e77612105d23848f71925ff6efc95bc75a
(cherry picked from commit d3c9966624530772fbdc469179726bd9191314c5)

4 years agoMerge "L2CAP: Check length for packet before connection complete" into qt-qpr1-dev
TreeHugger Robot [Fri, 20 Dec 2019 18:45:07 +0000 (18:45 +0000)]
Merge "L2CAP: Check length for packet before connection complete" into qt-qpr1-dev

4 years agoMerge "HCI: Check length of connection complete event" into qt-qpr1-dev
Mike Logan [Fri, 20 Dec 2019 18:35:38 +0000 (18:35 +0000)]
Merge "HCI: Check length of connection complete event" into qt-qpr1-dev

4 years agoMerge "L2CAP: Bounds check num_handles in NumCompletedPackets" into qt-qpr1-dev
TreeHugger Robot [Fri, 20 Dec 2019 18:08:56 +0000 (18:08 +0000)]
Merge "L2CAP: Bounds check num_handles in NumCompletedPackets" into qt-qpr1-dev

4 years agoMerge "Fix potential OOB when parsing inquiry results" into qt-qpr1-dev
TreeHugger Robot [Fri, 20 Dec 2019 18:07:53 +0000 (18:07 +0000)]
Merge "Fix potential OOB when parsing inquiry results" into qt-qpr1-dev

4 years agoMerge "VSC batch scan: Check packet length" into qt-qpr1-dev
TreeHugger Robot [Fri, 20 Dec 2019 18:04:52 +0000 (18:04 +0000)]
Merge "VSC batch scan: Check packet length" into qt-qpr1-dev

4 years agoL2CAP: Check length for packet before connection complete
Hansong Zhang [Fri, 18 Oct 2019 20:14:23 +0000 (13:14 -0700)]
L2CAP: Check length for packet before connection complete

Bug: 141745011
Test: Run POC
Change-Id: I9dc27521fa2e7f6ea345ec65dc9d3e873d71ef0f

4 years agoVSC batch scan: Check packet length
Hansong Zhang [Fri, 18 Oct 2019 20:36:43 +0000 (13:36 -0700)]
VSC batch scan: Check packet length

Bug: 142543524
Test: POC
Merged-In: I32633d5e6dfdd17b00d468cfd29ad081ae91f0e4
Change-Id: I32633d5e6dfdd17b00d468cfd29ad081ae91f0e4

4 years agoMerge changes from topic "NIAP_patch" into qt-qpr1-dev
Weichin Weng [Fri, 20 Dec 2019 08:38:01 +0000 (08:38 +0000)]
Merge changes from topic "NIAP_patch" into qt-qpr1-dev

* changes:
  DO NOT MERGE: NIAP: Use AES-GCM 256 bits to encrypt key.
  DO NOT MERGE: NIAP: Use keystore to encrypt KEY

4 years agoL2CAP: Bounds check num_handles in NumCompletedPackets
Myles Watson [Thu, 10 Oct 2019 20:36:06 +0000 (13:36 -0700)]
L2CAP: Bounds check num_handles in NumCompletedPackets

Bug: 141617601
Test: Pair and connect
Change-Id: I1a8ff39f677c6957e99a4d3cbd278720dd273a83
(cherry picked from commit 2506db7d01939b286e34e404b80a73e6f4dc8593)

4 years agoHCI: Check length of connection complete event
Myles Watson [Thu, 10 Oct 2019 21:19:33 +0000 (14:19 -0700)]
HCI: Check length of connection complete event

Fixes: 141619686
Test: Pair and connect
Change-Id: Ib15d6a8cbb8c6a7404bf1afa023277429029867d
(cherry picked from commit 7ee6458cf4939ad78dbebd70c2520ad56c31f4a9)

4 years agoFix potential OOB when parsing inquiry results
Jakub Pawlowski [Fri, 4 Oct 2019 14:40:41 +0000 (16:40 +0200)]
Fix potential OOB when parsing inquiry results

Bug: 141620271
Change-Id: I30c7558b1ae1a77d0004760ef831480347a06e11
(cherry picked from commit c44516749af81bc5fc79afc0772f42bf0ec37bd4)

4 years agoMerge "Handle BQR root inflammation event" into qt-qpr1-dev
TreeHugger Robot [Thu, 19 Dec 2019 16:47:01 +0000 (16:47 +0000)]
Merge "Handle BQR root inflammation event" into qt-qpr1-dev

4 years agoHandle BQR root inflammation event
Ugo Yu [Tue, 26 Nov 2019 09:18:32 +0000 (17:18 +0800)]
Handle BQR root inflammation event

* When Bluetooth process recieves BQR root inflammation event, wait
  5 seconds for possible DEBUG_INFO events, then abort.
* Fix the DEBUG_INFO not working problem.
* Do not immediately abort when HAL service dies if abort_timer has
  already started, so we won't interrupt log collecting procedure.

Bug: 145568772
Bug: 144572644
Bug: 144592765
Test: Manual
Change-Id: Ibe6c341a3e9aabec33de8d3f90c4a6a3403d06bc
Merged-In: Ibe6c341a3e9aabec33de8d3f90c4a6a3403d06bc

4 years agoDO NOT MERGE: NIAP: Use AES-GCM 256 bits to encrypt key.
weichinweng [Mon, 16 Dec 2019 02:58:03 +0000 (10:58 +0800)]
DO NOT MERGE: NIAP: Use AES-GCM 256 bits to encrypt key.

use AES-GCM 256 bits to encrypt key.

Bug: 140483038
Test: NA
Change-Id: Ie5e85edf4fd8dbd9120ea383fd3b9214b6026816

4 years agoDO NOT MERGE: NIAP: Use keystore to encrypt KEY
weichinweng [Fri, 22 Nov 2019 03:57:08 +0000 (11:57 +0800)]
DO NOT MERGE: NIAP: Use keystore to encrypt KEY

Encrypt Classic and LE key via kerstore.

Bug: 140483038
Test: Manual
- Pair a device after OOBE
- adb shell settings put global niap_mode 1
- Re-enable Bluetooth
- Ensured that the Key was read correctly
- Ensured that the Key was encrypted when stored on disk

Change-Id: I6ece990135fb0a16eef3ecf6508ca759eee2c4c6

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:59:26 +0000 (08:59 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev am: 561bf0a604 -s ours am: ad6365c078 -s ours am: d0afd04b43 -s ours am: 81882c385d -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 291307f66c is in history

Change-Id: I0724d8046c8f5c53d5284a7fbf294acf25172d43

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:59:14 +0000 (08:59 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 2039ca38e9 am: 5b85308108 am: 477e110c07 -s ours am: 45d039f2bc -s ours am: d8bf9a6516 -s ours am: 58a17c1e7f -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 291307f66c is in history

Change-Id: If8b5e513ee4e041254b6bde0a415f23c7167e955

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:58:57 +0000 (08:58 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev am: 40a52c224f -s ours am: 818467c30d -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 140d8297ac is in history

Change-Id: If5e64421b909b65df488489c03023f5c5b89f7bf

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:46:16 +0000 (08:46 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev am: 561bf0a604 -s ours am: ad6365c078 -s ours am: d0afd04b43 -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 291307f66c is in history

Change-Id: I2d70a9464106f5b271c072a88f8717d6802955b0

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:46:02 +0000 (08:46 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 2039ca38e9 am: 5b85308108 am: 477e110c07 -s ours am: 45d039f2bc -s ours am: d8bf9a6516 -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 291307f66c is in history

Change-Id: I60dc5b1a01024e46318fc710e265c28fa5efeeb8

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:45:43 +0000 (08:45 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev am: 40a52c224f -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 140d8297ac is in history

Change-Id: I53f83d0fa0fd712160e2cba5957b8e8dd0204711

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:39:59 +0000 (08:39 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev am: 561bf0a604 -s ours am: ad6365c078 -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 291307f66c is in history

Change-Id: I872656ceacaa6387b21773a44ca2a55783dc4e37

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:39:44 +0000 (08:39 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 2039ca38e9 am: 5b85308108 am: 477e110c07 -s ours am: 45d039f2bc -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 291307f66c is in history

Change-Id: I3a0c05b891878f12bb242007e589652e960a90e1

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev
TreeHugger Robot [Wed, 4 Dec 2019 08:37:08 +0000 (08:37 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:31:45 +0000 (08:31 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev am: 561bf0a604 -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 b4e8a17daa is in history

Change-Id: Iab0bb64fa4b03ea97330346476993a4812802264

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:31:44 +0000 (08:31 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev am: 7f3b214ec9 am: 5f1bca6b9a am: 954bbdc172 -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 2aa92f871c is in history

Change-Id: I66dbc18fe8af551249eb493de070d5e64bb01bfd

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Automerger Merge Worker [Wed, 4 Dec 2019 08:31:33 +0000 (08:31 +0000)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 2039ca38e9 am: 5b85308108 am: 477e110c07 -s ours
am skip reason: Change-Id Iaca4db4ee9bf27362f62aba0da088727e98955d1 with SHA-1 140d8297ac is in history

Change-Id: I818670e4df7c0d3b8d401fa8f6152aea39a412f1

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc...
TreeHugger Robot [Wed, 4 Dec 2019 08:29:41 +0000 (08:29 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-mr1-dev

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc...
Automerger Merge Worker [Wed, 4 Dec 2019 08:22:12 +0000 (08:22 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 2039ca38e9 am: 5b85308108

Change-Id: I8c6f23a3cc7cfdb08242cbaa68ea62830ea49ccb

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi...
Automerger Merge Worker [Wed, 4 Dec 2019 08:19:54 +0000 (08:19 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev am: 7f3b214ec9 am: 5f1bca6b9a

Change-Id: I4a2fda2ab7b244ec584452400393ad0c3fe2e386

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc...
Automerger Merge Worker [Wed, 4 Dec 2019 08:13:37 +0000 (08:13 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 2039ca38e9

Change-Id: I0767ba267fc51a926930288752a1a079414d5a76

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi...
Automerger Merge Worker [Wed, 4 Dec 2019 08:09:17 +0000 (08:09 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev am: 7f3b214ec9

Change-Id: I965a027aa120a668c2474ce12520e8cf66856770

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev
TreeHugger Robot [Wed, 4 Dec 2019 08:04:13 +0000 (08:04 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev

4 years agoMerge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev
TreeHugger Robot [Wed, 4 Dec 2019 07:49:36 +0000 (07:49 +0000)]
Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev

4 years agoMerge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc3...
Automerger Merge Worker [Wed, 4 Dec 2019 00:28:48 +0000 (00:28 +0000)]
Merge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc32195 am: 52cd67a7de am: 6ef3486983 am: 7b3e597303 am: ed89932fdc

Change-Id: I11f172a9c5631fee04183a58f18176497ae56d73

4 years agoMerge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc3...
Automerger Merge Worker [Wed, 4 Dec 2019 00:17:03 +0000 (00:17 +0000)]
Merge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc32195 am: 52cd67a7de am: 6ef3486983 am: 7b3e597303

Change-Id: If737087dc356efde7f2f7c3cc844cbbe7e948e2f

4 years agoMerge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc3...
Automerger Merge Worker [Tue, 3 Dec 2019 23:56:58 +0000 (23:56 +0000)]
Merge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc32195 am: 52cd67a7de am: 6ef3486983

Change-Id: Idf52ecb11c7193b6711f87579fcc5a069025b1b3

4 years agoMerge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc3...
Automerger Merge Worker [Tue, 3 Dec 2019 23:39:45 +0000 (23:39 +0000)]
Merge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc32195 am: 52cd67a7de

Change-Id: I8aefeefb2a55d3548d47b10dab533bc7bff704f9

4 years agoMerge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc32195
Automerger Merge Worker [Tue, 3 Dec 2019 23:29:41 +0000 (23:29 +0000)]
Merge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6 am: 1f3bc32195

Change-Id: I08a3792c2110c102e1a61051ff74bfa8ef8735c8

4 years agoMerge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6
Automerger Merge Worker [Tue, 3 Dec 2019 23:21:52 +0000 (23:21 +0000)]
Merge "SDP: add return after SDP disconnection" into oc-dev am: 765abc5cb6

Change-Id: I4adccd7acc83181359c798527f6231a2b29e4429

4 years agoMerge "SDP: add return after SDP disconnection" into oc-dev
TreeHugger Robot [Tue, 3 Dec 2019 23:03:51 +0000 (23:03 +0000)]
Merge "SDP: add return after SDP disconnection" into oc-dev

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 01:31:32 +0000 (01:31 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01 am: 5dbe08152a am: 294e64950c am: 28523075a6 am: dee808040c

Change-Id: I5fa64cfa93c5884b69a68dbcc9d117f71b1515a8

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 01:20:25 +0000 (01:20 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01 am: 5dbe08152a am: 294e64950c am: 28523075a6

Change-Id: If031a82d0c25708dfd2c99ba9db88bd5f014de0e

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 01:06:32 +0000 (01:06 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01 am: 5dbe08152a am: 294e64950c

Change-Id: I69396f7e01601ac6298b7a626268e96c1538dea0

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 00:58:27 +0000 (00:58 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01 am: 5dbe08152a

Change-Id: I9b78c5b36d9d1382f307fabacc20bb74d2e91322

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2...
Automerger Merge Worker [Tue, 3 Dec 2019 00:47:12 +0000 (00:47 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2 am: 5d8fde3e01

Change-Id: I95231c695e0ec4a413c3cce64b3ea16936cc1bff

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2
Automerger Merge Worker [Tue, 3 Dec 2019 00:40:09 +0000 (00:40 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev am: 2a8a9b22f2

Change-Id: I9ed3a6586a87f199cef8b90d8c8c7d6bbb862823

4 years agoMerge "GAP: Correct the continuous pkt length in l2cap" into oc-dev
TreeHugger Robot [Tue, 3 Dec 2019 00:33:29 +0000 (00:33 +0000)]
Merge "GAP: Correct the continuous pkt length in l2cap" into oc-dev

4 years agoMerge "Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio...
TreeHugger Robot [Fri, 29 Nov 2019 06:38:23 +0000 (06:38 +0000)]
Merge "Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks by no devices" into qt-qpr1-dev

4 years agoHearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks...
Cheney Ni [Wed, 10 Jul 2019 08:24:31 +0000 (16:24 +0800)]
Hearing Aid: Remove std::promise from suspend / resume calls, and stop audio ticks by no devices

The Hearing Aid uses the stack main thread to be the media task thread.
This thread handles events / feeds audio data sequentially, and won't
have a race condition within the single thread. The promise is a bit
redundant, but wasted time to cause a potential deadlock that the caller
waits for the task thread finished which needed the caller's resource.

This CL also stops the audio ticks when no devices available, and no
need to wait for next timer expired. Besides, move all timer controls
into the media task thread, so timer is started / stopped at the same
thread, too.

Bug: 134996542
Test: add big delay within functions, and check no abnormal manually
Change-Id: If0b279a191d86b30db41a682dc7f0ad9470cb10e
Merged-In: If0b279a191d86b30db41a682dc7f0ad9470cb10e
(cherry picked from commit 90ba872a726b4b66c0b6af29e602dfee65edb710)

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Tue, 26 Nov 2019 03:46:38 +0000 (11:46 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than
HCI_EXT_FEATURES_PAGE_MAX.

Bug: 141552859
Bug: 144205318
Test: inject function
Merged-In: Iaca4db4ee9bf27362f62aba0da088727e98955d1
Change-Id: Iaca4db4ee9bf27362f62aba0da088727e98955d1

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Tue, 26 Nov 2019 03:46:38 +0000 (11:46 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than
HCI_EXT_FEATURES_PAGE_MAX.

Bug: 141552859
Bug: 144205318
Test: inject function
Merged-In: Iaca4db4ee9bf27362f62aba0da088727e98955d1
Change-Id: Iaca4db4ee9bf27362f62aba0da088727e98955d1

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Tue, 26 Nov 2019 03:46:38 +0000 (11:46 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than
HCI_EXT_FEATURES_PAGE_MAX.

Bug: 141552859
Bug: 144205318
Test: inject function
Merged-In: Iaca4db4ee9bf27362f62aba0da088727e98955d1
Change-Id: Iaca4db4ee9bf27362f62aba0da088727e98955d1

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Tue, 26 Nov 2019 03:46:38 +0000 (11:46 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than
HCI_EXT_FEATURES_PAGE_MAX.

Bug: 141552859
Bug: 144205318
Test: inject function
Merged-In: Iaca4db4ee9bf27362f62aba0da088727e98955d1
Change-Id: Iaca4db4ee9bf27362f62aba0da088727e98955d1

4 years agoFix potential OOB write in btm_read_remote_ext_features_complete
Ted Wang [Tue, 26 Nov 2019 03:46:38 +0000 (11:46 +0800)]
Fix potential OOB write in btm_read_remote_ext_features_complete

Add event length check to avoid hci event sent from controller not
correct.
Add page number check to avoid page number is bigger than
HCI_EXT_FEATURES_PAGE_MAX.

Bug: 141552859
Bug: 144205318
Test: inject function
Merged-In: Iaca4db4ee9bf27362f62aba0da088727e98955d1
Change-Id: Iaca4db4ee9bf27362f62aba0da088727e98955d1

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:53:28 +0000 (19:53 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev am: c5cbe3c7fb am: 274af11d49 am: 3b768c89a9
am: 627dccaa50

Change-Id: I67fdbb33c160b2146eab0f2f31caf2dd938b1b6d

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:53:10 +0000 (19:53 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into pi-dev am: 9f4246c83b am: 373dd096ba
am: 82763b80e8

Change-Id: Ica7a1af601af5370653b8873bfca552e4c431a3d

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:50:57 +0000 (19:50 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev am: c5cbe3c7fb am: 274af11d49
am: 3b768c89a9

Change-Id: I3908b00449687861fdcc9b46b35cbcc5ef9007f7

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:50:39 +0000 (19:50 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into pi-dev am: 9f4246c83b
am: 373dd096ba

Change-Id: Ie96b7d9290233712edb3c21a6e9fa05d56954b7e

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:47:02 +0000 (03:47 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev am: c5cbe3c7fb am: 274af11d49

Change-Id: I1cbe42de33365dec1cd292ad8ed97c26a40eecce

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:46:52 +0000 (03:46 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev am: c5cbe3c7fb

Change-Id: I6cc380ce5e08ea003cc2d12a767cff8a53705b6e

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:46:51 +0000 (03:46 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into pi-dev am: 9f4246c83b

Change-Id: Ie79dc03533d04e41429f8e9f918e23d8e97fe7fa

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:33:50 +0000 (03:33 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-mr1-dev

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:33:50 +0000 (03:33 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into pi-dev

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:30:33 +0000 (19:30 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4 am: a651e35ad0 am: 91f38752fa am: 9d7aa50fb7
am: 9e976434fe

Change-Id: I62a7aefbeaeb699b21daf88ccd16b1d72f3c0438

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 03:28:10 +0000 (19:28 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4 am: a651e35ad0 am: 91f38752fa
am: 9d7aa50fb7

Change-Id: Ia8a5e5a10eaba77db43760e48b166f427fcaf501

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:18:01 +0000 (03:18 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4 am: a651e35ad0 am: 91f38752fa

Change-Id: I58e7827a9e995e44a43bf58a8bd647a66e32d5dc

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 03:04:10 +0000 (03:04 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4 am: a651e35ad0

Change-Id: Idf9a04bc8291f8e08ca504c373d77750c1280b74

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 02:55:04 +0000 (02:55 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec am: 53afb387a4

Change-Id: I22fb89a33d6265470d4dc82a19d3ff66ce1ad9fa

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Automerger Merge Worker [Tue, 26 Nov 2019 02:45:55 +0000 (02:45 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev am: aa754ed3ec

Change-Id: I2cc0a9befe3c2b0412d53bad6b7790e61119cae2

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 02:44:11 +0000 (18:44 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into qt-dev am: db7ae0ecc0
am: a9b717c00f

Change-Id: Ic37a3ead8287b567157df927b7557eeb506e15a0

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 02:41:51 +0000 (18:41 -0800)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into qt-dev
am: db7ae0ecc0

Change-Id: Ia54ec1a9162039d515c4209df614ddba73858cd6

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 02:37:56 +0000 (02:37 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into oc-dev

4 years agoMerge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"...
Ted Wang [Tue, 26 Nov 2019 02:37:43 +0000 (02:37 +0000)]
Merge "Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"" into qt-dev

4 years agoSDP: add return after SDP disconnection
Zongheng Wang [Tue, 12 Nov 2019 20:59:44 +0000 (12:59 -0800)]
SDP: add return after SDP disconnection

A return is needed after sdp_disconnect(). It is the logic
expected and it prevents the use of p_ccb after it's freed.

Bug: 144177780
Bug: 117105007
Test: manual test
Change-Id: I7a64382b36adca37a8ff0c7e361d89ecdc8f3b55
(cherry picked from commit 30efc8c90a846460359a489e17e1461c725958b3)

4 years agoRevert "Fix potential OOB write in btm_read_remote_ext_features_complete"
Adam Seaton [Fri, 22 Nov 2019 19:29:41 +0000 (19:29 +0000)]
Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"

This reverts commit 9935f2ba7d9e78ff4c82bd3384960e27072a0b21.

Reason for revert: reverting due to functional regressions in Auto.

Bug: 144205318
Change-Id: I41dbcc0c5cb88dc72b13db2dd76e4751d7e98a6c

4 years agoRevert "Fix potential OOB write in btm_read_remote_ext_features_complete"
Adam Seaton [Fri, 22 Nov 2019 19:29:29 +0000 (19:29 +0000)]
Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"

This reverts commit 0d7723d147012c3141d259cce24745eb446ff1b1.

Reason for revert: reverting due to functional regressions in Auto.

Bug: 144205318
Change-Id: I96ec04beeb8eb4cb307f45c3c2a02d267c00c8fc

4 years agoRevert "Fix potential OOB write in btm_read_remote_ext_features_complete"
Adam Seaton [Fri, 22 Nov 2019 19:29:14 +0000 (19:29 +0000)]
Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"

This reverts commit 33a71f2955f1254d2f96fd4a4d16d44463a21423.

Reason for revert: reverting due to functional regressions in Auto.

Bug: 144205318
Change-Id: I6e1d62f370fc910e91c0919dcb3f37fa2f3c7bf5

4 years agoRevert "Fix potential OOB write in btm_read_remote_ext_features_complete"
Adam Seaton [Fri, 22 Nov 2019 18:46:38 +0000 (18:46 +0000)]
Revert "Fix potential OOB write in btm_read_remote_ext_features_complete"

This reverts commit efcedeb60ea270cf6be228a88da4cf3bad65975c.

Reason for revert: reverting from release branches due to functional regressions in Auto.

Bug: 144205318
Change-Id: I80d7fb4f910e6c5c88668141e83ca48401151496

4 years agoGAP: Correct the continuous pkt length in l2cap
Venkata Jagadeesh Garaga [Thu, 18 Apr 2019 11:43:49 +0000 (17:13 +0530)]
GAP: Correct the continuous pkt length in l2cap

L2cap continuous pkt length wrongly calculated in
reassembly logic when remote sends more data
than expected.

Wrong pkt length leading to memory corruption

Hence the Correct the continuous pkt length in
l2cap reassembly logic.

Bug: 135239489
Bug: 143894715
CRs-Fixed: 2434229
Test: make and internal testing
Change-Id: I758d9e31465b99e436b9b1841320000f08186c97
Merged-In: I758d9e31465b99e436b9b1841320000f08186c97
(cherry picked from commit 337bd4579453bd6bf98ff519de3ac1019cd30d28)

4 years agoAdd protection to prevent null pointer dereference.
jonerlin [Mon, 11 Nov 2019 13:09:00 +0000 (21:09 +0800)]
Add protection to prevent null pointer dereference.

* Potential null pointer dereference risk to cause Bluetooth native
crash.

Bug: 144102387
Test: Pair with BLE device
Change-Id: I1986899a3f4e472a68a589fa2465118d66a27915

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 22:04:15 +0000 (14:04 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 981e2483c6 am: 4b700057ae -s ours am: b830f4e39c -s ours am: db3402061d -s ours am: 3a9fd92f40 -s ours
am: a4d464a0b0 -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 9935f2ba7d is in history

Change-Id: I3107d4706b1faa2d49a4272123aa66a1454c3206

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 22:00:17 +0000 (14:00 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev am: 86a71f0ddd -s ours am: facbbf5fa7 -s ours
am: 121bddf18c -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: I9778c7294b0b3f3554c4505cd787378fc4711e3d

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:42:38 +0000 (13:42 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 981e2483c6 am: 4b700057ae -s ours am: b830f4e39c -s ours am: db3402061d -s ours
am: 3a9fd92f40 -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 9935f2ba7d is in history

Change-Id: Ibdd16959dd14a9e6b0bd95a65f898eb83db0eb12

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:37:39 +0000 (13:37 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into pi-dev am: 86a71f0ddd -s ours
am: facbbf5fa7 -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: I912662be3c4414538d309dde7a496912fc5419b7

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:32:17 +0000 (13:32 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into qt-dev am: bbcded2f6a -s ours
am: 70c79e56bd -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 0d7723d147 is in history

Change-Id: Ifbdb17bf91e24056ec0226d98fb869a557ae6e93

4 years ago[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_c...
Ted Wang [Wed, 6 Nov 2019 21:26:49 +0000 (13:26 -0800)]
[automerger skipped] Merge "Fix potential OOB write in btm_read_remote_ext_features_complete" into oc-dev am: 981e2483c6 am: 4b700057ae -s ours am: b830f4e39c -s ours
am: db3402061d -s ours
am skip reason: change_id I3bd7349f382aa0e42123bbd835dcb60b77af099a with SHA1 9935f2ba7d is in history

Change-Id: I0f3149c5c7c95950e58d15040764ae1997cd9b7d