Reset-Atomicity in Xen Benita Bose Adam Everspaugh VM-Reset - - PowerPoint PPT Presentation

reset atomicity in xen
SMART_READER_LITE
LIVE PREVIEW

Reset-Atomicity in Xen Benita Bose Adam Everspaugh VM-Reset - - PowerPoint PPT Presentation

Reset-Atomicity in Xen Benita Bose Adam Everspaugh VM-Reset Security Vulnerability App generates a random number VMM takes a snapshot 198764, 845920,0 Each time VM restored 349581 from snapshot - same random number used


slide-1
SLIDE 1

Reset-Atomicity in Xen

Benita Bose Adam Everspaugh

slide-2
SLIDE 2

VM-Reset Security Vulnerability

  • App generates a random

number

  • VMM takes a snapshot
  • Each time VM restored

from snapshot - same random number used

198764, 845920,0 349581

slide-3
SLIDE 3

1) Allow applications to detect VM-resets 2) Use transactional memory (TM) to add atomicity

Solution - VM-Reset Atomicity

RC = reset counter

Hypervisor Guest VM App 1 App 2 RC

sc_get_rc() hc_get_rc()

slide-4
SLIDE 4

Results Summary

It works! Guarantees atomicity across VM resets. Adds ~50% overhead to typical cryptographic operations

slide-5
SLIDE 5

2010: researchers broke Firefox and Apache Compromised Apache server's private key!

VM-Reset Security Vulnerabilities

Motivation Background Design Results Conclusion

slide-6
SLIDE 6

One-time Use Values

Motivation Background Design Results Conclusion counter

slide-7
SLIDE 7

void encryptSign() { fread("/dev/urandom", &iv, IV_SIZE); fread("/dev/urandom", &seed, SEED_SIZE); /* ... */ AES_encrypt(message, key, iv, &ciphertext); DSA_sign(ciphertext, dkey, seed, &signature); }

EncryptSign

Motivation Background Design Results Conclusion

slide-8
SLIDE 8

Detecting Resets

Hypervisor Guest VM App 1 App 2 RC

sc_get_rc() hc_get_rc()

Motivation Background Design Results Conclusion

  • Track resets with a counter
  • Hypercall to retrieve counter
  • System call to retrieve counter
slide-9
SLIDE 9

Transactional Memory

  • Borrowed from database

transaction

  • Guarantees Consistency

and Atomicity

  • Supports speculative

execution and rollback

  • Transaction either commits
  • r aborts

Motivation Background Design Results Conclusion

slide-10
SLIDE 10

How TM Works

  • Makes private copy of shared data
  • Updates private copy
  • If shared data is unchanged:

Updates original copy with private copy

  • Else detects conflict : discards

private copy

Motivation Background Design Results Conclusion

slide-11
SLIDE 11

Compiler Support

  • TM support in GCC 4.7
  • Flags : fgnu-tm
  • transaction_atomic
  • transaction_pure
  • transaction_safe
  • transaction_cancel

Motivation Background Design Results Conclusion

slide-12
SLIDE 12

Wrapper Pseudocode

bool commit = false; while (!commit) { transaction_atomic { int my_rc = sys_get_rc(); func(); if (my_rc != sys_get_rc()) transaction_cancel; else commit = true; } }

Motivation Background Design Results Conclusion

slide-13
SLIDE 13

Without TM

START counter: 0 END counter: 100 START counter: 100 END counter: 200 START counter: 200 END counter: 300 START counter: 300 END counter: 400

VS

With TM

START counter: 0 END counter: 100 START counter: 100 END counter: 200 START counter: 200 END counter: 300 START counter: 200 END counter: 300

Verification

VM RESET VM RESET Motivation Background Design Results Conclusion

slide-14
SLIDE 14

Transactional Memory Overhead

Motivation Background Design Results Conclusion

slide-15
SLIDE 15

Transactional Memory Overhead

Motivation Background Design Results Conclusion

slide-16
SLIDE 16

Conclusion

  • Working solution for

VM reset security vulnerability

  • ~50% performance overhead
  • HW TM support could improve

performance

Motivation Background Design Results Conclusion

slide-17
SLIDE 17

Thank you

QUESTIONS?