Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Although the moon is smaller than the earth, it is farther away.


devel / comp.arch / Register file data sampling

SubjectAuthor
* Register file data samplingAnton Ertl
+* Re: Register file data samplingMichael S
|`* Re: Register file data samplingAnton Ertl
| `* Re: Register file data samplingMichael S
|  `- Re: Register file data samplingAnton Ertl
+- Re: Register file data samplingMitchAlsup1
`- Re: Register file data samplingAnton Ertl

1
Register file data sampling

<2024Mar14.105824@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=38010&group=comp.arch#38010

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Register file data sampling
Date: Thu, 14 Mar 2024 09:58:24 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 28
Message-ID: <2024Mar14.105824@mips.complang.tuwien.ac.at>
Injection-Info: dont-email.me; posting-host="0d801c044d2db3a240bc57678b8a28b8";
logging-data="1638730"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/L4HAaSdfwOTSMBCIqN842"
Cancel-Lock: sha1:lpt96pkvTmBVlHtQGnEwiVcPYCk=
X-newsreader: xrn 10.11
 by: Anton Ertl - Thu, 14 Mar 2024 09:58 UTC

Intel's E-Cores (aka Atom by some, including Intel people; I
personnally use "Atom" only for (in-order) Bonnell-based CPUs) from at
least Goldmont onwards have a vulnerability called "Register file data
sampling". Apparently Intel has discovered this on their own, so the
only thing we have about this is a rather thin description
<https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/register-file-data-sampling.html>
that does not explain what is happening. But apparently there is some
way to extract the data from free physical registers.

Supposedly the vulnerability does not allow the attacker "to choose
which data is inferred using these methods", which I find hard to
believe; that would require non-determinism in the register allocation
implementation, or in the mechanism that allows extracting this
information. In any case, even if you do not know whether the
register contains the desired secret, the attacker gets a good
candidate list by getting a few hundred of such register contents and
then working with those few hundred instead of having to brute-force
with 2^64 or 2^128 possible values.

As a mitigation mechanism, they have tacked microcode onto the VERW
instruction that apparently clears enough state to avoid revealing any
stale register contants from before the VERW instruction. So one
should use VERW when exiting secret-handling code.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Register file data sampling

<20240314135435.00001379@yahoo.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=38012&group=comp.arch#38012

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5chosen@yahoo.com (Michael S)
Newsgroups: comp.arch
Subject: Re: Register file data sampling
Date: Thu, 14 Mar 2024 13:54:35 +0200
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <20240314135435.00001379@yahoo.com>
References: <2024Mar14.105824@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="5c5cd9e25eab93927139eb22892a80cb";
logging-data="1592818"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BTVtYZoZxYfy3KsIiHv6LZPcB4B7OD9E="
Cancel-Lock: sha1:P7UiqcMJqXqFk4BPp80QGnv7Z/0=
X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
 by: Michael S - Thu, 14 Mar 2024 11:54 UTC

On Thu, 14 Mar 2024 09:58:24 GMT
anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

> Intel's E-Cores (aka Atom by some, including Intel people; I
> personnally use "Atom" only for (in-order) Bonnell-based CPUs) from at
> least Goldmont onwards have a vulnerability called "Register file data
> sampling".

I think, it's worse.
Airmont is affected. There is a big chance that Silvermont is affected
too.
In practice, I'd guess that effect on Airmont/Silvermont is less severe,
because Future Register Files are smaller.

> Apparently Intel has discovered this on their own, so the
> only thing we have about this is a rather thin description
> <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/register-file-data-sampling.html>
> that does not explain what is happening. But apparently there is some
> way to extract the data from free physical registers.
>
> Supposedly the vulnerability does not allow the attacker "to choose
> which data is inferred using these methods", which I find hard to
> believe; that would require non-determinism in the register allocation
> implementation, or in the mechanism that allows extracting this
> information. In any case, even if you do not know whether the
> register contains the desired secret, the attacker gets a good
> candidate list by getting a few hundred of such register contents and
> then working with those few hundred instead of having to brute-force
> with 2^64 or 2^128 possible values.
>
> As a mitigation mechanism, they have tacked microcode onto the VERW
> instruction that apparently clears enough state to avoid revealing any
> stale register contants from before the VERW instruction. So one
> should use VERW when exiting secret-handling code.
>
> - anton

