1. 18 3月, 2015 1 次提交
    • J
      Bluetooth: Add workaround for broken OS X legacy SMP pairing · 19c5ce9c
      Johan Hedberg 提交于
      OS X version 10.10.2 (and possibly older versions) doesn't support LE
      Secure Connections but incorrectly copies all authentication request
      bits from a Security Request to its Pairing Request. The result is that
      an SC capable initiator (such as BlueZ) will think OS X intends to do SC
      when in fact it's incapable of it:
      
      < ACL Data TX: Handle 3585 flags 0x00 dlen 6
            SMP: Security Request (0x0b) len 1
              Authentication requirement: Bonding, No MITM, SC, No Keypresses (0x09)
      > ACL Data RX: Handle 3585 flags 0x02 dlen 11
            SMP: Pairing Request (0x01) len 6
              IO capability: KeyboardDisplay (0x04)
              OOB data: Authentication data not present (0x00)
              Authentication requirement: Bonding, No MITM, SC, No Keypresses (0x09)
              Max encryption key size: 16
              Initiator key distribution: EncKey (0x01)
              Responder key distribution: EncKey IdKey Sign (0x07)
      < ACL Data TX: Handle 3585 flags 0x00 dlen 11
            SMP: Pairing Response (0x02) len 6
              IO capability: NoInputNoOutput (0x03)
              OOB data: Authentication data not present (0x00)
              Authentication requirement: Bonding, No MITM, SC, No Keypresses (0x09)
              Max encryption key size: 16
              Initiator key distribution: EncKey (0x01)
              Responder key distribution: EncKey Sign (0x05)
      
      The pairing eventually fails when we get an unexpected Pairing Confirm
      PDU instead of a Public Key PDU:
      
      > ACL Data RX: Handle 3585 flags 0x02 dlen 21
            SMP: Pairing Confirm (0x03) len 16
              Confim value: bcc3bed31b8f313a78ec3cce32685faf
      
      It is only at this point that we can speculate that the remote doesn't
      really support SC. This patch creates a workaround for the just-works
      model, however the MITM case is unsolvable because the OS X user has
      already been requested to enter a PIN which we're now expected to
      randomly generate and show the user (i.e. a chicken-and-egg problem).
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      19c5ce9c
  2. 17 3月, 2015 9 次提交
  3. 16 3月, 2015 6 次提交
  4. 14 3月, 2015 1 次提交
  5. 13 3月, 2015 1 次提交
  6. 12 3月, 2015 1 次提交
  7. 28 2月, 2015 1 次提交
  8. 21 2月, 2015 1 次提交
  9. 01 2月, 2015 1 次提交
  10. 16 1月, 2015 1 次提交
  11. 15 1月, 2015 3 次提交
  12. 14 1月, 2015 1 次提交
  13. 03 1月, 2015 2 次提交
  14. 30 12月, 2014 5 次提交
  15. 10 12月, 2014 2 次提交
  16. 09 12月, 2014 1 次提交
  17. 08 12月, 2014 1 次提交
  18. 03 12月, 2014 2 次提交
    • J
      Bluetooth: Fix false-positive "uninitialized" compiler warning · 580039e8
      Johan Hedberg 提交于
      Some gcc versions don't seem to be able to properly track the flow of
      the smp_cmd_pairing_random() function and end up causing the following
      types of (false-positive) warnings:
      
       smp.c:1995:6: warning: ‘nb’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
       smp.c:1995:6: warning: ‘na’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
             ^
       smp.c:1995:6: warning: ‘pkbx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
             ^
       smp.c:1995:6: warning: ‘pkax’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
      
      This patch fixes the issue by moving the pkax/pkbx and na/nb
      initialization earlier in the function.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      580039e8
    • J
      Bluetooth: Fix minor coding style issue in smp.c · 7f376cd6
      Johan Hedberg 提交于
      The convention for checking for NULL pointers is !ptr and not
      ptr == NULL. This patch fixes such an occurrence in smp.c.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      7f376cd6