Skip to contentSkip to conversation

RAM security

DISCUSSION Jonathan Tripathy 4 participants 11 messages Dec 6, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Everyone,

In Xen, is a DomU able to access data in RAM which a previous DomU has stored in the past, but didn't "zero" it?

I understand that this is a problem with physical disks (using phy:/), just wondering if the same stands with RAM

Thanks

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

I looked into this sometime this last year. I believe the answer is "no": the domain destruction routines will zero memory before handing it back to Xen.

One potential data leak, however (last time I looked at this), is that Xen does not scrub memory handed back by the balloon driver. So if the guest OS hasn't scrubbed it, and it contains sensitive information, it may end up being assigned to another domain as-is (either via ballooning or start-of-day domain creation). At the moment that's considered the guest's responsibility.

-George

Quoted 16 lines · Jonathan Tripathy

Hi Everyone,

In Xen, is a DomU able to access data in RAM which a previous DomU has stored in the past, but didn't "zero" it?

I understand that this is a problem with physical disks (using phy:/), just wondering if the same stands with RAM

Thanks

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw

Would one way around this be to disable ballooning in the DomUs?

At the minute, only my Dom0 can be ballooned, all DomU have a fixed memory size. Is this sufficient?

Thanks

Quoted 30 lines · George Dunlap

I looked into this sometime this last year. I believe the answer is "no": the domain destruction routines will zero memory before handing it back to Xen.

One potential data leak, however (last time I looked at this), is that Xen does not scrub memory handed back by the balloon driver. So if the guest OS hasn't scrubbed it, and it contains sensitive information, it may end up being assigned to another domain as-is (either via ballooning or start-of-day domain creation). At the moment that's considered the guest's responsibility.

-George

Quoted 16 lines · Jonathan Tripathy

Hi Everyone,

In Xen, is a DomU able to access data in RAM which a previous DomU has stored in the past, but didn't "zero" it?

I understand that this is a problem with physical disks (using phy:/), just wondering if the same stands with RAM

Thanks

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw
In reply to George Dunlap

Just a few questions:

1) By saying "the guest's responsibility", does this mean that CONFIG_XEN_SCRUB_PAGES=y is set in the DomU kernel config?

2) Also, if a DomU was shutdown by xm destroy, obviously the DomU wouldn’t scrub the RAM. However would Xen still scrub the RAM?

3) If the physical server was shutdown (e.g. plug pulled), I'm guessing this will presetn a problem?

4) Why doesn't Xen scrub the RAM before giving it to the DomU?

Thanks

Quoted 30 lines · George Dunlap

I looked into this sometime this last year. I believe the answer is "no": the domain destruction routines will zero memory before handing it back to Xen.

One potential data leak, however (last time I looked at this), is that Xen does not scrub memory handed back by the balloon driver. So if the guest OS hasn't scrubbed it, and it contains sensitive information, it may end up being assigned to another domain as-is (either via ballooning or start-of-day domain creation). At the moment that's considered the guest's responsibility.

-George

Quoted 16 lines · Jonathan Tripathy

Hi Everyone,

In Xen, is a DomU able to access data in RAM which a previous DomU has stored in the past, but didn't "zero" it?

I understand that this is a problem with physical disks (using phy:/), just wondering if the same stands with RAM

Thanks

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#5 lore raw
Quoted 4 lines · Jonathan Tripathy

Just a few questions:

1) By saying "the guest's responsibility", does this mean that CONFIG_XEN_SCRUB_PAGES=y is set in the DomU kernel config?

Yes.

Quoted 2 lines

2) Also, if a DomU was shutdown by xm destroy, obviously the DomU wouldn¹t scrub the RAM. However would Xen still scrub the RAM?

Xen always scrubs memory on behalf of a dead domain.

Quoted 2 lines

3) If the physical server was shutdown (e.g. plug pulled), I'm guessing this will presetn a problem?

Xen scrubs all memory during boot, unless told not to via a boot parameter.

Quoted 1 line

4) Why doesn't Xen scrub the RAM before giving it to the DomU?

It does in the above circumstances. Otherwise it is up to the domU, and why not.

-- Keir

Quoted 38 lines

Thanks

Quoted 11 lines · George Dunlap

I looked into this sometime this last year. I believe the answer is "no": the domain destruction routines will zero memory before handing it back to Xen.

One potential data leak, however (last time I looked at this), is that Xen does not scrub memory handed back by the balloon driver. So if the guest OS hasn't scrubbed it, and it contains sensitive information, it may end up being assigned to another domain as-is (either via ballooning or start-of-day domain creation). At the moment that's considered the guest's responsibility.

Quoted 19 lines

-George

Quoted 16 lines · Jonathan Tripathy

Hi Everyone,

In Xen, is a DomU able to access data in RAM which a previous DomU has stored in the past, but didn't "zero" it?

