Backport OpenSSH application-specific defense against Rambleed, Rowhammer, Spectre, Meltdown

Description

Mitigation added by Google in June 2019

https://marc.info/?l=openbsd-cvs&m=156109087822676&w=2

Add protection for private keys at rest in RAM against speculation
and memory sidechannel attacks like Spectre, Meltdown, Rowhammer and
Rambleed. This change encrypts private keys when they are not in use
with a symmetic key that is derived from a relatively large "prekey"
consisting of random data (currently 16KB).

Attackers must recover the entire prekey with high accuracy before
they can attempt to decrypt the shielded private key, but the current
generation of attacks have bit error rates that, when applied
cumulatively to the entire prekey, make this unlikely.

Implementation-wise, keys are encrypted "shielded" when loaded and then
automatically and transparently unshielded when used for signatures or
when being saved/serialised.

Hopefully we can remove this in a few years time when computer
architecture has become less unsafe.

If feasible, perform the backport in the upstream OE layers that we are using in OpenXT

Validation Steps

None

Assignee

Unassigned

Reporter

Rich Persaud

Labels

None

QA Assignee

None

QA Image URL

None

Components

Fix versions

Priority

Blocker
Configure