smt strings security
play

SMT, Strings, Security Philipp Rmmer Uppsala University SAT/SMT/AR, - PowerPoint PPT Presentation

SMT, Strings, Security Philipp Rmmer Uppsala University SAT/SMT/AR, July 6 th , 2018 1 Plan String constraints by example A word equation primer Decidable fragments of string constraints 2 Strings in Verifcation 3 String in


  1. Soundness argument  Label equations in the proof with:  if equation is unsat  if equation is sat, has variable occurrences, and is length of for the Decreasing labels shortest solution → Branch cannot  Order pairs lexicographically be closed! Lemma In each application of the Nielsen rule, if the parent is labelled with , then at least one child has label . 60

  2. Combinations ... Quadratii Equations 61

  3. Combinations ... Regex Constraints Quadratii Equations 62

  4. Combinations ... Regex Constraints ✓ Quadratii Equations 63

  5. Combinations ... Regex Constraints Length ✓ Constraints Quadratii Equations 64

  6. Combinations ... Regex Constraints Length ✓ Constraints ? Quadratii Equations 65

  7. Combinations ... Regex Constraints Length ✓ ? Constraints ? Quadratii Equations 66

  8. Combinations ... Regex Constraints Length ✓ ? Constraints ? Quadratii Transduition Equations 67

  9. Combinations ... Regex Constraints Length ✓ ? Constraints ? Quadratii Transduition Equations Undeiidable 68

  10. Combinations ... Regex Constraints Length ✓ ? Constraints ? Quadratii Transduition Equations Undeiidable 69

  11. Combinations ... Regex Constraints Length ✓ ? Constraints ? Quadratii Transduition Equations Undeiidable 70

  12. Combinations ... Regex Constraints Length ✓ ? Constraints ? Quadratii Transduition Equations Undeiidable 71

  13. The Norn fragment 1. Boolean structure 2. Acyclic (linear) word equations 3. Regex memberships 4. Length constraints Parosh Aziz Abdulla, Mohamed Faouzi Atig, Yu-Fang Chen, Lukás Holík, Ahmed Rezine, Philipp Rümmer, Jari Stenman: String Constraints for Verifcation. CAV 2014 72

  14. The Norn fragment 1. Boolean structure 2. Acyclic (linear) word equations 3. Regex memberships 4. Length constraints (a decidable fragment) Parosh Aziz Abdulla, Mohamed Faouzi Atig, Yu-Fang Chen, Lukás Holík, Ahmed Rezine, Philipp Rümmer, Jari Stenman: String Constraints for Verifcation. CAV 2014 73

  15. The Norn fragment 1. Boolean structure Order in which 2. Acyclic (linear) word equations procedure handles 3. Regex memberships operators 4. Length constraints (a decidable fragment) Parosh Aziz Abdulla, Mohamed Faouzi Atig, Yu-Fang Chen, Lukás Holík, Ahmed Rezine, Philipp Rümmer, Jari Stenman: String Constraints for Verifcation. CAV 2014 74

  16. Examples 75

  17. 1. Boolean struiture  Use standard DPLL/CDCL → Easy  Just consider conjunctions of literals  But we need to handle negation!  Negated word equations  Negated regex constraints  Negated length constraints 76

  18. 1. Boolean struiture  Use standard DPLL/CDCL → Easy  Just consider conjunctions of literals  But we need to handle negation!  Negated word equations ? ✓  Negated regex constraints ✓  Negated length constraints 77

  19. 1b. Negative word eqs. Can be reduced to positive equations: Lemma 78

  20. 1b. Negative word eqs. Can be reduced to positive equations: Lemma Large alphabets → a, b need to be handled symbolically in practice 79

  21. 1b. Negative word eqs. Can be reduced to positive equations: Lemma Theorem Any Boolean combination of word equations can be reduced to a single word equation with the same set of solutions (when projected to the 80 original set of variables).

  22. 2. Aiyilii word equations  Reduce to solved form by systematic application of Nielsen’s transformation: ( do not occur in )  After that, eliminate equations by inlining! 81

  23. 3. Regular expressions  Membership tests with ioniatenation can be split:  Tests with same left-hand side can be merged: 82

  24. 3. Regular expressions  Membership tests with ioniatenation can be split: Disjunction over  Tests with same left-hand side can be states of automaton merged: representing 83

  25. 4. Length ionstraints  Compute the length abstraition of each regex constraint:  Conjoin length abstractions with other length constraints and check satisfability 84

  26. 4. Length ionstraints  Compute the length abstraition of each regex constraint:  Conjoin length abstractions with other length constraints and check satisfability A Presburger formula that can be extracted in linear time from 85

  27. 5. Optimisations ...  E.g., exploit length information when splitting equations or regexes (still too slow ...) 86

  28. Adding Transducers . 87

  29. 3. Regular expressions  Membership tests with ioniatenation can be split:  Tests with same left-hand side can be merged: 88

  30. 3. Regular expressions  Membership tests with ioniatenation can be split: Does not work any more with transducers!  Tests with same left-hand side can be merged: 89

  31. The Sloth fragments 1. Boolean structure (no negation) 2. Straight-line word equations 3. n -track transducer constraints Lukás Holík, Petr Janku, Anthony W. Lin, Philipp Rümmer, Tomás Vojnar: String constraints with concatenation and transducers solved efciently. PACMPL 2(POPL): 4:1-4:32 90 (2018)

  32. The Sloth fragments 1. Boolean structure (no negation) 2. Straight-line word equations 3. n -track transducer constraints → also decidable! Lukás Holík, Petr Janku, Anthony W. Lin, Philipp Rümmer, Tomás Vojnar: String constraints with concatenation and transducers solved efciently. PACMPL 2(POPL): 4:1-4:32 91 (2018)

  33. Transduiers Defnition An n -traik transduier is a fnite-state automaton over the alphabet An n -track transducer defnes an n -ary rational relation . 92

  34. Transduiers Defnition An n -traik transduier is a fnite-state automaton over the alphabet An n -track transducer defnes an n -ary rational relation . 93

  35. Transduiers Defnition An n -traik transduier is a fnite-state automaton over the alphabet An n -track transducer defnes an n -ary rational relation . 94

  36. HTML Esiaping 95

  37. Undeiidability Proposition/Folklore String constraints with rational relations are undeiidable .  Post correspondence problem: Given word pairs is there an index sequence with 96

  38. Undeiidability Proposition/Folklore String constraints with rational relations are undeiidable .  Post correspondence problem: Given word pairs e l b a d i i e d n U is there an index sequence with 97

  39. Fragments: aiyilii formulas  Positive Boolean comb. of rational relations applied to distinct variables  In every , and share at most one variable  PSPACE-complete [Barcelo, Figuiera, and Libkin’13] 98

  40. Straight-line fragment SL  Conjunction of equations sorted by dependency:  All pairwise distinct  Each may only occur in  Each is concatenation, or (interpreted as )  Regex constraints 99

  41. SL example JavaSiript embedded in a web-page var x = goog.string.htmlEscape(cat); var y = goog.string.escapeString(x); catElem.innerHTML = '<button onclick="createCatList(\'' + y + '\')">' + x + '</button>'; 100

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