1. 16 Mar, 2015 3 commits
    • Marcel Holtmann's avatar
      Bluetooth: Use kzfree instead of kfree in security manager · 276812ec
      Marcel Holtmann authored
      Within the security manager, it makes sense to use kzfree instead of
      kfree for all data structures. This ensures that no key material leaks
      by accident.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      276812ec
    • Marcel Holtmann's avatar
      Bluetooth: Remove unneeded HCI_CONN_REMOTE_OOB connection flag · aefedc1a
      Marcel Holtmann authored
      The HCI_CONN_REMOTE_OOB connection flag is used to indicate if the
      pairing initiator has provided out-of-band data. However since that
      value is no longer used in any decision making, just remove it.
      
      It is actually unclear what purpose the OOB data present field from
      the HCI IO Capability Response event serves in the first place. If
      either side provided out-of-band data, then that data will be used
      for pairing.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      aefedc1a
    • Marcel Holtmann's avatar
      Bluetooth: Fix BR/EDR out-of-band pairing with only initiator data · 455c2ff0
      Marcel Holtmann authored
      When only the pairing initiator is providing out-of-band data, then
      the receiver side was ignoring the data. For some reason the code was
      checking if the initiator has received out-of-band data and only then
      also provide the required inidication that the acceptor actually has
      the needed data available.
      
      For BR/EDR out-of-band pairing it is enough if one side has received
      out-of-band data. There are no extra checks needed here to make this
      work smoothly. The only thing that is needed is to tell the controller
      if data is present (and if it is P-192 or P-256 or both) and then let
      the controller actually figure out the rest.
      
      This means the check for outgoing connection or if the initiator has
      indicated data are completely pointless and are in fact actually
      causing harm. The check in question is this one:
      
         if (conn->out || test_bit(HCI_CONN_REMOTE_OOB, &conn->flags)) {
      
      After just taking the conditional check out and always executing the
      code for determining the type of out-of-band data, the pairing works
      flawlessly and prodcudes authenticated link keys.
      
      The patch itself looks more complicated due to the reformatting of the
      indentation, but it essentially just a two-line change.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      455c2ff0
  2. 15 Mar, 2015 18 commits
  3. 14 Mar, 2015 19 commits