Use of libssl can sometimes lead to reuse of DH keys in OpenSSL PKCS#11 engine. This can lead to incorrect session key values to be computed by pk11_DH_compute_key() because the check done in check_new_dh_key() is too weak. Pointer comparison is not enough when the addresses remain the same but the contents change. This could be either thanks to deliberate DH structure reuse or a side effect of heap allocator. The high level manifestation of this problem could be e.g. failed SSL handshakes because of invalid DH keypair used for session key computation.