inser ng inten onal bugs for model checking assurance
play

Inser&ng Inten&onal Bugs for Model Checking Assurance - PowerPoint PPT Presentation

Inser&ng Inten&onal Bugs for Model Checking Assurance Thomas L. Rodeheffer and Ramakrishna Kotla Microso? Research, Silicon Valley The Problem


  1. Inser&ng ¡Inten&onal ¡Bugs ¡for ¡ Model ¡Checking ¡Assurance ¡ Thomas ¡L. ¡Rodeheffer ¡and ¡ Ramakrishna ¡Kotla ¡ Microso? ¡Research, ¡Silicon ¡Valley ¡

  2. The ¡Problem ¡ • Complicated ¡protocol ¡(“Pasture”) ¡ TPM ¡ On-­‑line ¡ Create ¡hidden ¡ exchange ¡ decryp&on ¡key ¡ Decide ¡later ¡ Access ¡key ¡ Read ¡message ¡ Revoke ¡key ¡and ¡ Delete ¡message ¡ generate ¡proof ¡ without ¡reading ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 2 ¡

  3. The ¡Problem ¡ • Complicated ¡protocol ¡(“Pasture”) ¡ • Important ¡safety ¡proper&es ¡ TPM ¡ On-­‑line ¡ Create ¡hidden ¡ exchange ¡ decryp&on ¡key ¡ Decide ¡later ¡ Mechanism: ¡ append-­‑only ¡log ¡ Access ¡key ¡ of ¡decisions ¡ Revoke ¡key ¡and ¡ generate ¡proof ¡ Safety: ¡never ¡both ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 3 ¡

  4. The ¡Problem ¡ • Complicated ¡protocol ¡(“Pasture”) ¡ • Important ¡safety ¡proper&es ¡ • Adversarial ¡seSng ¡ TPM ¡ On-­‑line ¡ Create ¡hidden ¡ exchange ¡ decryp&on ¡key ¡ Decide ¡later ¡ Mechanism: ¡ append-­‑only ¡log ¡ Access ¡key ¡ of ¡decisions ¡ Revoke ¡key ¡and ¡ generate ¡proof ¡ Safety: ¡never ¡both ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 4 ¡

  5. The ¡Solu&on ¡ • Complicated ¡protocol ¡(“Pasture”) ¡ • Important ¡safety ¡proper&es ¡ • Adversarial ¡seSng ¡ • Solu&on: ¡Use ¡formal ¡methods ¡ ¡ § Specifica&on ¡– ¡ is ¡it ¡correct? ¡ § Model ¡checking ¡– ¡ was ¡it ¡enough? ¡ § Formal ¡proof ¡– ¡ too ¡hard? ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 5 ¡

  6. What ¡we ¡did ¡for ¡Pasture ¡ Proof ¡ Understanding ¡ Iden&cal ¡logic ¡but ¡ sketch ¡ the ¡results ¡ tons ¡more ¡detail ¡ Model ¡ checked ¡ TLA+ ¡spec ¡ TLA+ ¡proof ¡ checking ¡ (19 ¡pp) ¡ (68 ¡pp) ¡ results ¡ Write ¡proof ¡ (CPU ¡months) ¡ (2 ¡weeks) ¡ state, ¡ac&ons, ¡invariants ¡ invariants ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 6 ¡

  7. Pre_y ¡sure ¡it ¡is ¡correct ¡ Proof ¡ sketch ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 7 ¡

  8. Pre_y ¡sure ¡we ¡covered ¡everything ¡ Proof ¡ sketch ¡ TLA+ ¡spec ¡ (19 ¡pp) ¡ state, ¡ac&ons, ¡invariants ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 8 ¡

  9. Model ¡checking ¡– ¡was ¡it ¡enough? ¡ Proof ¡ sketch ¡ Several ¡CPU ¡months ¡later… ¡ TLA+ ¡spec ¡ “no ¡errors ¡found” ¡ ¡ (19 ¡pp) ¡ state, ¡ac&ons, ¡invariants ¡ Cannot ¡model ¡check ¡any ¡larger ¡configura&ons ¡using ¡TLC ¡ because ¡such ¡configura&ons ¡have ¡more ¡than ¡2 32 ¡dis&nct ¡ states ¡– ¡making ¡state ¡fingerprint ¡collision ¡a ¡near ¡certainty. ¡ ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 9 ¡

  10. Insert ¡some ¡inten&onal ¡bugs ¡ Easy ¡methodology: ¡ ¡Find ¡an ¡ac<on ¡ that ¡seems ¡important ¡and ¡omit ¡it ¡ Proof ¡ sketch ¡ Several ¡CPU ¡months ¡later… ¡ TLA+ ¡spec ¡ “no ¡errors ¡found” ¡ ¡ (19 ¡pp) ¡ state, ¡ac&ons, ¡invariants ¡ A ¡few ¡CPU ¡minutes… ¡ + ¡inten<onal ¡bugs ¡ Bug1 ¡viola>on ¡example ¡ Bug2 ¡viola>on ¡example ¡ Bug3 ¡viola>on ¡example ¡ TLA+ ¡spec ¡ … ¡… ¡ Bug12 ¡viola>on ¡example ¡ (19 ¡pp) ¡ Bug13 ¡viola>on ¡example ¡ Bug14 ¡no ¡error ¡ Bug15 ¡no ¡error ¡ Bug16 ¡no ¡error ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 10 ¡

  11. Not ¡all ¡bugs ¡violate ¡safety ¡ Proof ¡ sketch ¡ Several ¡CPU ¡months ¡later… ¡ TLA+ ¡spec ¡ “no ¡errors ¡found” ¡ ¡ (19 ¡pp) ¡ state, ¡ac&ons, ¡invariants ¡ AEer ¡analysis: ¡ A ¡few ¡CPU ¡minutes… ¡ + ¡inten<onal ¡bugs ¡ these ¡bugs ¡ Bug1 ¡viola>on ¡example ¡ happen ¡not ¡to ¡ Bug2 ¡viola>on ¡example ¡ Bug3 ¡viola>on ¡example ¡ violate ¡safety ¡ TLA+ ¡spec ¡ … ¡… ¡ Bug12 ¡viola>on ¡example ¡ (19 ¡pp) ¡ Bug13 ¡viola>on ¡example ¡ Bug14 ¡no ¡error ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡violates ¡liveness ¡ Bug15 ¡no ¡error ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡violates ¡append-­‑only ¡log ¡ Bug16 ¡no ¡error ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡-­‑ ¡violates ¡append-­‑only ¡log ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 11 ¡

  12. Now ¡write ¡the ¡formal ¡proof ¡ Proof ¡ Understanding ¡ Iden&cal ¡logic ¡but ¡ sketch ¡ the ¡results ¡ tons ¡more ¡detail ¡ Model ¡ checked ¡ TLA+ ¡spec ¡ TLA+ ¡proof ¡ checking ¡ (19 ¡pp) ¡ (68 ¡pp) ¡ results ¡ Write ¡proof ¡ (CPU ¡months) ¡ (2 ¡weeks) ¡ state, ¡ac&ons, ¡invariants ¡ invariants ¡ Proof ¡does ¡not ¡permit ¡the ¡ append-­‑only ¡log ¡viola<on ¡bugs. ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 12 ¡

  13. Include ¡a ¡slight ¡op&miza&on ¡ Proof ¡ Understanding ¡ Iden&cal ¡logic ¡but ¡ sketch ¡ the ¡results ¡ tons ¡more ¡detail ¡ Model ¡ checked ¡ TLA+ ¡spec ¡ TLA+ ¡proof ¡ checking ¡ (19 ¡pp) ¡ (68 ¡pp) ¡ results ¡ Write ¡proof ¡ (CPU ¡months) ¡ (2 ¡weeks) ¡ state, ¡ac&ons, ¡invariants ¡ invariants ¡ Revise ¡proof ¡ Slightly ¡op&mize ¡ (2 ¡hours) ¡ implementa&on ¡ Modified ¡ Modified ¡ checked ¡ TLA+ ¡spec ¡ TLA+ ¡proof ¡ (17 ¡pp) ¡ (64 ¡pp) ¡ state, ¡ac&ons, ¡invariants ¡ invariants ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 13 ¡

  14. Conclusions ¡ • Proof ¡sketch ¡was ¡valuable ¡ • Helped ¡understand ¡model ¡results ¡ • Guided ¡formal ¡proof ¡ ¡ • Assurance ¡via ¡inten&onal ¡bugs ¡before ¡proof ¡ • Be_er ¡to ¡specify ¡the ¡actual ¡invariant, ¡ not ¡the ¡(stronger) ¡proof ¡invariant ¡ ¡ • Amazingly ¡easy ¡to ¡create ¡proof ¡for ¡ slightly ¡modified ¡specifica&on ¡ ¡ invariants ¡ August ¡20, ¡2012 ¡ Inser&ng ¡Inten&onal ¡Bugs ¡for ¡Model ¡Checking ¡Assurance ¡ 14 ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend