Skip to content
Snippets Groups Projects
  1. Jan 09, 2025
  2. Nov 06, 2024
  3. Oct 14, 2024
    • Brian Delwiche's avatar
      Fix OOB writes in gatt_sr.cc · c7468e64
      Brian Delwiche authored
      At various points in gatt_sr.cc, the output of the
      gatt_tcb_get_payload_size function is used without checking for a
      positive length.  However, in exceptional cases it is possible for the
      channel to be closed at the time the function is called, which will lead
      to a zero length and cause an OOB write in subsequent processing.
      
      Fix all of these.
      
      Bug: 364026473
      Bug: 364027038
      Bug: 364027949
      Bug: 364025411
      Test: m libbluetooth
      Test: researcher POC
      Flag: EXEMPT trivial validity checks
      Tag: #security
      Ignore-AOSP-First: Security
      (cherry picked from commit 7de5617f)
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:130861eadc3d9eda593df949666e561dd1f020fc)
      Merged-In: I9b30499d4aed6ab42f3cdb2c0de7df2c1a827404
      Change-Id: I9b30499d4aed6ab42f3cdb2c0de7df2c1a827404
      c7468e64
  4. Oct 09, 2024
  5. Aug 07, 2024
  6. Jul 10, 2024
    • Brian Delwiche's avatar
      Add support for checking security downgrade · fbdaf02a
      Brian Delwiche authored
      As a guard against the BLUFFS attack, we will need to check the security
      parameters of incoming connections against cached values and disallow
      connection if these parameters are downgraded or changed from their
      cached values.
      
      Future CLs will add checks during connection.  This CL adds the
      functions that will be needed to perform those checks and the necessary
      mocks.
      Currently supported checks are : IO capabilities (must be an exact match),
      Secure Connections capability (must not be a downgrade), and session key
      length (must not be a downgrade).  Maximum session key length, which was
      previously not cached, has been added to the device security manager
      cache.
      
      To QA: This CL is a logical no-op by itself.  Tests should be performed as described in ag/25815924 and ag/25815925/
      
      Bug: 314331379
      Test: m libbluetooth
      Tag: #security
      Ignore-AOSP-First: Security
      (cherry picked from commit 3cf3d9d9)
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c17811e6a2357eb34368a1a0a6ed5dec19d980ed)
      Merged-In: I972fd4a3a4d4566968d097df9f27396a821fb24f
      Change-Id: I972fd4a3a4d4566968d097df9f27396a821fb24f
      fbdaf02a
    • Brian Delwiche's avatar
      Disallow connect with key length downgrade · 024980ba
      Brian Delwiche authored
      As a guard against the BLUFFS attack, check security parameters of
      incoming connections against cached values and disallow connection if
      these parameters are downgraded or changed from their cached values.
      
      This CL adds the connection-time check for session key length.
      
      To test, please validate that bonding can be established and
      reestablished against devices with session key lengths of 7 and 16 bits,
      that session key lengths of less than 7 bits are refused, and that basic
      LE bonding functionality still works.  If it is possible to configure a
      remote device to establish a bond with a session key length of 16 bits
      and then reduce that key length to <16 bits before reconnection, this
      should fail.
      
      Bug: 314331379
      Test: m libbluetooth
      Test: manual
      
      Tag: #security
      Ignore-AOSP-First: Security
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d6e9fdf182afb57cecac6c56603aa20d758090a4)
      Merged-In: I27be1f93598820a0f2a7154ba83f5b041878c21f
      Change-Id: I27be1f93598820a0f2a7154ba83f5b041878c21f
      024980ba
    • Brian Delwiche's avatar
      Disallow connect with Secure Connections downgrade · b5155f05
      Brian Delwiche authored
      As a guard against the BLUFFS attack, check security parameters of
      incoming connections against cached values and disallow connection if
      these parameters are downgraded or changed from their cached values.
      
      This CL adds the connection-time check for Secure Connections mode.
      
      Bug: 314331379
      Test: m libbluetooth
      Test: manual
      
      To test this CL, please ensure that BR/EDR initial connections and reconnections  (after cycling remote devices, cycling Bluetooth, restarting the phone, etc.) work against remote devices which both support and do not support Secure Connections mode, and with all supported bonding types.  Basic validation of LE bonding functionality should be done as well.
      
      Tag: #security
      Ignore-AOSP-First: Security
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f20fdd9b3225a6084f6b666172817fe0a89f0679)
      Merged-In: I9130476600d31b59608e0e419b5136d255174265
      Change-Id: I9130476600d31b59608e0e419b5136d255174265
      b5155f05
  7. Jun 06, 2024
    • Brian Delwiche's avatar
      Fix heap-buffer overflow in sdp_utils.cc · 6afad4b3
      Brian Delwiche authored
      Fuzzer identifies a case where sdpu_compare_uuid_with_attr crashes with
      an out of bounds comparison.  Although the bug claims this is due to a
      comparison of a uuid with a smaller data field thana the discovery
      attribute, my research suggests that this instead stems from a
      comparison of a 128 bit UUID with a discovery attribute of some other,
      invalid size.
      
      Add checks for discovery attribute size.
      
      Bug: 287184435
      Test: atest bluetooth_test_gd_unit, net_test_stack_sdp
      Tag: #security
      Ignore-AOSP-First: Security
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7bbdb139bf91dca86c72c33a74c0e3407938c487)
      Merged-In: I8e16ae525815bcdd47a2379ee8e5a6de47a3ac43
      Change-Id: I8e16ae525815bcdd47a2379ee8e5a6de47a3ac43
      6afad4b3
  8. May 08, 2024
  9. Jan 11, 2024
  10. Dec 16, 2023
  11. Dec 06, 2023
  12. Nov 10, 2023
  13. Oct 11, 2023
  14. Aug 30, 2023
  15. Aug 22, 2023
  16. Aug 05, 2023
  17. Jun 28, 2023
  18. Jun 09, 2023
Loading