From j.astrego at netbulae.eu Thu Jun 12 18:00:00 2014 Content-Type: multipart/mixed; boundary="===============8305177470726207514==" MIME-Version: 1.0 From: Jorick Astrego To: users at ovirt.org Subject: [ovirt-users] KSM and cross-vm attack Date: Thu, 12 Jun 2014 23:59:52 +0200 Message-ID: <539A22D8.2020704@netbulae.eu> --===============8305177470726207514== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This is a multi-part message in MIME format. --------------040006070006020209070007 Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed Content-Transfer-Encoding: 7bit Hi, Maybe I should be posting to the kvm mailing list, but I think people = here should know a thing or two about it. I just read the following research paper and although the attack was = done on VMWare; from what I read about it, it could be possible with KSM = on KVM also. If you really need tight security it looks like it would be = better to disable KSM. But don't take my word for it as IANAC (I Am Not A Cryptographer). http://soylentnews.org/article.pl?sid=3D14/06/12/1349234&from=3Drss Practical Cross-VM AES Full Key Recovery Attack posted by janrinok on Thursday June 12, @02:53PM ** dbot writes: Researchers from Worcester Polytechnic Institute (Worcester, MA), have published a paper illustrating a practical full Advanced Encryption Standard key recovery from AES operations preformed in one virtual machine, by another VM [*PDF*] running on the same hardware at the same time. The attack specifically requires memory de-duplication to be enabled, and they target VMWare's VM software. Combining various attacks on memory de-duplication, and existing side channel attacks: In summary, this works: * shows for the first time that de-duplication enables fine grain cross-VM attacks; * introduces a new Flush+Reload based attack that does not require interrupting the victim after each encryption round; * presents the first practical cross-VM attack on AES; the attack is generic and can be adapted to any table-based block ciphers. They target OpenSSL 1.0.1. It will be interesting to see if the suggested countermeasure, flushing the T table cache after each operation (effective against other Flush+Reload attacks), is added to LibreSSL. Will it be left out, in the name of performance - or will they move to a different implementation of AES (not T table-based)? Kind regards, Jorick Astrego Netbulae --------------040006070006020209070007 Content-Type: text/html; charset=3DISO-8859-1 Content-Transfer-Encoding: 7bit Hi,

Maybe I should be posting to the kvm mailing list, but I think people here should know a thing or two about it.

I just read the following research paper and although the attack was done on VMWare; from what I read about it, it could be possible with KSM on KVM also. If you really need tight security it looks like it would be better to disable KSM.

But don't take my word for it as IANAC (I Am Not A Cryptographer).
http://soylent= news.org/article.pl?sid=3D14/06/12/1349234&amp;from=3Drss
posted by janrinok on Thursday June 12, @02:53PM  

= dbot writes:

Researchers from Worcester Polytechnic Institute (Worcester, MA), have published a paper illustrating a practical full Advanced Encryption Standard key recovery from AES operations preformed in one virtual machine, by another VM [PDF] running on the same hardware at the same time.

The attack specifically requires memory de-duplication to be enabled, and they target VMWare's VM software. Combining various attacks on memory de-duplication, and existing side channel attacks:

In summary, this works:

  • shows for the first time that de-duplication enables fine grain cross-VM attacks;
  • introduces a new Flush+Reload based attack that does not require interrupting the victim after each encryption round;
  • presents the first practical cross-VM attack on AES; the attack is generic and can be adapted to any table-based block ciphers.

They target OpenSSL 1.0.1.

It will be interesting to see if the suggested countermeasure, flushing the T table cache after each operation (effective against other Flush+Reload attacks), is added to LibreSSL. Will it be left out, in the name of performance - or will they move to a different implementation of AES (not T table-based)?

Kind regards,