I understand that this is a problem with physical disks (using phy:/), just wondering if the same stands with RAM

Thanks

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw
Quoted 7 lines

Xen always scrubs memory on behalf of a dead domain.

Quoted 2 lines

3) If the physical server was shutdown (e.g. plug pulled), I'm guessing this will presetn a problem?

Xen scrubs all memory during boot, unless told not to via a boot parameter.

Now this bit of code makes me happy!

Just wondering, if Xen scrubs all memory during boot, why is booting the Hypervisor so fast? My machine has 8GB of RAM and starts nice and snappy..

Quoted 4 lines
Quoted 1 line

4) Why doesn't Xen scrub the RAM before giving it to the DomU?

It does in the above circumstances. Otherwise it is up to the domU, and why not.

I think that with the on-booting and the on-destroy scrubbing, my 4) point above is moot :)

Cheers

#7 lore raw
Quoted 8 lines · Jonathan Tripathy
Quoted 4 lines
Quoted 2 lines

3) If the physical server was shutdown (e.g. plug pulled), I'm guessing this will presetn a problem?

Xen scrubs all memory during boot, unless told not to via a boot parameter.

Now this bit of code makes me happy!

Just wondering, if Xen scrubs all memory during boot, why is booting the Hypervisor so fast? My machine has 8GB of RAM and starts nice and snappy..

It probably takes just a couple of seconds to scrub 8GB. Xen does the scrubbing immediately before starting dom0, and you should see it say 'Scrubbing RAM...' and extra dots continur to appear until scrubbing is complete.

-- Keir

#8 lore raw
Quoted 8 lines · Keir Fraser
Quoted 6 lines · Jonathan Tripathy
Quoted 4 lines
Quoted 2 lines

3) If the physical server was shutdown (e.g. plug pulled), I'm guessing this will presetn a problem?

Xen scrubs all memory during boot, unless told not to via a boot parameter.

Now this bit of code makes me happy!

Quoted 9 lines
Quoted 2 lines

Just wondering, if Xen scrubs all memory during boot, why is booting the Hypervisor so fast? My machine has 8GB of RAM and starts nice and snappy..

It probably takes just a couple of seconds to scrub 8GB. Xen does the scrubbing immediately before starting dom0, and you should see it say 'Scrubbing RAM...' and extra dots continur to appear until scrubbing is complete.

-- Keir

I guess in my head I'm comparing RAM scrubbing to dd if=/dev/zero, which takes longer as it's usually to disk

#9 lore raw
In reply to Keir Fraser
Quoted 5 lines
Quoted 1 line
Quoted 1 line · Keir Fraser
Quoted 2 lines · Jonathan Tripathy
Quoted 2 lines
Quoted 2 lines

3) If the physical server was shutdown (e.g. plug pulled), I'm guessing this will presetn a problem?

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Xen scrubs all memory during boot, unless told not to via a boot parameter.

Now this bit of code makes me happy!

Just wondering, if Xen scrubs all memory during boot, why is booting the Hypervisor so fast? My machine has 8GB of RAM and starts nice and snappy..

It probably takes just a couple of seconds to scrub 8GB. Xen does the

Plus it doesn't scrub the memory assigned to Dom0.

Quoted 3 lines

scrubbing immediately before starting dom0, and you should see it say 'Scrubbing RAM...' and extra dots continur to appear until scrubbing is complete.

Jan

#10 lore raw

3) If the physical server was shutdown (e.g. plug pulled), I'm guessing

Quoted 10 lines
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

this will presetn a problem?

Xen scrubs all memory during boot, unless told not to via a boot parameter.

Now this bit of code makes me happy!

Just wondering, if Xen scrubs all memory during boot, why is booting the Hypervisor so fast? My machine has 8GB of RAM and starts nice and snappy..

It probably takes just a couple of seconds to scrub 8GB.

Plus it doesn't scrub the memory assigned to Dom0.

Doesn't this mean that if Dom0 releases some memory back to Xen, then Xen gives it to another domain, data leakage could occur?

Would one way to prevent this be to disable ballooning?

Thanks

#11 lore raw
Quoted 6 lines · Jonathan Tripathy

3) If the physical server was shutdown (e.g. plug pulled), I'm guessing

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

this will presetn a problem?

Xen scrubs all memory during boot, unless told not to via a boot parameter.

Now this bit of code makes me happy!

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines

Just wondering, if Xen scrubs all memory during boot, why is booting the Hypervisor so fast? My machine has 8GB of RAM and starts nice and snappy..

It probably takes just a couple of seconds to scrub 8GB.

Plus it doesn't scrub the memory assigned to Dom0.

Doesn't this mean that if Dom0 releases some memory back to Xen, then Xen gives it to another domain, data leakage could occur?

Would one way to prevent this be to disable ballooning?

Silly me, Dom0 should scrub the RAM before releasing it back to Xen, as mentioned in previous post!