shockley.net

ssh key reuse in Thales/Gemalto/SafeNet products

Categories: [Security]

Overview

Several Thales products (formerly Gemalto or SafeNet) embed the system's ssh key when the image is created.

Affected products

Vulnerability ID

CVE-2021-xxxxx (Waiting for number assignment by Thales)

Impact

Every virtual appliance uses the same server-side ssh keys, potentially allowing credential theft.

With access to source code, an attacker could build a malicious HSM or other appliance to capture credentials or keys.

While the chance to exploit this is pretty low, an encryption vulnerability an HSM vendor is egregious.

Workaround

You can regenerate ssh host keys on an existing system from the console or an existing ssh connection.

rm /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
/etc/init.d/ssh restart

Timeline

Note: I noticed this bug in March 2017 while testing ProtectV 3.5, and informed (at the time) Gemalto professional support. We implemented version 2.x which was not impacted. Unfortunately I didn't follow up on this until researching upgrade options.


  1. https://thalesdocs.com/ctp/cm/latest/release_notes/index.html#ssh-key-fingerprint-change-after-upgrade