linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Encrypted Swap
@ 2001-08-07 17:30 David Maynor
  2001-08-07 17:27 ` Rik van Riel
  0 siblings, 1 reply; 104+ messages in thread
From: David Maynor @ 2001-08-07 17:30 UTC (permalink / raw)
  To: linux-kernel

The recovery of deleted information is a large danger, esp to certain 
government agencies and other people who really care that the information 
the have is never seen, but implementing such features in the kernel seems 
the wrong place to do it. In addition to the swap space, in order to be 
effective, you would need to keep the memory in an encrypted state, as well 
as your disk. Just encrypting your swap would be akin to ssh to a machine, 
telneting to another machine, then sshing to a 3rd machine. Since your 
transfer between machine one and two is in the clear, you entire security 
model at that point is comprised. Just encrypting your swap leaves the info 
vulnerable in other places.
	My suggestion is instead of worrying about the swap space, or the tmp 
space, worry about an entire OS security posture(eg. filesystem, memory, 
boot). So if a machine is stolen or comprised, there is an onion of 
security protecting you, not just one or two things.

David Maynor


^ permalink raw reply	[flat|nested] 104+ messages in thread
[parent not found: <fa.kmbqblv.v3uvig@ifi.uio.no>]
* RE: Encrypted Swap
@ 2001-08-17 17:10 David Christensen
  2001-08-17 17:21 ` Richard B. Johnson
  0 siblings, 1 reply; 104+ messages in thread
From: David Christensen @ 2001-08-17 17:10 UTC (permalink / raw)
  To: 'root@chaos.analogic.com', Holger Lubitz; +Cc: linux-kernel

> > Ryan Mack proclaimed:
> > > is running.  If the system is physically compromised, 
> there is little way
> > > I can think of to take root without having to at least reboot the
> > > computer, thus destroying the unencrypted contents of RAM.
> > 
> > This is a myth. RAM survives rebooting, even after a quick 
> power cycle
> > most cells will probably still be ok. And with todays 
> memory sizes, it
> > would take a noticable amount of time to initialize all of 
> it to a given
> > value, so most systems don't do it (just testing some bytes of every
> > megabyte instead).
> > 
> > Holger
> > -
> 
> Errrm no. All BIOS that anybody would use write all memory found when
> initializing the SDRAM controller. They need to because nothing,
> refresh, precharge, (or if you've got it, parity/crc) will work
> until every cell is exercised. A "warm-boot" is different. However,
> if you hit the reset or the power switch, nothing in RAM survives.

Most modern firmware does NOT clear memory during POST, it takes too long.
Certain compatibility areas are usually cleared (such as the 1st megabyte)
but the rest is
left as is, except for a few read/writes (usually on a megabyte boundary).
The 
exception to this rule is ECC systems.  They have to be written to make sure
the 
ECC information is correct.  

SDRAM memory sizing is usually done by reading an EEPROM on the SDRAM DIMM.
The BIOS doesn't need to guess the correct timing values, it simply reads
the EEPROM and programs the memory controller.  In the case of a BIOS that
doesn't use EEPROM you might lose data as the BIOS iteratively tries 
different memory timings and tests if they work.

I have done work implementing ACPI S3 (suspend-to-RAM) in DOS by simply
hitting 
the RESET button and restoring the memory controller settings.  The contents
of 
RAM have always been valid.

David Christensen

^ permalink raw reply	[flat|nested] 104+ messages in thread
* Re: encrypted swap
@ 2001-08-07 21:40 David Spreen
  0 siblings, 0 replies; 104+ messages in thread
From: David Spreen @ 2001-08-07 21:40 UTC (permalink / raw)
  To: linux-kernel

On Tue, Aug 07, 2001 at 10:23:15PM +0300, Dan Podeanu wrote:
> There, you have the swap encrypted, up and running. Of course, if you need
> more fancy encryption than the default, XOR or DES, get the crypto patch.
> You only need to have a script that does the stuff, that runs when the
> system boots, without shutdown scripts (in case of power/battery failure

Okay, even if I get the password from /dev/urandom this sounds like a 
solution for people who don't use much swapspace. Because I
have to recreate the swapfs everytime I am booting.

so long...

David
-- 
  __          _              | David "netzwurm" Spreen      Kiel, Germany
 / _|___  ___| |__  __ _ _ _ | http://www.netzwurm.cc/      david@spreen.de
|  _/ _ \/ _ \ '_ \/ _` | '_|| gnupg key (on keyservers):   C8B6823A
|_| \___/\___/_.__/\__,_|_|  | CellPhone:                   +49 173 3874061


^ permalink raw reply	[flat|nested] 104+ messages in thread
* RE: encrypted swap
@ 2001-08-07 18:53 Torrey Hoffman
  2001-08-07 19:15 ` Thomas Pornin
                   ` (2 more replies)
  0 siblings, 3 replies; 104+ messages in thread
From: Torrey Hoffman @ 2001-08-07 18:53 UTC (permalink / raw)
  To: 'David Maynor', linux-kernel

David Maynor wrote:

[...]
> I am saying if you are worried about such things, 
> then start with projects that would not require a 
> hardware crypto card to make i useable.

And earlier wrote:

[...]
> I can't really see the advantage of encrypted swap. 
> At the point it would become effective, the attacker 
> is already on the machine (from remote access or the 
> have physical access) and then its not if you can keep 
> them from getting the info, its only a matter of when.

Wait a second.  Encrypted swap is useful and effective in 
some situations that do not require a hardware crypto card.

Imagine you have:
- a Linux laptop with a small amount of RAM
- Email and important documents encrypted on disk, either
  with GPG / PGP or with an encrypted /home partition.
- Documents and email are decrypted, viewed, and edited by 
  applications, not all of which are SUID root, so 
  unencrypted data might be swapped out.

This is hardly a far-fetched example.

Now that laptop is stolen at an airport. The thief decides
to try to improve his take by grabbing useful information
from documents.  The encrypted documents are untouchable,
of course.  It _doesn't matter_ that the thief has the
hardware, the decryption key is protected by a passphrase
which is _nowhere_ on the hard drive.

The only place that sensitive, unencrypted data could be
on such a machine is in swap.  In fact, it is _likely_ to
be in swap.

Encrypted swap solves this _particular_ problem nicely, 
does it not?  

Torrey

^ permalink raw reply	[flat|nested] 104+ messages in thread
* encrypted swap
@ 2001-08-07 15:28 David Maynor
  2001-08-07 15:51 ` Florian Weimer
  0 siblings, 1 reply; 104+ messages in thread
From: David Maynor @ 2001-08-07 15:28 UTC (permalink / raw)
  To: linux-kernel


>
>This is not about paranoia, this is about stolen notebooks.
>
>(And you can't easily add hundreds of megabytes to such systems
>usually.)

Then you can use a hardware token so that the machine will not boot at all 
with out it present or write an encrypted super block, but I can't really 
see the advantage of encrypted swap. At the point it would become 
effective, the attacker is already on the machine (from remote access or 
the have physical access) and then its not if you can keep them from 
getting the info, its only a matter of when.


^ permalink raw reply	[flat|nested] 104+ messages in thread
* encrypted swap
@ 2001-08-07 15:06 David Maynor
  2001-08-07 15:11 ` Florian Weimer
                   ` (3 more replies)
  0 siblings, 4 replies; 104+ messages in thread
From: David Maynor @ 2001-08-07 15:06 UTC (permalink / raw)
  To: linux-kernel

But is the 10% perf hit really gaining you anything, expect to quell your 
paranoia. What is next, an encrypted /proc so that possible attackers can't 
gain information about running processes?

David Maynor


^ permalink raw reply	[flat|nested] 104+ messages in thread
* encrypted swap
@ 2001-08-07 14:37 David Maynor
  2001-08-07 14:48 ` Billy Harvey
  2001-08-07 16:03 ` Chris Wedgwood
  0 siblings, 2 replies; 104+ messages in thread
From: David Maynor @ 2001-08-07 14:37 UTC (permalink / raw)
  To: linux-kernel

 >This is nonsense.  Of course the computer can do this.  This is exactly 
what we
 >already do for TCP sequence numbers, disk UUIDS, and many other things.
 >Granted, we need a little more initial entropy, but the principle has already
 >been established.

 >Remember that this is not the same as a crypted filesystem in that no user
 >(even root) need ever have any access to the key.  That's important.  Because
 >the swapspace is essentially wiped at powerup, the system can happily gen 
a new
 >key every boot, crypt away and never let the users know the key at all.

This is a should-if debate, in my opinion. That is, not if you can do it, 
but should you. Has anybody thought of the performance hit that you would 
take encrypting your swap?

David Maynor


^ permalink raw reply	[flat|nested] 104+ messages in thread
[parent not found: <no.id>]
* Encrypted Swap
@ 2001-08-07  2:28 David Spreen
  2001-08-07  3:56 ` Justin Guyett
                   ` (2 more replies)
  0 siblings, 3 replies; 104+ messages in thread
From: David Spreen @ 2001-08-07  2:28 UTC (permalink / raw)
  To: linux-kernel

Hey there,
I was just searching for swap-encryption-solutions in the lkml-archive.
Did I get the point saying ther's no way to do swap encryption
in linux right now? (Well, a swapfile in an encrypted kerneli
partition r something like that is not really what I want to
do I think).

so long...

David
-- 
  __          _              | David "netzwurm" Spreen      Kiel, Germany
 / _|___  ___| |__  __ _ _ _ | http://www.netzwurm.cc/      david@spreen.de
|  _/ _ \/ _ \ '_ \/ _` | '_|| gnupg key (on keyservers):   C8B6823A
|_| \___/\___/_.__/\__,_|_|  | CellPhone:                   +49 173 3874061


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

end of thread, other threads:[~2001-08-21 13:58 UTC | newest]

Thread overview: 104+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-07 17:30 Encrypted Swap David Maynor
2001-08-07 17:27 ` Rik van Riel
     [not found] <fa.kmbqblv.v3uvig@ifi.uio.no>
2001-08-18 14:53 ` Ted Unangst
2001-08-18 15:17   ` Mr. James W. Laferriere
2001-08-20 11:03   ` Helge Hafting
  -- strict thread matches above, loose matches on Subject: below --
2001-08-17 17:10 David Christensen
2001-08-17 17:21 ` Richard B. Johnson
2001-08-17 18:41   ` Eric W. Biederman
2001-08-17 19:05     ` Dan Hollis
2001-08-18  9:52       ` Eric W. Biederman
2001-08-18 10:24         ` Nicholas Knight
2001-08-18 12:32           ` Eric W. Biederman
2001-08-17 19:20     ` Richard B. Johnson
2001-08-18 10:34       ` Eric W. Biederman
2001-08-07 21:40 encrypted swap David Spreen
2001-08-07 18:53 Torrey Hoffman
2001-08-07 19:15 ` Thomas Pornin
2001-08-07 19:23 ` Dan Podeanu
2001-08-07 19:48   ` Andreas Dilger
2001-08-07 20:04   ` Marty Poulin
2001-08-07 21:06   ` David Wagner
2001-08-07 21:56     ` D. Stimits
2001-08-07 21:44   ` Pavel Machek
2001-08-07 19:48 ` Justin Guyett
2001-08-07 20:05   ` Alan Cox
2001-08-07 20:17   ` Bill Rugolsky Jr.
2001-08-07 15:28 David Maynor
2001-08-07 15:51 ` Florian Weimer
2001-08-07 15:06 David Maynor
2001-08-07 15:11 ` Florian Weimer
2001-08-07 15:43   ` Joel Jaeggli
2001-08-07 15:30 ` Garett Spencley
2001-08-07 16:21 ` David Spreen
2001-08-08  8:11 ` Helge Hafting
2001-08-07 14:37 David Maynor
2001-08-07 14:48 ` Billy Harvey
2001-08-07 16:03 ` Chris Wedgwood
     [not found] <no.id>
2001-08-07 14:17 ` Encrypted Swap Alan Cox
2001-08-07 15:16   ` Crutcher Dunnavant
2001-08-07 16:01     ` Chris Wedgwood
2001-08-07  2:28 David Spreen
2001-08-07  3:56 ` Justin Guyett
2001-08-07  4:01   ` Chris Wedgwood
2001-08-07  4:23   ` John Polyakov
2001-08-07  4:36     ` Chris Wedgwood
2001-08-07  5:12     ` Garett Spencley
2001-08-07  5:55       ` Ryan Mack
2001-08-07 12:37         ` Michael Bacarella
2001-08-17 14:50         ` Holger Lubitz
2001-08-17 15:39           ` Richard B. Johnson
2001-08-17 15:57             ` Holger Lubitz
2001-08-17 16:34               ` Gerhard Mack
2001-08-17 16:50               ` Richard B. Johnson
2001-08-17 17:06             ` Adrian Cox
2001-08-17 17:16               ` Richard B. Johnson
2001-08-17 17:22                 ` Jacob Alifrangis
2001-08-17 17:36                 ` Adrian Cox
2001-08-17 18:51                   ` Nicholas Knight
2001-08-17 19:30                     ` Richard B. Johnson
2001-08-18  8:51                       ` Adrian Cox
2001-08-18 11:02                         ` Eric W. Biederman
2001-08-19  8:51                           ` Adrian Cox
2001-08-20  1:27                         ` Richard B. Johnson
2001-08-20 11:08                           ` Helge Hafting
2001-08-20 11:50                           ` Ian Stirling
2001-08-21 13:55                       ` Andreas Bombe
2001-08-17 20:00                     ` Andreas Dilger
2001-08-07  6:27       ` John Polyakov
2001-08-06 23:28         ` Rob Landley
2001-08-07 10:10           ` Christopher E. Brown
2001-08-07 14:05             ` Joel Jaeggli
2001-08-07  6:41         ` Crutcher Dunnavant
2001-08-07  6:45         ` Ryan Mack
2001-08-07  6:57         ` Evgeny Polyakov
2001-08-07  7:08         ` Evgeny Polyakov
2001-08-07  7:23           ` Sean Hunter
2001-08-07  8:39             ` Ben Ford
2001-08-07 12:28             ` Kevin Krieser
2001-08-07 12:39               ` Richard B. Johnson
2001-08-07 14:21               ` Ignacio Vazquez-Abrams
2001-08-07  7:26           ` Ryan Mack
2001-08-07  7:34           ` Jeffrey Considine
2001-08-07  7:49           ` Crutcher Dunnavant
2001-08-07  9:01           ` Peter Wächtler
2001-08-07 20:09       ` Maciej Zenczykowski
2001-08-07 20:30   ` Ian Stirling
2001-08-07  4:12 ` Steve VanDevender
2001-08-07  7:34   ` Steve VanDevender
2001-08-07  7:55     ` Crutcher Dunnavant
2001-08-07 15:17     ` Garett Spencley
2001-08-07  7:49   ` Helge Hafting
2001-08-07  7:58     ` Crutcher Dunnavant
2001-08-07  9:23       ` Helge Hafting
2001-08-07 13:29         ` Wichert Akkerman
2001-08-07 15:56         ` Chris Wedgwood
2001-08-07 16:54           ` Alan Cox
2001-08-07 17:10             ` Chris Wedgwood
2001-08-07  9:52   ` Brian May
2001-08-07 14:48     ` Joel Jaeggli
2001-08-07 15:59       ` Chris Wedgwood
2001-08-07 16:18         ` Joel Jaeggli
2001-08-07 16:24           ` Florian Weimer
2001-08-08  2:13     ` Dr. Kelsey Hudson
2001-08-07 10:33 ` Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).