Skip to content

Commit

Permalink
Bluetooth: SMP: MITM security possible without IO when OOB data present
Browse files Browse the repository at this point in the history
Allow Security level HIGH and FIPS to be initiated when we have received
OOB data for the remote device. The security property of MITM is allowed
if out of band authentication data is available.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
  • Loading branch information
joerchan authored and carlescufi committed Aug 9, 2019
1 parent 835b1c1 commit a2531e1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions subsys/bluetooth/host/smp.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2338,9 +2338,12 @@ static bool sec_level_reachable(struct bt_conn *conn)
case BT_SECURITY_MEDIUM: case BT_SECURITY_MEDIUM:
return true; return true;
case BT_SECURITY_HIGH: case BT_SECURITY_HIGH:
return get_io_capa() != BT_SMP_IO_NO_INPUT_OUTPUT; return get_io_capa() != BT_SMP_IO_NO_INPUT_OUTPUT ||
(bt_auth && bt_auth->oob_data_request && oobd_present);
case BT_SECURITY_FIPS: case BT_SECURITY_FIPS:
return get_io_capa() != BT_SMP_IO_NO_INPUT_OUTPUT && return (get_io_capa() != BT_SMP_IO_NO_INPUT_OUTPUT ||
(bt_auth && bt_auth->oob_data_request &&
oobd_present)) &&
sc_supported; sc_supported;
default: default:
return false; return false;
Expand Down

0 comments on commit a2531e1

Please sign in to comment.