Skip to content
Snippets Groups Projects
  1. Jan 10, 2023
    • Hui Peng's avatar
      Fix an OOB bug in btm_ble_read_remote_features_complete · 6aedab38
      Hui Peng authored
      Bug: 254445952
      Test: manual
      Tag: #security
      Ignore-AOSP-First: security
      Merged-In: I25f928cc9fa4b3338b1885412e5f894b4155da71
      Change-Id: I25f928cc9fa4b3338b1885412e5f894b4155da71
      6aedab38
    • Hui Peng's avatar
      45e8d2dc
    • Hui Peng's avatar
      Add regression test for b/255304475 · 362a9148
      Hui Peng authored
      Bug: 255304475
      Test: atest net_test_stack_btm
      Ignore-AOSP-First: security
      Tag: #security
      Merged-In: I3d1523b6dbadf75f682663504a0c932624c33d08
      Change-Id: I3d1523b6dbadf75f682663504a0c932624c33d08
      362a9148
    • Hui Peng's avatar
      Fix an OOB bug in btm_ble_clear_resolving_list_complete · 12576284
      Hui Peng authored
      Regression test: I3d1523b6dbadf75f682663504a0c932624c33d08
      
      Bug: 255304475
      Test: atest net_test_stack_btm
      Tag: #security
      Ignore-AOSP-First: security
      Merged-In: I3a8158a5db7e59acdaaa47e2327f6bdf492e47e7
      Change-Id: I3a8158a5db7e59acdaaa47e2327f6bdf492e47e7
      12576284
    • Hui Peng's avatar
      Add regression test for b/260078907 · 27200cfe
      Hui Peng authored
      Bug: 260078907
      Test: atest net_test_stack_btm
      Ignore-AOSP-First: security
      Tag: #security
      Merged-In: Ie8c6cb188cf7cde94d2f7dc0db04b3de51e08678
      Change-Id: Ie8c6cb188cf7cde94d2f7dc0db04b3de51e08678
      27200cfe
    • Hui Peng's avatar
      Fix an OOB bug in btm_ble_add_resolving_list_entry_complete · 73827ac5
      Hui Peng authored
      Regression test: Ie8c6cb188cf7cde94d2f7dc0db04b3de51e08678
      
      Bug: 260078907
      Test: atest net_test_stack_btm
      Tag: #security
      Ignore-AOSP-First: security
      Merged-In: I4aec266e09e33e8a19a9e33715fdb7ed7f4d4f58
      Change-Id: I4aec266e09e33e8a19a9e33715fdb7ed7f4d4f58
      73827ac5
    • Hui Peng's avatar
      Fix an OOB bug in BqrVseSubEvt::ParseBqrLinkQualityEvt · ecd5a3e8
      Hui Peng authored
      The size of the packet is not checked when
      `vendor_cap_supported_version >= kBqrIsoVersion` holds.
      This patch adds a check on the size in this code path.
      
      Bug: 242993878
      Test: manual
      Tag: #security
      Ignore-AOSP-First: security
      Merged-In: I3191701c54b342ef3cf2296de075666b13e3096e
      Change-Id: I3191701c54b342ef3cf2296de075666b13e3096e
      ecd5a3e8
    • Hui Peng's avatar
      Fix an OOB bug in bta_hh_co_get_rpt_rsp · d2e67f50
      Hui Peng authored
      Bug: 259675705
      Test: manual
      Tag: #security
      Ignore-AOSP-First: security
      Merged-In: I13be3103903631de4a0fa2080151bc89884c65c9
      Change-Id: I13be3103903631de4a0fa2080151bc89884c65c9
      d2e67f50
    • Hui Peng's avatar
      Fix a use-after-free bug in AttributionProcessor::OnWakelockReleased · 15fbebc8
      Hui Peng authored
      There is a use-after-free bug in AttributionProcessor::OnWakelockReleased
      resulted from a well-known misuse of using iterators to delete
      items in containers (the deleted items are used for calculating the next iterator
      in the next round). This patch fix it with correct usage.
      
      see the regression test is in I1709af943b6fa238dd4df41a62e6add36984c9ec
      
      Bug: 254774758
      Ignore-AOSP-First: security
      Test: atest bluetooth_test_gd_unit
      Merged-In: If9f14d5fe2fbf2150f2ab0d1f90ce0f263399227
      Change-Id: If9f14d5fe2fbf2150f2ab0d1f90ce0f263399227
      15fbebc8
    • Hui Peng's avatar
      Fix an OOB write in SDP_AddAttribute · 0846b5b7
      Hui Peng authored
      When the `attr_pad` becomes full, it is possible
      that un index of `-1` is computed write
      a zero byte to `p_val`, rusulting OOB write.
      
      ```
        p_val[SDP_MAX_PAD_LEN - p_rec->free_pad_ptr - 1] = '\0';
      ```
      
      Bug: 261867748
      Test: manual
      Tag: #security
      Ignore-AOSP-First: security
      Merged-In: I937d22a2df26fca1d7f06b10182c4e713ddfed1b
      Change-Id: I937d22a2df26fca1d7f06b10182c4e713ddfed1b
      0846b5b7
    • Hui Peng's avatar
      Fix an OOB access bug in A2DP_BuildMediaPayloadHeaderSbc · b0d7d4e8
      Hui Peng authored
      In  A2DP_BuildCodecHeaderSbc when p_buf->offset is 0, the
      `-=` operation on it may result in integer underflow and
      OOB write with the computed pointer passed to
      A2DP_BuildMediaPayloadHeaderSbc.
      
      The regression test is I2e026025ce49a02280dfcacd08f4bfc1b5d12264
      
      Bug: 186803518
      Test: atest net_test_stack_a2dp_codecs_native
      Ignore-AOSP-First: security
      Merged-In: I45320085b1e458d3b0e0d86162a35aaaae7b34cb
      Change-Id: I45320085b1e458d3b0e0d86162a35aaaae7b34cb
      b0d7d4e8
    • Hui Peng's avatar
  2. Jan 09, 2023
  3. Jan 06, 2023
    • Ted Wang's avatar
      Revert "Drop connection when atttempting to disable encryption" · 638e4875
      Ted Wang authored
      Bug: 259631398
      
      This reverts commit c5eee33a.
      
      Reason for revert: Causing b/259631398. Connection will be terminated unexpectedly when connection is in the middle of role switching with the device that does not support EPR.
      
      Test: Regression test
      Change-Id: I063e31fd74a8b319439386ecde4ce1a633b6d7bf
      Merged-In: I063e31fd74a8b319439386ecde4ce1a633b6d7bf
      (cherry picked from commit b2156728)
      638e4875
  4. Dec 13, 2022
    • Hui Peng's avatar
      Add regression test for b/258057241 · 5f8babc9
      Hui Peng authored
      Bug: 258057241
      Test: atest net_test_stack_avdtp
      Ignore-AOSP-First: security
      Merged-In: I9c87e30ed58e7ad6a34ab7c96b0a8fb06324ad54
      Change-Id: I9c87e30ed58e7ad6a34ab7c96b0a8fb06324ad54
      5f8babc9
    • Hui Peng's avatar
      Fix an OOB read in avdt_scb_hdl_pkt_no_frag · 89255db5
      Hui Peng authored
      The current implementation uses `pad_len = *(p_start + len);`
      to read the last byte from the packet, resulting one-byte
      out-of-bound read.
      
      Also avdt_scb_hdl_pkt_no_frag passes zero-lenth packets to
      upper-layer, this patch adds code to detect such packets
      and err out if detected.
      
      The regression test is I9c87e30ed58e7ad6a34ab7c96b0a8fb06324ad54
      
      Bug: 258057241
      Test: atest net_test_stack_avdtp
      Ignore-AOSP-First: security
      Merged-In: If0c7b25f2e6cb4531bbb6254e176e8ad1b5c5fb4
      Change-Id: If0c7b25f2e6cb4531bbb6254e176e8ad1b5c5fb4
      89255db5
  5. Dec 07, 2022
  6. Dec 05, 2022
  7. Dec 02, 2022
    • Robert Werthman's avatar
      Report failure when not able to connect to AVRCP · e74ee03c
      Robert Werthman authored
      A crash may occur when creating a bluetooth AVRCP connection to a
      device.
      
      The code fails to check a return value from an AVRCP function
      being used to index into an array. The return value may exceed the
      size of the array causing memory outside the bounds of the array to be
      accessed leading to memory corruption and a crash.
      
      The fix is to ensure the return value is within the bounds of the
      array before accessing the array contents. If the return value is
      not within the bounds of the array report it as a failure to the
      bluetooth stack.
      
      This change is relevant for android automotive because the IVI
      (in-vehicle infotainment system) acts as the an AVRCP controller
      which still executes this code.
      
      Note: this is a backport of b/214569798, inducted as a non-security
      issue.  Per b/226927612 it has been found to have security impact
      and should be backported to earlier branches.
      
      Bug: 226927612
      Test: Manual - set return value to be out of bounds, verify no crash
      Tag: #security
      Ignore-AOSP-First: Security
      Change-Id: Ic284268c2241b6a7de146057b9842873907de59c
      e74ee03c
  8. Nov 30, 2022
    • Brian Delwiche's avatar
      Merge "Fix OPP comparison" into tm-dev · d9948659
      Brian Delwiche authored
      d9948659
    • Brian Delwiche's avatar
      Fix OPP comparison · bbbbdb52
      Brian Delwiche authored
      isBluetoothShareUri_correctlyCheckUri (under
      com.android.bluetooth.opp.BluetoothOppUtilityTest) is failing
      on null input due to an incorrect comparison in
      isBluetoothShareUri.  Change the comparison to one which can
      cope with null input.
      
      Bug: 257190999
      Test: atest: BluetoothOppUtilityTest
      Tag: #security
      Ignore-AOSP-First: Security
      Change-Id: I61118f22577de7b975fb0df8dac8583e91f7b8c7
      (cherry picked from commit c9b53b95)
      Merged-In: I61118f22577de7b975fb0df8dac8583e91f7b8c7
      bbbbdb52
  9. Nov 08, 2022
    • Brian Delwiche's avatar
      Fix buffer overflow in BRSF · f8adec66
      Brian Delwiche authored
      bta_hf_client_at does not properly check bounds on its inputs,
      allowing a buffer overflow when fed a buffer that is more than
      twice the expected maximum size.  Add a new bounds check to
      enforce, and a new security test to validate.
      
      Bug: 231156521
      Test: atest: BtaHfClientSecurityTest
      Tag: #security
      Ignore-AOSP-First: Security
      
      Change-Id: I2cf89a786ba7cd0423eaccd8082bd824ac2f0d43
      f8adec66
  10. Nov 04, 2022
    • Brian Delwiche's avatar
      Drop connection when atttempting to disable encryption · 8c63c7c1
      Brian Delwiche authored
      Pixel devices in the field appear not to drop the connection or
      reestablish encryption after receiving a command to disable link
      layer encryption on an encrypted link, a certification
      requirement.  Add a check forcing connections to drop in this case.
      
      Bug: 251436534
      Test: atest: bluetooth, lab validation forthcoming
      Tag: #security
      Ignore-AOSP-First: Security
      Change-Id: Ie9d69be65fa1163c1ee10ca19153e98e737743cb
      8c63c7c1
  11. Oct 04, 2022
  12. Oct 03, 2022
    • Rahul Arya's avatar
      Add flag to toggle IRK rotation · 031dc503
      Rahul Arya authored
      Based on discussion in linked bug, to prevent further regressions if the
      latest fixes are still incomplete.
      
      Bug: 195410559
      Test: compiles
      Ignore-AOSP-First: security
      Change-Id: I1741929c639f2dbc6417974bf3287d8d141e33df
      (cherry picked from commit 924c3a96)
      Merged-In: I1741929c639f2dbc6417974bf3287d8d141e33df
      031dc503
    • Rahul Arya's avatar
      Reschedule address rotation after connection to advertising set · acffc03f
      Rahul Arya authored
      Otherwise we stop rotating our address and lose all benefits of privacy.
      
      Ignore-AOSP-First: Security fix
      Bug: 246692649
      Bug: 195410559
      Test: Nearby QA test, and I'll write a cert test eventually
      Tag: #stability
      Change-Id: Ib63d79256acbb956413849c17f761aa902fa2eae
      (cherry picked from commit 279e3c3a)
      Merged-In: Ib63d79256acbb956413849c17f761aa902fa2eae
      acffc03f
    • Rahul Arya's avatar
      Rotate advertising set addresses on IRK change · 57d4dc3e
      Rahul Arya authored
      We need to pause all advertising before changing the random address, and
      we need to also change the addresses used for each advertising set. We
      also should ensure no active connections etc. are taking place when the
      address is changed.
      
      Note that this means there will be some latency between the address
      change in legacy before it is changed in GD, but I don't know how to
      avoid this.
      
      Ignore-AOSP-First: Security fix
      Test: manual / TODO
      Bug: 245453591
      Bug: 195410559
      Tag: #stability
      BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
      
      Change-Id: Ia897a55320741993467d286550949a802657d399
      (cherry picked from commit b275c66d)
      Merged-In: Ia897a55320741993467d286550949a802657d399
      57d4dc3e
    • Brian Delwiche's avatar
  13. Sep 29, 2022
  14. Sep 28, 2022
  15. Sep 27, 2022
    • Brian Delwiche's avatar
      Add bounds check in avdt_scb_act.cc · 789d4bc6
      Brian Delwiche authored
      Bug: 242535997
      Test: BT unit tests, validated against researcher POC
      Tag: #security
      Ignore-AOSP-First: Security
      Change-Id: Id3b665da0214e3c93f277e31077214fcd1d936e7
      789d4bc6
  16. Sep 26, 2022
  17. Sep 23, 2022
  18. Sep 13, 2022
  19. Sep 12, 2022
  20. Sep 06, 2022
Loading