SSE related security hole
Um, people here seem to be assuming that, in the absence of MMX, fninit *doesn't* leak information.
I thought it was well-known to just clear (set to all-ones) the tag register and not alter the actual floating-point registers.
Thus, it seems quite feasible to reset the tag word with FLDENV and store out the FPU registers, even on an 80387.
Isn't this the same security hole? Shouldn't there be 8 FLDZ instructions (or equivalent) in the processor state initialization?
Quoted 11 lines · On 18 Apr 2002 [email protected] wrote:
Um, people here seem to be assuming that, in the absence of MMX, fninit *doesn't* leak information.
I thought it was well-known to just clear (set to all-ones) the tag register and not alter the actual floating-point registers.
Thus, it seems quite feasible to reset the tag word with FLDENV and store out the FPU registers, even on an 80387.
Isn't this the same security hole? Shouldn't there be 8 FLDZ instructions (or equivalent) in the processor state initialization?
Well, if what's on the internal stack of the FPU can actually leak information, I think the notion of "leak" has expanded just a bit too much.
A rogue process could not even know what instruction was about to be executed, nor what the previous instruction was, nor when since boot it was executed, nor by whom. The 'data' associated with those unknown instructions would make a good random number generator, or a round-about method of obtaining PI (st0 almost always contains it). That's about all.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Windows-2000/Professional isn't.
Followup to: <[email protected]> By author: [email protected] In newsgroup: linux.dev.kernel
Quoted 4 lines
Um, people here seem to be assuming that, in the absence of MMX, fninit *doesn't* leak information.
Quoted 9 lines
I thought it was well-known to just clear (set to all-ones) the tag register and not alter the actual floating-point registers.
Thus, it seems quite feasible to reset the tag word with FLDENV and store out the FPU registers, even on an 80387.
Isn't this the same security hole? Shouldn't there be 8 FLDZ instructions (or equivalent) in the processor state initialization?
Perhaps the right thing to do is to have a description in data of the desired initialization state and just F[NX]RSTOR it?
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <[email protected]>
Hi!
Quoted 12 lines
Quoted 11 lines
Um, people here seem to be assuming that, in the absence of MMX, fninit *doesn't* leak information.
I thought it was well-known to just clear (set to all-ones) the tag register and not alter the actual floating-point registers.
Thus, it seems quite feasible to reset the tag word with FLDENV and store out the FPU registers, even on an 80387.
Isn't this the same security hole? Shouldn't there be 8 FLDZ instructions (or equivalent) in the processor state initialization?
Quoted 7 lines
Well, if what's on the internal stack of the FPU can actually leak information, I think the notion of "leak" has expanded just a bit too much.
A rogue process could not even know what instruction was about to be executed, nor what the previous instruction was, nor when since boot it was executed, nor by whom. The 'data' associated with those
If fpu unit was used to memcpy your .ssh/identity, well, you might change your mind.
Pavel
Signature · 2 lines
(about SSSCA) "I don't say this lightly. However, I really think that the U.S. no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
Quoted 3 lines · Richard B. Johnson
Well, if what's on the internal stack of the FPU can actually leak information, I think the notion of "leak" has expanded just a bit too much.
Note that some crypto implemenations use the FPU heavily to speed up the encryption process. Thus, if FPU data can leak, secret keys are at risk. I don't know about you, but that doesn't sound good to me.