提交 168ed654 编写于 作者: T Tudor Ambarus 提交者: Marcel Holtmann

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: NTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 3814baf3
......@@ -122,7 +122,7 @@ int compute_ecdh_secret(struct crypto_kpp *tfm, const u8 public_key[64],
free_req:
kpp_request_free(req);
free_tmp:
kfree(tmp);
kzfree(tmp);
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册