According to my understanding, 'one' in this case is the OS that does
context switch. Doing VERW on return from majority of crypto
routine looks both less important and less useful.

I suppose, Intel feels really lucky that none of affected processors
supports SMT.

Re: Register file data sampling

<fb84797891694cdd4154c3010d0233bb@www.novabbs.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=38018&group=comp.arch#38018

  copy link   Newsgroups: comp.arch
Date: Thu, 14 Mar 2024 16:53:32 +0000
Subject: Re: Register file data sampling
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.arch
X-Rslight-Site: $2y$10$9Hi8XpXzOUBPJGTiR9Ub5etQ3wYbv2ehYeuFvipGGc9pjuEGZPI5.
X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Rocksolid Light
References: <2024Mar14.105824@mips.complang.tuwien.ac.at>
Organization: Rocksolid Light
Message-ID: <fb84797891694cdd4154c3010d0233bb@www.novabbs.org>
 by: MitchAlsup1 - Thu, 14 Mar 2024 16:53 UTC

Anton Ertl wrote:

> Intel's E-Cores (aka Atom by some, including Intel people; I
> personnally use "Atom" only for (in-order) Bonnell-based CPUs) from at
> least Goldmont onwards have a vulnerability called "Register file data
> sampling". Apparently Intel has discovered this on their own, so the
> only thing we have about this is a rather thin description
> <https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/register-file-data-sampling.html>
> that does not explain what is happening. But apparently there is some
> way to extract the data from free physical registers.

See how much NOT-HAVING a FP register file does for security-----You no longer
need a flag to decide to [re]load or not. and thus using it or not takes
exactly the same amount of time.

In addition to having HW reload all the files when touched (or earlier)!

With nothing deferred, there is no timing window to measure !!!

> Supposedly the vulnerability does not allow the attacker "to choose
> which data is inferred using these methods", which I find hard to
> believe; that would require non-determinism in the register allocation
> implementation, or in the mechanism that allows extracting this
> information. In any case, even if you do not know whether the
> register contains the desired secret, the attacker gets a good
> candidate list by getting a few hundred of such register contents and
> then working with those few hundred instead of having to brute-force
> with 2^64 or 2^128 possible values.

> As a mitigation mechanism, they have tacked microcode onto the VERW
> instruction that apparently clears enough state to avoid revealing any
> stale register contants from before the VERW instruction. So one
> should use VERW when exiting secret-handling code.

> - anton

Re: Register file data sampling

<2024Mar14.175829@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=38019&group=comp.arch#38019

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Register file data sampling
Date: Thu, 14 Mar 2024 16:58:29 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 31
Message-ID: <2024Mar14.175829@mips.complang.tuwien.ac.at>
References: <2024Mar14.105824@mips.complang.tuwien.ac.at> <20240314135435.00001379@yahoo.com>
Injection-Info: dont-email.me; posting-host="0d801c044d2db3a240bc57678b8a28b8";
logging-data="1830436"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DSDVGR4KBFrInQnvFbUMk"
Cancel-Lock: sha1:2uVJMveEmZC8e167tonQwoz8CTM=
X-newsreader: xrn 10.11
 by: Anton Ertl - Thu, 14 Mar 2024 16:58 UTC

Michael S <already5chosen@yahoo.com> writes:
>On Thu, 14 Mar 2024 09:58:24 GMT
>anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
>
>> Intel's E-Cores (aka Atom by some, including Intel people; I
>> personnally use "Atom" only for (in-order) Bonnell-based CPUs) from at
>> least Goldmont onwards have a vulnerability called "Register file data
>> sampling".
>
>I think, it's worse.
>Airmont is affected.

Citation needed.

>> As a mitigation mechanism, they have tacked microcode onto the VERW
>> instruction that apparently clears enough state to avoid revealing any
>> stale register contants from before the VERW instruction. So one
>> should use VERW when exiting secret-handling code.
>
>According to my understanding, 'one' in this case is the OS that does
>context switch. Doing VERW on return from majority of crypto
>routine looks both less important and less useful.

Why do you think so? It seems very important and useful to me. You
don't want your passwords or secret keys lying around in registers
from where an attacker (say, some JavaScript code) might extract them.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Register file data sampling

<20240314194148.00004342@yahoo.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=38025&group=comp.arch#38025

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: already5chosen@yahoo.com (Michael S)
Newsgroups: comp.arch
Subject: Re: Register file data sampling
Date: Thu, 14 Mar 2024 19:41:48 +0200
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <20240314194148.00004342@yahoo.com>
References: <2024Mar14.105824@mips.complang.tuwien.ac.at>
<20240314135435.00001379@yahoo.com>
<2024Mar14.175829@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="5c5cd9e25eab93927139eb22892a80cb";
logging-data="1714959"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tGOrD1Ji7Yg4Pqzq42srCdsnLL3Jabw4="
Cancel-Lock: sha1:QTdNeBHQ1SvN7YppRlfgsv80BbY=
X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
 by: Michael S - Thu, 14 Mar 2024 17:41 UTC

On Thu, 14 Mar 2024 16:58:29 GMT
anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:

> Michael S <already5chosen@yahoo.com> writes:
> >On Thu, 14 Mar 2024 09:58:24 GMT
> >anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
> >
> >> Intel's E-Cores (aka Atom by some, including Intel people; I
> >> personnally use "Atom" only for (in-order) Bonnell-based CPUs)
> >> from at least Goldmont onwards have a vulnerability called
> >> "Register file data sampling".
> >
> >I think, it's worse.
> >Airmont is affected.
>
> Citation needed.
>

My mistake. I looked at it yesterday night and confused Apollo Lake
(Goldmont-based) with Braswell (Airmont).

> >> As a mitigation mechanism, they have tacked microcode onto the VERW
> >> instruction that apparently clears enough state to avoid revealing
> >> any stale register contants from before the VERW instruction. So
> >> one should use VERW when exiting secret-handling code.
> >
> >According to my understanding, 'one' in this case is the OS that does
> >context switch. Doing VERW on return from majority of crypto
> >routine looks both less important and less useful.
>
> Why do you think so? It seems very important and useful to me. You
> don't want your passwords or secret keys lying around in registers
> from where an attacker (say, some JavaScript code) might extract them.
>
> - anton

First, there is no indication that attack can be launched from
JavaScript.
Second, even when rogue program tries, say, to log on with bad password
and then to learn something from reminder left in registers by
comparison of the hashes, it's still not a simple library call. There
is still at least one switch of trust context, managed by OS, before
attacker gets control back.
However my impression is that most dangerous attack scenario is
that attacker examines stale registers immediately after woken up after
preemption, probobly intentionally running at very low thread priority.

Of course, in absence of independent report it's all just guesses.
We don't even know the most basic thing - whether RFDS is architectural
channel, like AMD's Zenbleed or timing sub-channel like Intel's
Downfall.

Re: Register file data sampling

<2024Mar14.184253@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=38026&group=comp.arch#38026

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Register file data sampling
Date: Thu, 14 Mar 2024 17:42:53 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 18
Message-ID: <2024Mar14.184253@mips.complang.tuwien.ac.at>
References: <2024Mar14.105824@mips.complang.tuwien.ac.at>
Injection-Info: dont-email.me; posting-host="0d801c044d2db3a240bc57678b8a28b8";
logging-data="1848379"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/VhbJv6oxRmH6F96/8EAAX"
Cancel-Lock: sha1:cknH33rCW3uEb8oWEeWN9lmpafY=
X-newsreader: xrn 10.11
 by: Anton Ertl - Thu, 14 Mar 2024 17:42 UTC

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>Intel's E-Cores (aka Atom by some, including Intel people; I
>personnally use "Atom" only for (in-order) Bonnell-based CPUs) from at
>least Goldmont onwards have a vulnerability called "Register file data
>sampling".

