Skip to contentSkip to conversation

Hybrid drives

dm-crypt Heinz Diehl 6 participants 10 messages Jul 17, 2010 – Jul 18, 2010

lore
Share & tools
lore
#0 lore raw

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 )

#1 lore raw

On 17.07.2010, Heinz Diehl wrote:

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

#2 lore raw
In reply to Heinz Diehl
Quoted 2 lines · Heinz Diehl

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.

Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \
#3 lore raw
Quoted 2 lines · Luca Berra

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.

#4 lore raw

la, 2010-07-17 kello 11:46 +0200, Heinz Diehl kirjoitti:

Quoted 2 lines

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.

Quoted 2 lines

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.

Signature · 4 lines
Mikko Rauhala <[email protected]>       - http://www.iki.fi/mjr/blog/  
The Finnish Pirate Party         - http://piraattipuolue.fi/  
World Transhumanist Association  - http://transhumanism.org/  
Singularity Institute            - http://singinst.org/  
#5 lore raw
Quoted 6 lines · Mikko Rauhala
Quoted 2 lines

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" :-)

#6 lore raw

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

Quoted 30 lines · Heinz Diehl
Quoted 7 lines · Mikko Rauhala
Quoted 1 line

When you format the disc using "cryptsetup luksFormat", the 4 GB SSD

part

Quoted 1 line

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
[email protected]
http://www.saout.de/mailman/listinfo/dm-crypt

#7 lore raw
In reply to Heinz Diehl
Quoted 4 lines · Heinz Diehl

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.

Quoted 3 lines

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.

#8 lore raw
In reply to Heinz Diehl
Quoted 5 lines · Heinz Diehl

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.

#9 lore raw
In reply to Heinz Diehl
Quoted 10 lines · Heinz Diehl

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.

Quoted 5 lines

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

Signature · 7 lines
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: [email protected] 
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