Jorick Astrego
Netbulae
--------------040006070006020209070007-- --===============8305177470726207514== Content-Type: multipart/alternative MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="attachment.bin" VGhpcyBpcyBhIG11bHRpLXBhcnQgbWVzc2FnZSBpbiBNSU1FIGZvcm1hdC4KLS0tLS0tLS0tLS0t LS0wNDAwMDYwNzAwMDYwMjAyMDkwNzAwMDcKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy c2V0PUlTTy04ODU5LTE7IGZvcm1hdD1mbG93ZWQKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzog N2JpdAoKSGksCgpNYXliZSBJIHNob3VsZCBiZSBwb3N0aW5nIHRvIHRoZSBrdm0gbWFpbGluZyBs aXN0LCBidXQgSSB0aGluayBwZW9wbGUgCmhlcmUgc2hvdWxkIGtub3cgYSB0aGluZyBvciB0d28g YWJvdXQgaXQuCgpJIGp1c3Qgcm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ICAgICAgICAgICA8L3VsPgog ICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgIDwvYmxvY2txdW90ZT4KICAgICAgICAgIDxwPlRo ZXkgdGFyZ2V0IE9wZW5TU0wgMS4wLjEuPC9wPgogICAgICAgICAgPHA+SXQgd2lsbCBiZSBpbnRl cmVzdGluZyB0byBzZWUgaWYgdGhlIHN1Z2dlc3RlZAogICAgICAgICAgICBjb3VudGVybWVhc3Vy ZSwgZmx1c2hpbmcgdGhlIFQgdGFibGUgY2FjaGUgYWZ0ZXIgZWFjaAogICAgICAgICAgICBvcGVy YXRpb24gKGVmZmVjdGl2ZSBhZ2FpbnN0IG90aGVyIEZsdXNoK1JlbG9hZCBhdHRhY2tzKSwgaXMK ICAgICAgICAgICAgYWRkZWQgdG8gTGlicmVTU0wuIFdpbGwgaXQgYmUgbGVmdCBvdXQsIGluIHRo ZSBuYW1lIG9mCiAgICAgICAgICAgIHBlcmZvcm1hbmNlIC0gb3Igd2lsbCB0aGV5IG1vdmUgdG8g YSBkaWZmZXJlbnQKICAgICAgICAgICAgaW1wbGVtZW50YXRpb24gb2YgQUVTIChub3QgVCB0YWJs ZS1iYXNlZCk/PC9wPgogICAgICAgIDwvZGl2PgogICAgICA8L2Rpdj4KICAgIDwvYmxvY2txdW90 ZT4KICAgIEtpbmQgcmVnYXJkcyw8YnI+CiAgICA8YnI+CiAgICBKb3JpY2sgQXN0cmVnbzxicj4K ICAgIE5ldGJ1bGFlPGJyPgogIDwvYm9keT4KPC9odG1sPgoKLS0tLS0tLS0tLS0tLS0wNDAwMDYw NzAwMDYwMjAyMDkwNzAwMDctLQoK --===============8305177470726207514==-- From S.Kieske at mittwald.de Fri Jun 13 03:39:56 2014 Content-Type: multipart/mixed; boundary="===============6054704456244600319==" MIME-Version: 1.0 From: Sven Kieske To: users at ovirt.org Subject: Re: [ovirt-users] KSM and cross-vm attack Date: Fri, 13 Jun 2014 07:38:00 +0000 Message-ID: <539AAAC8.3080601@mittwald.de> In-Reply-To: 539A22D8.2020704@netbulae.eu --===============6054704456244600319== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, it's kind of you to let those know about these attacks who do not already know them, but this should be well understood by every professional by know. Shared resources are never secure, if you can not control the access from third parties to shared memory. this does not just affect KSM (or similar techniques from vmware, xen and microsoft) but also L3-Caches of modern CPUs. If you are interested in these topics, here are some papers: L3-Side-Channel attack to recover private GPG-Keys from another VM: http://eprint.iacr.org/2013/448.pdf Correlation attack against openssl, polarssl and libgcrypt on xen and vmware: https://eprint.iacr.org/2014/248.pdf I don't know if IBMs PowerVM is vulnerable to such attacks, as it's LPAR architecture is certified EAL 4+ (which might not tell anything about this attack vector). But you always need to have in mind, what attack scenario you talk about: These attacks are about a malicious vm (this could be a hacked/hijacked vm) which recovers parts of the shared memory from a known other instance to attack. if you have high security concerns you might want _not_ to share your physical server with third party controlled vms, or with vms which might be the target of getting hacked (or which runs software, which is known to be vulnerable). I still consider this scenario not as that relevant today, as there are many more low hanging fruits (sadly). This means in short: For the most parts, it's easier to hack you machine directly or social-engineer your way into it, than it is to hack/get access to a different vm on the same system and than hack another vm. There are also still no automatic tools for this, which I'm aware of (if they are, I'd like to be pointed to them). As soon as automatic attack tools will cover this scenario I'm pretty sure we'll see an increase in hacked vms and sniffed private keys. HTH -- = Mit freundlichen Gr=C3=BC=C3=9Fen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG K=C3=B6nigsberger Stra=C3=9Fe 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Gesch=C3=A4ftsf=C3=BChrer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplement=C3=A4rin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynh= ausen --===============6054704456244600319==-- From j.astrego at netbulae.eu Fri Jun 13 05:06:13 2014 Content-Type: multipart/mixed; boundary="===============0822825098311948193==" MIME-Version: 1.0 From: Jorick Astrego To: users at ovirt.org Subject: Re: [ovirt-users] KSM and cross-vm attack Date: Fri, 13 Jun 2014 11:05:37 +0200 Message-ID: <539ABEE1.1080405@netbulae.eu> In-Reply-To: 539AAAC8.3080601@mittwald.de --===============0822825098311948193== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This is a multi-part message in MIME format. --------------030204050405060907020301 Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed Content-Transfer-Encoding: 7bit Hi Sven, Thanks for you response, I will read some more. But as you say it has been known for a while and I was aware of it for = many years although never diving into the specifics. I always thought it = was not a practical attack vector What caught my attention was that it was so fast it can be done in less = then a minute: Lightning-Fast Attack: *Even in the worst case scenario (cross-VM) the attack** **succeeds in less than a minute. To the best of our knowledge, no faster attack** **has been implemented against AES in a realistic cloud-like setting. This also** **means that just one minute of co-location with the encryption server suffices to** **recover the key.* > For the most parts, it's easier to hack you machine directly > or social-engineer your way into it, than it is to hack/get > access to a different vm on the same system and than hack another vm. So that was the part that worries me, if I have a public cloud offering = and someone doesn't hack a vm but simply rents one. He can then spawn a = new VM every couple of minutes and it will probably be on a different = host each time..... with different neighbours. You could hack every vulnerable customer VM in a couple of hours this = way and it would all be undetected. > There are also still no automatic tools for this, which I'm aware of > (if they are, I'd like to be pointed to them). > > As soon as automatic attack tools will cover this scenario I'm pretty > sure we'll see an increase in hacked vms and sniffed private keys. I'm sure there are automatic tools being built as we speak but they will = not be generally available. Kind regards, Jorick Astrego Netbulae B.V. On 06/13/2014 09:38 AM, Sven Kieske wrote: > Hi, > > it's kind of you to let those know > about these attacks who do not already know them, but > this should be well understood by every professional by know. > > Shared resources are never secure, if you > can not control the access from third parties > to shared memory. > > this does not just affect KSM (or similar > techniques from vmware, xen and microsoft) > but also L3-Caches of modern CPUs. > > If you are interested in these topics, here are some papers: > > L3-Side-Channel attack to recover private > GPG-Keys from another VM: > > http://eprint.iacr.org/2013/448.pdf > > Correlation attack against openssl, > polarssl and libgcrypt on xen and vmware: > > https://eprint.iacr.org/2014/248.pdf > > I don't know if IBMs PowerVM is vulnerable to such > attacks, as it's LPAR architecture is certified > EAL 4+ (which might not tell anything about this attack > vector). > > But you always need to have in mind, what attack > scenario you talk about: > > These attacks are about a malicious vm (this could be a > hacked/hijacked vm) which recovers parts of the shared memory > from a known other instance to attack. > > if you have high security concerns you might want _not_ > to share your physical server with third party controlled > vms, or with vms which might be the target of getting hacked > (or which runs software, which is known to be vulnerable). > > I still consider this scenario not as that relevant today, as > there are many more low hanging fruits (sadly). > > This means in short: > > For the most parts, it's easier to hack you machine directly > or social-engineer your way into it, than it is to hack/get > access to a different vm on the same system and than hack another vm. > > There are also still no automatic tools for this, which I'm aware of > (if they are, I'd like to be pointed to them). > > As soon as automatic attack tools will cover this scenario I'm pretty > sure we'll see an increase in hacked vms and sniffed private keys. > > > HTH > --------------030204050405060907020301 Content-Type: text/html; charset=3DUTF-8 Content-Transfer-Encoding: 7bit Hi Sven,