Actually, looking at

<https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html#tab-blade-1-0>

Meteor Lake with its Crestmont E-Core is listed as "Not Affected". My
impression was that Meteor Lake uses microarchitectures very similar
to Golden/Raptor Cove and Gracemont, so I find that surprising.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

Re: Register file data sampling

<2024Mar14.190554@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=38027&group=comp.arch#38027

  copy link   Newsgroups: comp.arch
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Register file data sampling
Date: Thu, 14 Mar 2024 18:05:54 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 71
Message-ID: <2024Mar14.190554@mips.complang.tuwien.ac.at>
References: <2024Mar14.105824@mips.complang.tuwien.ac.at> <20240314135435.00001379@yahoo.com> <2024Mar14.175829@mips.complang.tuwien.ac.at> <20240314194148.00004342@yahoo.com>
Injection-Info: dont-email.me; posting-host="0d801c044d2db3a240bc57678b8a28b8";
logging-data="1875279"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19crmKUJrx8IMPD8e7/GmXl"
Cancel-Lock: sha1:WMn5jZaVrhb34MNhZ1ChvU2O+TM=
X-newsreader: xrn 10.11
 by: Anton Ertl - Thu, 14 Mar 2024 18:05 UTC

Michael S <already5chosen@yahoo.com> writes:
>On Thu, 14 Mar 2024 16:58:29 GMT
>anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
>
>> Michael S <already5chosen@yahoo.com> writes:
>> >On Thu, 14 Mar 2024 09:58:24 GMT
>> >anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
>> >
>> >> Intel's E-Cores (aka Atom by some, including Intel people; I
>> >> personnally use "Atom" only for (in-order) Bonnell-based CPUs)
>> >> from at least Goldmont onwards have a vulnerability called
>> >> "Register file data sampling".
>> >
>> >I think, it's worse.
>> >Airmont is affected.
>>
>> Citation needed.
>>
>
>My mistake. I looked at it yesterday night and confused Apollo Lake
>(Goldmont-based) with Braswell (Airmont).

I actually don't find any Silvermont or Airmont based CPU on
<https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html#tab-blade-1-0>
so maybe Intel does not check whether they might be vulnerable, even
though, e.g., the Silvermont-based Atom E3805 is in the marketing
status "launched", not "discontinued" as many other Silvermont-based
CPUs
<https://ark.intel.com/content/www/us/en/ark/products/84311/intel-atom-processor-e3805-1m-cache-1-33-ghz.html>

>> >According to my understanding, 'one' in this case is the OS that does
>> >context switch. Doing VERW on return from majority of crypto
>> >routine looks both less important and less useful.
>>
>> Why do you think so? It seems very important and useful to me. You
>> don't want your passwords or secret keys lying around in registers
>> from where an attacker (say, some JavaScript code) might extract them.
>>
>> - anton
>
>First, there is no indication that attack can be launched from
>JavaScript.

And there is no indication that it cannot.

>Second, even when rogue program tries, say, to log on with bad password
>and then to learn something from reminder left in registers by
>comparison of the hashes, it's still not a simple library call. There
>is still at least one switch of trust context, managed by OS, before
>attacker gets control back.

I don't see that every use of some secret key in a browser must be followed
by some context switch before returning control to JavaScript code.

>However my impression is that most dangerous attack scenario is
>that attacker examines stale registers immediately after woken up after
>preemption

That is covered by invoking VERW on context switch.

>Of course, in absence of independent report it's all just guesses.
>We don't even know the most basic thing - whether RFDS is architectural
>channel, like AMD's Zenbleed or timing sub-channel like Intel's
>Downfall.

Exactly.

- anton
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor