Bluetooth: use constant time memory comparison for secret values
authorJason A. Donenfeld <Jason@zx2c4.com>
Sat, 10 Jun 2017 02:59:11 +0000 (04:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:07:58 +0000 (15:07 -0700)
commit3da27a9d982798ece7f09dd3b259be8fe0bc3a11
tree9a9d32d2e6434b3961142691dbf074bbdbed7514
parentfe5cdbcdafaae75418307485b5d0ff5c66e250c4
Bluetooth: use constant time memory comparison for secret values

commit 329d82309824ff1082dc4a91a5bbed8c3bec1580 upstream.

This file is filled with complex cryptography. Thus, the comparisons of
MACs and secret keys and curve points and so forth should not add timing
attacks, which could either result in a direct forgery, or, given the
complexity, some other type of attack.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/smp.c