Commit 28eaad75 authored by David S. Miller's avatar David S. Miller

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth

Johan Hedberg says:

====================
pull request: bluetooth 2015-08-11

Here's an important regression fix for the 4.2-rc series that ensures
user space isn't given invalid LTK values. The bug essentially prevents
the encryption of subsequent LE connections, i.e. makes it impossible to
pair devices over LE.

Let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents c68875fa cb92205b
...@@ -7820,7 +7820,7 @@ void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, bool persistent) ...@@ -7820,7 +7820,7 @@ void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, bool persistent)
/* Make sure we copy only the significant bytes based on the /* Make sure we copy only the significant bytes based on the
* encryption key size, and set the rest of the value to zeroes. * encryption key size, and set the rest of the value to zeroes.
*/ */
memcpy(ev.key.val, key->val, sizeof(key->enc_size)); memcpy(ev.key.val, key->val, key->enc_size);
memset(ev.key.val + key->enc_size, 0, memset(ev.key.val + key->enc_size, 0,
sizeof(ev.key.val) - key->enc_size); sizeof(ev.key.val) - key->enc_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment