DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] Hybrid drives
@ 2010-07-17  7:13 Heinz Diehl
  2010-07-17  7:17 ` Heinz Diehl
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Heinz Diehl @ 2010-07-17  7:13 UTC (permalink / raw)
  To: dm-crypt

Hi,

I just took a closer look at one of the (new?) hybrid harddisk drives,
such as the Seagate Momentus XT, and now I'm wondering if this 
is a top level security problem. If I understand it correctly, the 4 GB
SSD memory on the harddisk operates independendly of the drive itself,
acting as a buffer/cache for virtually all the data stored to the drive. Some
logic in the harddrives controller is going to serve the 4 GB SSD memory
part, which is not available/accessable to the OS.

In other words: such hybrid drives can not safely be encrypted with
LUKS/dmcrypt (or any other WDE software), because the controller 
randomly swaps out 4 GB data to the SSD area, and even after shutting 
down the machine, parts of/the whole LUKS header/key could possibly 
be left on the SSD part?

( http://www.youtube.com/watch?v=nX_WyOhTQEw&feature=related )

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17  7:13 [dm-crypt] Hybrid drives Heinz Diehl
@ 2010-07-17  7:17 ` Heinz Diehl
  2010-07-17  7:58 ` Luca Berra
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Heinz Diehl @ 2010-07-17  7:17 UTC (permalink / raw)
  To: dm-crypt

On 17.07.2010, Heinz Diehl wrote: 

s/"the whole LUKS header/key"/"the whole LUKS header/key/passphrase"/;

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17  7:13 [dm-crypt] Hybrid drives Heinz Diehl
  2010-07-17  7:17 ` Heinz Diehl
@ 2010-07-17  7:58 ` Luca Berra
  2010-07-17  9:46   ` Heinz Diehl
  2010-07-17 10:57 ` Christoph Anton Mitterer
  2010-07-18 17:01 ` Arno Wagner
  3 siblings, 1 reply; 10+ messages in thread
From: Luca Berra @ 2010-07-17  7:58 UTC (permalink / raw)
  To: dm-crypt

On Sat, Jul 17, 2010 at 09:13:13AM +0200, Heinz Diehl wrote:
>In other words: such hybrid drives can not safely be encrypted with
>LUKS/dmcrypt (or any other WDE software), because the controller 
>randomly swaps out 4 GB data to the SSD area, and even after shutting 
>down the machine, parts of/the whole LUKS header/key could possibly 
>be left on the SSD part?

I fail to see your point. What is the difference from having data on the
platters or on the internal ssd?

L.

-- 
Luca Berra -- bluca@comedia.it
         Communication Media & Services S.r.l.
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X        AGAINST HTML MAIL
  / \

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17  7:58 ` Luca Berra
@ 2010-07-17  9:46   ` Heinz Diehl
  2010-07-17 11:05     ` Mikko Rauhala
  2010-07-17 11:10     ` Christoph Anton Mitterer
  0 siblings, 2 replies; 10+ messages in thread
From: Heinz Diehl @ 2010-07-17  9:46 UTC (permalink / raw)
  To: dm-crypt

On 17.07.2010, Luca Berra wrote: 

> I fail to see your point. What is the difference from having data on the
> platters or on the internal ssd?

As far as I understand, the SSD part of these hybrid drives is used as a
cache, which doesn't loose its data when powered off. The disc itself is
completely in encrypted state when off, but I'm quite curious what maybe
could happen to the SSD part. In other words: 

is it completely covered by the additional crypto layer, or is there some
internal transfer which happens "automatically" without being under
control of the crypto layer?

When you format the disc using "cryptsetup luksFormat", the 4 GB SSD part
isn't included. Please correct me if I'm wrong.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17  7:13 [dm-crypt] Hybrid drives Heinz Diehl
  2010-07-17  7:17 ` Heinz Diehl
  2010-07-17  7:58 ` Luca Berra
@ 2010-07-17 10:57 ` Christoph Anton Mitterer
  2010-07-18 17:01 ` Arno Wagner
  3 siblings, 0 replies; 10+ messages in thread
From: Christoph Anton Mitterer @ 2010-07-17 10:57 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

On Sat, 2010-07-17 at 09:13 +0200, Heinz Diehl wrote:
> In other words: such hybrid drives can not safely be encrypted with
> LUKS/dmcrypt (or any other WDE software), because the controller 
> randomly swaps out 4 GB data to the SSD area, and even after shutting 
> down the machine, parts of/the whole LUKS header/key could possibly 
> be left on the SSD part?
Why? If you completely encrypt everything,... nothing unencrypted should
ever reach the disk? And the header is open readable anyway (of course
the keys are encrypted).


