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:06:04 +0000 (15:06 -0700)
commit1e3b56033e820e0e065b3b0fc19d247118ab6532
treee97532ce35e5a987c899c438120d42f0d9e0338d
parent3762d7ed1a43bf9f1d690e09bff3217d1a475716
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