[go: nahoru, domu]

CHROMIUM: Bluetooth: Require Read Encryption Key Size command

The HCI command Read Encryption Key Size is optional by the Bluetooth
standard. However, in Chrome OS we require the support of this command
to guarantee security.

This CL does the following:
* Disables Bluetooth if Read Local Commands shows that Read Encryption
  Key Size is not supported.
* Otherwise, always try to send command Read Encryption Key Size to the
  chip and abort the connection if the command fails (may be because
  it's unsupported by the chip.)
* Add kernel warning if we detect that Read Encryption Key Size command
  may be unsupported so we can evaluate chip security.

BUG=chromium:929763
TEST=Tested on caroline board with simulated unsupported commands.

Change-Id: I6992ce3530c9df47ee08f42705e28c1dd8652b66
Signed-off-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1501716
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Xiaoyong Zhou <xzhou@chromium.org>
2 files changed