Cheers,
Chris.


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3387 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17  9:46   ` Heinz Diehl
@ 2010-07-17 11:05     ` Mikko Rauhala
  2010-07-17 11:45       ` Heinz Diehl
  2010-07-17 11:10     ` Christoph Anton Mitterer
  1 sibling, 1 reply; 10+ messages in thread
From: Mikko Rauhala @ 2010-07-17 11:05 UTC (permalink / raw)
  To: dm-crypt

la, 2010-07-17 kello 11:46 +0200, Heinz Diehl kirjoitti:
> As far as I understand, the SSD part of these hybrid drives is used as a
> cache, which doesn't loose its data when powered off.

Correct, but the same of course applies for the disk itself.

It doesn't magically cache the computer's unencrypted memory, merely
what's written on the disk. If that includes unencrypted encryption
keys, you'd have the same problem without said cache.

The most the SSD cache can do to harm you is to perhaps have leftover
overwritten old data that wouldn't otherwise exist on the drive anymore.
But with proper use of dm-crypt, any such leftovers would be encrypted
along with the rest of it.

> When you format the disc using "cryptsetup luksFormat", the 4 GB SSD part
> isn't included. Please correct me if I'm wrong.

You're wrong in a very confused way. The SSD never stores anything that
wasn't on the hard disk, and only a part of that anyway. All operations
on the disk likewise indirectly affect the SSD cache.

-- 
Mikko Rauhala <mjr@iki.fi>       - http://www.iki.fi/mjr/blog/  
The Finnish Pirate Party         - http://piraattipuolue.fi/  
World Transhumanist Association  - http://transhumanism.org/  
Singularity Institute            - http://singinst.org/  

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17  9:46   ` Heinz Diehl
  2010-07-17 11:05     ` Mikko Rauhala
@ 2010-07-17 11:10     ` Christoph Anton Mitterer
  1 sibling, 0 replies; 10+ messages in thread
From: Christoph Anton Mitterer @ 2010-07-17 11:10 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

On Sat, 2010-07-17 at 11:46 +0200, Heinz Diehl wrote:
> As far as I understand, the SSD part of these hybrid drives is used as a
> cache, which doesn't loose its data when powered off. The disc itself is
> completely in encrypted state when off, but I'm quite curious what maybe
> could happen to the SSD part.
All is encrypted,.. expect those parts of the header which aren't
encrypted anyways.

The kernel encrypts everything at the (dm-crpyt) block layer,... "long"
before this goes out to hardware,... so the hardware never sees anything
that's unencrypted.


> is it completely covered by the additional crypto layer, or is there some
> internal transfer which happens "automatically" without being under
> control of the crypto layer?
As long as your CPU/bus is not hacked,... no ;)



Cheer,
Chris.

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3387 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17 11:05     ` Mikko Rauhala
@ 2010-07-17 11:45       ` Heinz Diehl
  2010-07-17 13:27         ` Sven Eschenberg
  0 siblings, 1 reply; 10+ messages in thread
From: Heinz Diehl @ 2010-07-17 11:45 UTC (permalink / raw)
  To: dm-crypt

On 17.07.2010, Mikko Rauhala wrote: 

> > When you format the disc using "cryptsetup luksFormat", the 4 GB SSD part
> > isn't included. Please correct me if I'm wrong.
 
> You're wrong in a very confused way. The SSD never stores anything that
> wasn't on the hard disk, and only a part of that anyway. All operations
> on the disk likewise indirectly affect the SSD cache.

It's quite clear to me how the crypto layer works, and data send /written
to the SSD cache only gets there in encrypted form when the SSD part is
used as a disc cache exclusively. I'm not quite good in explaining things,
I guess :-) I'm just curious if this SSD part is "just a cache", or maybe
something else, as e.g. an additional "drive" with its one device, or a
mixture of that... That wasn't quite clear to me. There's some articles
out there which describe this SSD part as a "cache only" area, just like
the cache which commonly is used with any harddisc drive, and I've read a
report which described this area as a kind of "additional drive" which
gets used as a cache at the same time, just if you would store your linux
swap on an extra harddisk. 