Thanks for you response, I will read some more.

But as you say it has been known for a while and I was aware of it for many years although never diving into the specifics. I always thought it was not a practical attack vector

What caught my attention was that it was so fast it can be done in less then a minute:

Lightning-Fast Attack: Even in the worst case scenario (cross-VM) the attack
succeeds in less than a minute. To the best of our knowledge, no faster attack
has been implemented against AES in a realistic cloud-like setting. This also
means that just one minute of co-location with the encryption server suffices to
recover the key.

For the most pa=
rts, it's easier to hack you machine directly
or social-engineer your way into it, than it is to hack/get
access to a different vm on the same system and than hack another vm.
So that was the part that worries me, if I have a public cloud offering and someone doesn't hack a vm but simply rents one. He can then spawn a new VM every couple of minutes and it will probably be on a different host each time..... with different neighbours.

You could hack every vulnerable customer VM in a couple of hours this way and it would all be undetected.

There are also still no automatic tools for this, whic=
h I'm aware of
(if they are, I'd like to be pointed to them).

As soon as automatic attack tools will cover this scenario I'm pretty
sure we'll see an increase in hacked vms and sniffed private keys.
I'm sure there are automatic tools being built as we speak but they will not be generally available.


Kind regards,

Jorick Astrego
Netbulae B.V.



On 06/13/2014 09:38 AM, Sven Kieske wrote:
Hi,

it's kind of you to let those know
about these attacks who do not already know them, but
this should be well understood by every professional by know.

Shared resources are never secure, if you
can not control the access from third parties
to shared memory.

this does not just affect KSM (or similar
techniques from vmware, xen and microsoft)
but also L3-Caches of modern CPUs.

If you are interested in these topics, here are some papers:

L3-Side-Channel attack to recover private
GPG-Keys from another VM:

http://eprint.iacr.org/2013/448.pdf

Correlation attack against openssl,
polarssl and libgcrypt on xen and vmware:

https://eprint.iacr.org/2014/248.pdf

I don't know if IBMs PowerVM is vulnerable to such
attacks, as it's LPAR architecture is certified
EAL 4+ (which might not tell anything about this attack
vector).

But you always need to have in mind, what attack
scenario you talk about:

These attacks are about a malicious vm (this could be a
hacked/hijacked vm) which recovers parts of the shared memory
from a known other instance to attack.

if you have high security concerns you might want _not_
to share your physical server with third party controlled
vms, or with vms which might be the target of getting hacked
(or which runs software, which is known to be vulnerable).

I still consider this scenario not as that relevant today, as
there are many more low hanging fruits (sadly).

This means in short:

For the most parts, it's easier to hack you machine directly
or social-engineer your way into it, than it is to hack/get
access to a different vm on the same system and than hack another vm.

There are also still no automatic tools for this, which I'm aware of
(if they are, I'd like to be pointed to them).

As soon as automatic attack tools will cover this scenario I'm pretty
sure we'll see an increase in hacked vms and sniffed private keys.


HTH


--------------030204050405060907020301-- --===============0822825098311948193== Content-Type: multipart/alternative MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="attachment.bin" VGhpcyBpcyBhIG11bHRpLXBhcnQgbWVzc2FnZSBpbiBNSU1FIGZvcm1hdC4KLS0tLS0tLS0tLS0t LS0wMzAyMDQwNTA0MDUwNjA5MDcwMjAzMDEKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy c2V0PVVURi04OyBmb3JtYXQ9Zmxvd2VkCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdiaXQK CkhpIFN2ZW4sCgpUaGFua3MgZm9yIHlvdSByZ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WNoaW5lIGRpcmVjdGx5Cm9yIHNvY2lhbC1lbmdpbmVlciB5b3VyIHdheSBpbnRvIGl0LCB0 aGFuIGl0IGlzIHRvIGhhY2svZ2V0CmFjY2VzcyB0byBhIGRpZmZlcmVudCB2bSBvbiB0aGUgc2Ft ZSBzeXN0ZW0gYW5kIHRoYW4gaGFjayBhbm90aGVyIHZtLgoKVGhlcmUgYXJlIGFsc28gc3RpbGwg bm8gYXV0b21hdGljIHRvb2xzIGZvciB0aGlzLCB3aGljaCBJJ20gYXdhcmUgb2YKKGlmIHRoZXkg YXJlLCBJJ2QgbGlrZSB0byBiZSBwb2ludGVkIHRvIHRoZW0pLgoKQXMgc29vbiBhcyBhdXRvbWF0 aWMgYXR0YWNrIHRvb2xzIHdpbGwgY292ZXIgdGhpcyBzY2VuYXJpbyBJJ20gcHJldHR5CnN1cmUg d2UnbGwgc2VlIGFuIGluY3JlYXNlIGluIGhhY2tlZCB2bXMgYW5kIHNuaWZmZWQgcHJpdmF0ZSBr ZXlzLgoKCkhUSAoKPC9wcmU+CiAgICA8L2Jsb2NrcXVvdGU+CiAgICA8YnI+CiAgPC9ib2R5Pgo8 L2h0bWw+CgotLS0tLS0tLS0tLS0tLTAzMDIwNDA1MDQwNTA2MDkwNzAyMDMwMS0tCgo= --===============0822825098311948193==-- From danken at redhat.com Fri Jun 13 06:36:25 2014 Content-Type: multipart/mixed; boundary="===============4372148144677376167==" MIME-Version: 1.0 From: Dan Kenigsberg To: users at ovirt.org Subject: Re: [ovirt-users] KSM and cross-vm attack Date: Fri, 13 Jun 2014 11:36:17 +0100 Message-ID: <20140613103604.GB10334@redhat.com> In-Reply-To: 539ABEE1.1080405@netbulae.eu --===============4372148144677376167== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, Jun 13, 2014 at 11:05:37AM +0200, Jorick Astrego wrote: > Hi Sven, > = > Thanks for you response, I will read some more. > = > But as you say it has been known for a while and I was aware of it for ma= ny > years although never diving into the specifics. I always thought it was n= ot > a practical attack vector > = > What caught my attention was that it was so fast it can be done in less t= hen > a minute: > = > Lightning-Fast Attack: *Even in the worst case scenario (cross-VM) > the attack** > **succeeds in less than a minute. To the best of our knowledge, no > faster attack** > **has been implemented against AES in a realistic cloud-like > setting. This also** > **means that just one minute of co-location with the encryption > server suffices to** > **recover the key.* > = > = > >For the most parts, it's easier to hack you machine directly > >or social-engineer your way into it, than it is to hack/get > >access to a different vm on the same system and than hack another vm. > = > So that was the part that worries me, if I have a public cloud offering a= nd > someone doesn't hack a vm but simply rents one. He can then spawn a new VM > every couple of minutes and it will probably be on a different host each > time..... with different neighbours. > = > You could hack every vulnerable customer VM in a couple of hours this way > and it would all be undetected. > = > >There are also still no automatic tools for this, which I'm aware of > >(if they are, I'd like to be pointed to them). > > > >As soon as automatic attack tools will cover this scenario I'm pretty > >sure we'll see an increase in hacked vms and sniffed private keys. > I'm sure there are automatic tools being built as we speak but they will = not > be generally available. It would be relatively simple to disable KSM per VM. This way, a customer that values security more than density, could pay more to keep his memory pages unscanned by KSM. Anyone cares to open an RFE for that? I remember that the idea was discussed, but I do not find a formal bug that tracks this. --===============4372148144677376167==-- From dfediuck at redhat.com Fri Jun 13 07:14:36 2014 Content-Type: multipart/mixed; boundary="===============2612041045684450891==" MIME-Version: 1.0 From: Doron Fediuck To: users at ovirt.org Subject: Re: [ovirt-users] KSM and cross-vm attack Date: Fri, 13 Jun 2014 07:14:30 -0400 Message-ID: <389352490.25590641.1402658070138.JavaMail.zimbra@redhat.com> In-Reply-To: 20140613103604.GB10334@redhat.com --===============2612041045684450891== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----- Original Message ----- > From: "Dan Kenigsberg" > To: "Jorick Astrego" , alitke(a)redhat.com, doro= n(a)redhat.com > Cc: users(a)ovirt.org > Sent: Friday, June 13, 2014 1:36:17 PM > Subject: Re: [ovirt-users] KSM and cross-vm attack > = > On Fri, Jun 13, 2014 at 11:05:37AM +0200, Jorick Astrego wrote: > > Hi Sven, > > = > > Thanks for you response, I will read some more. > > = > > But as you say it has been known for a while and I was aware of it for = many > > years although never diving into the specifics. I always thought it was= not > > a practical attack vector > > = > > What caught my attention was that it was so fast it can be done in less > > then > > a minute: > > = > > Lightning-Fast Attack: *Even in the worst case scenario (cross-VM) > > the attack** > > **succeeds in less than a minute. To the best of our knowledge, no > > faster attack** > > **has been implemented against AES in a realistic cloud-like > > setting. This also** > > **means that just one minute of co-location with the encryption > > server suffices to** > > **recover the key.* > > = > > = > > >For the most parts, it's easier to hack you machine directly > > >or social-engineer your way into it, than it is to hack/get > > >access to a different vm on the same system and than hack another vm. > > = > > So that was the part that worries me, if I have a public cloud offering= and > > someone doesn't hack a vm but simply rents one. He can then spawn a new= VM > > every couple of minutes and it will probably be on a different host each > > time..... with different neighbours. > > = > > You could hack every vulnerable customer VM in a couple of hours this w= ay > > and it would all be undetected. > > = > > >There are also still no automatic tools for this, which I'm aware of > > >(if they are, I'd like to be pointed to them). > > > > > >As soon as automatic attack tools will cover this scenario I'm pretty > > >sure we'll see an increase in hacked vms and sniffed private keys. > > I'm sure there are automatic tools being built as we speak but they will > > not > > be generally available. > = > It would be relatively simple to disable KSM per VM. This way, a > customer that values security more than density, could pay more to keep > his memory pages unscanned by KSM. > = > Anyone cares to open an RFE for that? I remember that the idea was > discussed, but I do not find a formal bug that tracks this. Indeed we had an old bz for it. A brand new ovirt RFE will help. Also, it is possible to disable ksm for a cluster today. So it's already po= ssible to have an optimized cluster and a more strict one in the same DC. --===============2612041045684450891==-- From dfediuck at redhat.com Fri Jun 13 07:16:05 2014 Content-Type: multipart/mixed; boundary="===============4858479431765573316==" MIME-Version: 1.0 From: Doron Fediuck To: users at ovirt.org Subject: Re: [ovirt-users] KSM and cross-vm attack Date: Fri, 13 Jun 2014 07:16:05 -0400 Message-ID: <1517248689.25590922.1402658165274.JavaMail.zimbra@redhat.com> In-Reply-To: 389352490.25590641.1402658070138.JavaMail.zimbra@redhat.com --===============4858479431765573316== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----- Original Message ----- > From: "Doron Fediuck" > To: "Dan Kenigsberg" > Cc: users(a)ovirt.org > Sent: Friday, June 13, 2014 2:14:30 PM > Subject: Re: [ovirt-users] KSM and cross-vm attack > = > = > = > ----- Original Message ----- > > From: "Dan Kenigsberg" > > To: "Jorick Astrego" , alitke(a)redhat.com, > > doron(a)redhat.com > > Cc: users(a)ovirt.org > > Sent: Friday, June 13, 2014 1:36:17 PM > > Subject: Re: [ovirt-users] KSM and cross-vm attack > > = > > On Fri, Jun 13, 2014 at 11:05:37AM +0200, Jorick Astrego wrote: > > > Hi Sven, > > > = > > > Thanks for you response, I will read some more. > > > = > > > But as you say it has been known for a while and I was aware of it for > > > many > > > years although never diving into the specifics. I always thought it w= as > > > not > > > a practical attack vector > > > = > > > What caught my attention was that it was so fast it can be done in le= ss > > > then > > > a minute: > > > = > > > Lightning-Fast Attack: *Even in the worst case scenario (cross-VM) > > > the attack** > > > **succeeds in less than a minute. To the best of our knowledge, no > > > faster attack** > > > **has been implemented against AES in a realistic cloud-like > > > setting. This also** > > > **means that just one minute of co-location with the encryption > > > server suffices to** > > > **recover the key.* > > > = > > > = > > > >For the most parts, it's easier to hack you machine directly > > > >or social-engineer your way into it, than it is to hack/get > > > >access to a different vm on the same system and than hack another vm. > > > = > > > So that was the part that worries me, if I have a public cloud offeri= ng > > > and > > > someone doesn't hack a vm but simply rents one. He can then spawn a n= ew > > > VM > > > every couple of minutes and it will probably be on a different host e= ach > > > time..... with different neighbours. > > > = > > > You could hack every vulnerable customer VM in a couple of hours this= way > > > and it would all be undetected. > > > = > > > >There are also still no automatic tools for this, which I'm aware of > > > >(if they are, I'd like to be pointed to them). > > > > > > > >As soon as automatic attack tools will cover this scenario I'm pretty > > > >sure we'll see an increase in hacked vms and sniffed private keys. > > > I'm sure there are automatic tools being built as we speak but they w= ill > > > not > > > be generally available. > > = > > It would be relatively simple to disable KSM per VM. This way, a > > customer that values security more than density, could pay more to keep > > his memory pages unscanned by KSM. > > = > > Anyone cares to open an RFE for that? I remember that the idea was > > discussed, but I do not find a formal bug that tracks this. > = > Indeed we had an old bz for it. A brand new ovirt RFE will help. > Also, it is possible to disable ksm for a cluster today. So it's already > possible > to have an optimized cluster and a more strict one in the same DC. One more thing; For future reference, please us the procedures details here: http://www.ovi= rt.org/Security For anything which may impact other users as well. Thanks, Doron --===============4858479431765573316==-- From S.Kieske at mittwald.de Fri Jun 13 07:20:30 2014 Content-Type: multipart/mixed; boundary="===============6455226700592686293==" MIME-Version: 1.0 From: Sven Kieske To: users at ovirt.org Subject: Re: [ovirt-users] KSM and cross-vm attack Date: Fri, 13 Jun 2014 11:18:33 +0000 Message-ID: <539ADE79.1020000@mittwald.de> In-Reply-To: 20140613103604.GB10334@redhat.com --===============6455226700592686293== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Done that: https://bugzilla.redhat.com/show_bug.cgi?id=3D1109157 Am 13.06.2014 12:36, schrieb Dan Kenigsberg: > It would be relatively simple to disable KSM per VM. This way, a > customer that values security more than density, could pay more to keep > his memory pages unscanned by KSM. > = > Anyone cares to open an RFE for that? I remember that the idea was > discussed, but I do not find a formal bug that tracks this. -- = Mit freundlichen Gr=C3=BC=C3=9Fen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG K=C3=B6nigsberger Stra=C3=9Fe 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Gesch=C3=A4ftsf=C3=BChrer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplement=C3=A4rin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynh= ausen --===============6455226700592686293==-- From S.Kieske at mittwald.de Fri Jun 13 07:23:54 2014 Content-Type: multipart/mixed; boundary="===============8425643783890991260==" MIME-Version: 1.0 From: Sven Kieske To: users at ovirt.org Subject: Re: [ovirt-users] KSM and cross-vm attack Date: Fri, 13 Jun 2014 11:21:56 +0000 Message-ID: <539ADF43.9070506@mittwald.de> In-Reply-To: 1517248689.25590922.1402658165274.JavaMail.zimbra@redhat.com --===============8425643783890991260== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This site misses public keys for sending encrypted mails. That's not that good for a security related mail. I'm sure it just isn't mentioned in the wiki, could one use the same keys as for redhat security mailings? Am 13.06.2014 13:16, schrieb Doron Fediuck: > One more thing; > = > For future reference, please us the procedures details here: http://www.o= virt.org/Security > For anything which may impact other users as well. -- = Mit freundlichen Gr=C3=BC=C3=9Fen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH & Co. KG K=C3=B6nigsberger Stra=C3=9Fe 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Gesch=C3=A4ftsf=C3=BChrer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplement=C3=A4rin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynh= ausen --===============8425643783890991260==--