diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2017-09-28 17:14:54 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2017-10-06 20:35:47 +0200 |
commit | 168ed65483a1777c2570f4c0a4a64e20a823cf25 (patch) | |
tree | f172be688f1c1b396c8646dcf0c604c86a7cb0ec /net/bluetooth | |
parent | 3814baf3f2473226e479fc1f4f48d01de2ce0a7b (diff) | |
download | blackbird-obmc-linux-168ed65483a1777c2570f4c0a4a64e20a823cf25.tar.gz blackbird-obmc-linux-168ed65483a1777c2570f4c0a4a64e20a823cf25.zip |
Bluetooth: ecdh_helper - fix leak of private key
tmp buffer contains the swapped private key. In case the setkey call
failed, the tmp buffer was freed without clearing the private key.
Zeroize the temporary buffer so we don't leak the private key.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/ecdh_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/ecdh_helper.c b/net/bluetooth/ecdh_helper.c index 22c8daa0b451..16e022f5ab27 100644 --- a/net/bluetooth/ecdh_helper.c +++ b/net/bluetooth/ecdh_helper.c @@ -122,7 +122,7 @@ free_all: free_req: kpp_request_free(req); free_tmp: - kfree(tmp); + kzfree(tmp); return err; } |