Don't know if you can follow me now, blame it on me in this case, thinking
"'round the corner" :-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17 11:45       ` Heinz Diehl
@ 2010-07-17 13:27         ` Sven Eschenberg
  0 siblings, 0 replies; 10+ messages in thread
From: Sven Eschenberg @ 2010-07-17 13:27 UTC (permalink / raw)
  To: dm-crypt

I do see your point now, I think.

If the SDD (Flash) cache would be exported as device to the system, to use
it for system level caching (as in the system decides what to use it for,
i.e. page cache), then yes, portions of unencryoted memmory would be
written to that cache.
On the other hand, when support for this should come to the kernel (and
the HDD would allow the use of that flash in such a way) of course kernel
developers would have to take precautions, that this should not happen.
As for the key and passphrase itself I assume the pages are mlock()ed anyway
so they won't get paged.

Regards

-Sven

On Sat, July 17, 2010 13:45, Heinz Diehl wrote:
> On 17.07.2010, Mikko Rauhala wrote:
>
>> > When you format the disc using "cryptsetup luksFormat", the 4 GB SSD
>> part
>> > isn't included. Please correct me if I'm wrong.
>
>> You're wrong in a very confused way. The SSD never stores anything that
>> wasn't on the hard disk, and only a part of that anyway. All operations
>> on the disk likewise indirectly affect the SSD cache.
>
> It's quite clear to me how the crypto layer works, and data send /written
> to the SSD cache only gets there in encrypted form when the SSD part is
> used as a disc cache exclusively. I'm not quite good in explaining things,
> I guess :-) I'm just curious if this SSD part is "just a cache", or maybe
> something else, as e.g. an additional "drive" with its one device, or a
> mixture of that... That wasn't quite clear to me. There's some articles
> out there which describe this SSD part as a "cache only" area, just like
> the cache which commonly is used with any harddisc drive, and I've read a
> report which described this area as a kind of "additional drive" which
> gets used as a cache at the same time, just if you would store your linux
> swap on an extra harddisk.
>
> Don't know if you can follow me now, blame it on me in this case, thinking
> "'round the corner" :-)
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dm-crypt] Hybrid drives
  2010-07-17  7:13 [dm-crypt] Hybrid drives Heinz Diehl
                   ` (2 preceding siblings ...)
  2010-07-17 10:57 ` Christoph Anton Mitterer
@ 2010-07-18 17:01 ` Arno Wagner
  3 siblings, 0 replies; 10+ messages in thread
From: Arno Wagner @ 2010-07-18 17:01 UTC (permalink / raw)
  To: dm-crypt

On Sat, Jul 17, 2010 at 09:13:13AM +0200, Heinz Diehl wrote:
> Hi,
> 
> I just took a closer look at one of the (new?) hybrid harddisk drives,
> such as the Seagate Momentus XT, and now I'm wondering if this 
> is a top level security problem. If I understand it correctly, the 4 GB
> SSD memory on the harddisk operates independendly of the drive itself,
> acting as a buffer/cache for virtually all the data stored to the drive. Some
> logic in the harddrives controller is going to serve the 4 GB SSD memory
> part, which is not available/accessable to the OS.
> 
> In other words: such hybrid drives can not safely be encrypted with
> LUKS/dmcrypt (or any other WDE software), because the controller 
> randomly swaps out 4 GB data to the SSD area, and even after shutting 
> down the machine, parts of/the whole LUKS header/key could possibly 
> be left on the SSD part?

There is only one risk, namely a keyslot with an old, later changed
key still being on the SSD part. That is a real risk.
However, it is only a risk if you change a key and the old one is
a security problem before the old keyslot in the SSD cache
is at least partially overwritten.

Keys never get written to disk, whether hybrid or not. Doing
that would be a massive risk in the first place, whether
hybrid or not so it os never done.

For plain dm-crypt there is absolutely no risk at all.

Arno
-- 
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name 
GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-18 17:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-17  7:13 [dm-crypt] Hybrid drives Heinz Diehl
2010-07-17  7:17 ` Heinz Diehl
2010-07-17  7:58 ` Luca Berra
2010-07-17  9:46   ` Heinz Diehl
2010-07-17 11:05     ` Mikko Rauhala
2010-07-17 11:45       ` Heinz Diehl
2010-07-17 13:27         ` Sven Eschenberg
2010-07-17 11:10     ` Christoph Anton Mitterer
2010-07-17 10:57 ` Christoph Anton Mitterer
2010-07-18 17:01 ` Arno Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox