skip to main content
10.1145/349299.349313acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free Access

Safety checking of machine code

Authors Info & Claims
Published:01 May 2000Publication History

ABSTRACT

We show how to determine statically whether it is safe for untrusted machine code to be loaded into a trusted host system.

Our safety-checking technique operates directly on the untrusted machine-code program, requiring only that the initial inputs to the untrusted program be annotated with typestate information and linear constraints. This approach opens up the possibility of being able to certify code produced by any compiler from any source language, which gives the code producers more freedom in choosing the language in which they write their programs. It eliminates the dependence of safety on the correctness of the compiler because the final product of the compiler is checked. It leads to the decoupling of the safety policy from the language in which the untrusted code is written, and consequently, makes it possible for safety checking to be performed with respect to an extensible set of safety properties that are specified on the host side.

We have implemented a prototype safety checker for SPARC machine-language programs, and applied the safety checker to several examples. The safety checker was able to either prove that an example met the necessary safety conditions, or identify the places where the safety conditions were violated. The checking times ranged from less than a second to 14 seconds on an UltraSPARC machine.

References

  1. 1.M. Abadi, and L. Cardelli. A Theory of Objects. Monographs in Computer Science, D. Gries, and F. B. Schneider (Ed.). Springer- Verlag New York. (1996).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.B. Bershad, S. Savage, P. Pardyak, E. G. Sirer, M. Fiucynski, D. Becker, S. Eggers, and C. Chambers. Extensibility, Safety, and Performance in the SPIN Operating System, 15th Symposium on Operating System Principles. Copper Mountain, CO. (December 1995).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.B. Alpern, and F. B. Schneider. Recognizing Safety and Liveness. Distributed Computing 2 3. (1987).]]Google ScholarGoogle Scholar
  4. 4.R. Bodik, R. Gupta, and V. Sarkar. ABCD: Eliminating Array Bounds Checks on Demand. SIGPLAN Conference on Programming Language Design and Implementation. Vancouver B.C., Canada. (June 2000).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.D.R. Chase, M. Wegman, and F. Zadeck. Analysis of Pointers and Structures. SIGPLAN Conference on Programming Language Design and Implementation. New York, NY. (1990).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.T. Chiueh, G. Venkitachalam, P. Pradhan. Integrating Segmentation and Paging Protection for Safe, Efficient and Transparent Software Extensions. 17th ACM Symposium on Operating Systems Principles. Charleston, SC. (December 1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.P. Cousot, and N. Halbwachs. Automatic Discovery of Linear Restraints Among Variables of a Program. Fifth Annual ACM Symposium on Principles of Programming Languages. Tucson, AZ. (January 1978).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.D.K. Detlefs, R. M. Leino, G. Nelson, and J. B. Saxe. Extended Static Checking. Research Report 159, Compaq Systems Research Center. Palo Alto, CA. (December 1998).]]Google ScholarGoogle Scholar
  9. 9.E.W. Dijkstra. A Discipline of Programming. Prentice-Hall. Englewood Cliffs, NJ. (1976).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.B. Elspas, M. W. Green, K. N. Levitt, and R. J. Waldinger. Research in Interactive Program-Proving Techniques. SRI, Menlo Park, California. (May 1972).]]Google ScholarGoogle Scholar
  11. 11.D. Engler, M. F. Kaashoek, and J. O'Toole. Exokernel: An Operating System Architecture for Application-Level Resource Management. 15th Symposium on Operating System Principles. Copper Mountain, CO. (December 1995).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.C.A.R. Hoare. An Axiomatic Basis for Computer Programming. Communications of the ACM 12 10. (October 1969).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Illustra Information Technologies. Illustra DataBlade Developer's Kit Architecture Manual, Release 1.1. (1994).]]Google ScholarGoogle Scholar
  14. 14.JavaSoft. Java Native Interface Specification. Release 1.1 (May 1997).]]Google ScholarGoogle Scholar
  15. 15.jPVM: A Native Methods Interface to PVM for the Java Platform. http://www.chmsr.gatech.edu/jPVM. (2000).]]Google ScholarGoogle Scholar
  16. 16.S. Katz, and Z. Manna. A Heuristic Approach to Program Verification. 3rd International Conference on Artificial Intelligence. (August 1973).]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.W. Kelly, V. Maslov, W. Pugh, E. Rosser, T. Shpeisman, and D. Wonnocott. The Omega Library, Version 1.1.0 Interface Guide. omega@ cs.umd.edu, http://www.cs.umd.edu/projects/omega. (November 1996).]]Google ScholarGoogle Scholar
  18. 18.X. Leroy, and F. Rouaix. Security Properties of Typed Applets. 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. San Diego, CA. (January 1998).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.Lindholm T., and F. Yellin. The Java (TM) Virtual Machine Specification. Second Edition. http://java.sun.com/docs/books/vmspec/2ndedition/html/VMSpec ToC.doc.html. (1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.S. McCanne, and V. Jacobson. The BSD Packet Filter: A New Architecture for User-Level Packet Capture. The Winter 1993 USENIX Conference. USENIX Association. San Diego, CA. (January 1993).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.Misrosoft. Microsoft COM Technologies-Information and Resources for the Component Object Model-Based Technologies. http://www.microsoft.com/com. (March 2000)]]Google ScholarGoogle Scholar
  22. 22.B.P. Miller, M. D. Callaghan, J. M. Cargille, J. K. Hollingsworth, R. B. Irvin, K. L. Karavanic, K. Kunchithapadam, and T. Newhall.The Paradyn Parallel Performance Measurement Tools. IEEE Computer 28 11. (November 1995).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.J.C. Mogul, R. F. Rashid, and M. J. Accetta. The Packet Filter: An Efficient Mechanism for User-Level Network Code. ACM Symposium on Operating Systems Principles. Austin, TX. (November 1987).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.J. Morris. A General Axiom of Assignment. Theoretical Foundations of Programming Methodology, Lecture Notes of an International Summer School, directed by F. L. Bauer, E. W. Dijkstra and C.A.R. Hoare. Manfred Broy and Gunther Schmidt (Ed.). D. Reidel Publishing Company. (1982).]]Google ScholarGoogle Scholar
  25. 25.G. Morrisett, D. Tarditi, P. Cheng, C. Stone, R. Harper, and P. Lee. The TIL/ML Compiler: Performance and Safety Through Types. In 1996 Workshop on Compiler Support for Systems Software. Tucson, AZ. (February 1996).]]Google ScholarGoogle Scholar
  26. 26.G. Morrisett, D. Walker, K. Crary, and N. Glew. From System F to Typed Assembly Language. 25th Annual ACM Symposium on Principles of Programming Languages. San Diego, CA. (January 1998).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.G. Morrisett, K. Crary, N. Glew, and D. Walker. Stack-Based Typed Assembly Language. 1998 Workshop on Types in Compilation. Published in Xavier Leroy and Atsushi Ohori, editors, Lecture Notes in Computer Science, 1473. Springer- Verlag 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.G. Morrisett, K. Crary, N. Glew, D. Grossman, R. Samuels, F. Smith, D. Walker, S. Weirich, S. Zdancewic. TALx86: A Realistic Typed Assembly Language. ACM Workshop on Compiler Support for System Software. Atlanda, GA (May 1999).]]Google ScholarGoogle Scholar
  29. 29.S. S. Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers, Inc. (1997).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30.G. Necula. Compiling with Proofs. Ph.D. Dissertation, Carnegie Mellon University. (September 1998).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31.G. Necula, and P. Lee. The Design and Implementation of a Certifying Compiler. ACM SIGPLAN Conference on Programming Language Design and Implementation. Montreal, Canada. (June 1998).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 32.G. Necula. Proof-Carrying Code. 24th Annual ACM Symposium on Principles of Programming Languages. Paris, France. (January 1997).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33.Netscape. Browser Plug-ins, 1999. http://h~me'netscape'c~m/plugins/index'html']]Google ScholarGoogle Scholar
  34. 34.C. Pu, T. Audrey, A. Black, C. Consel, C. Cowan, J. Inouye, L. Kethana, J. Walpole, and K. Zhang. Optimistic Incremental Specialization: Streamlining a Commercial Operating System. 15th ACM Symposium on Operating Systems Principles. Copper Mountain, CO. (December 1995).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35.W. Pugh. The Omega Test: A Fast and Practical Integer Programming Algorithm for Dependence Analysis. Supercomputing. Albuquerque, NM. (November 1991).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. 36.W. Pugh, and D. Wonnacott. Eliminating False Data Dependences Using the Omega Test. ACM SIGPLAN Conference on Programming Language Design and Implementation. San Francisco, CA. (June 1992).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 37.W. Pugh, and D. Wonnacott. Experience with Constraint-Based Array Dependence Analysis. Technical Report CS-TR-3371. University of Maryland. (1994).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 38.D.D. Redell, Y. K. Dalal, T. R. Horsley, H. C. Lauer, W. C. Lynch, P. R. McJones, H. G. Murray, and S. C. Purcell. Pilot: An Operating System for a Personal Computer. Communications of the ACM 23 2. (February 1980).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 39.R. Rivest. The MD5 Message-Digest Algorithm. Request for Comments: 1321. MIT Laboratory for Computer Science and RSA Data Security, Inc. (April 1992).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. 40.F.B. Schneider. Towards Fault-Tolerant and Secure Agentry. llth International Workshop on Distributed Algorithms. Saarbrticken, Germany. (September 1997).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 41.M.I. Seltzer, Y. Endo, C. Small, and K. A. Smith. Dealing With Disaster: Surviving Misbehaved Kernel Extensions. 2nd USENIX Symposium on Operating Systems Design and Implementation. Seattle, WA. (October 1996).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. 42.M. Sift, S. Chandra, T. Ball, K. Kunchithapadam, and T. Reps. Coping with type casts in C. Seventh European Software Engineering Conference and Seventh ACM SIGSOFT Symposium on the Foundations of Software Engineering. Toulouse, France. (September 1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. 43.N.P. Smith. Stack Smashing Vulnerabilities in the UNIX Operating System. http://www'destr~y'net/machines/security' (2000).]]Google ScholarGoogle Scholar
  44. 44.R. Strom, and D. M. Yellin. Extending Typestate Checking Using Conditional Liveness Analysis. IEEE Transactions on Software Engineering 19 5. (May 1993).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. 45.R. Strom, and S. Yemini. Typestate: A Programming Language Concept for Enhancing Software Reliability. IEEE Transactions on Software Engineering 12 1. (January 1986).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. 46.C. Small, and M. A. Seltzer. Comparison of OS Extension Technologies. USENIX 1996 Annual Technical Conference. San Diego, CA. (January 1996).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. 47.M. Stonebraker. Inclusion of New Types in Relational Data Base Systems. Readings in Database Systems. Second Edition. Michael Stonebraker (Ed.). (1994).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. 48.Sun Microsystems, Inc. Java (TM) Plug-in Overview. http://java.sun.com/products/1.1.1/index- 1.1.1.html. (October 1999).]]Google ScholarGoogle Scholar
  49. 49.N. Susuki, and K. Ishihata. Implementation of an Array Bound Checker. 4th ACM Symposium on Principles of Programming Languages. Los Angeles, CA. (January 1977).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. 50.A. Tamches, and B. P. Miller. Fine-Grained Dynamic Instrumentation of Commodity Operating System Kernels. Third Symposium on Operating System Design and Implementation. New Orleans, LA. (February 1999).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. 51.M. Tamir. ADI: Automatic Derivation of Invariants. IEEE Transactions on Software Engineering SE-6 1. (January 1980).]]Google ScholarGoogle Scholar
  52. 52.D. Tennenhouse, and D. Wetherall. Towards an Active Network Architecture. Computer Communication Review 26 2. (April 1996).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. 53.D. Wegner, J. Foster, E. Brewer, and A. Aiken. A First Step Towards Automated Detection of Buffer Overrun Vulnerabilities. The 2000 Network and Distributed Systems Security Conference. San Diego, CA. (February 2000).]]Google ScholarGoogle Scholar
  54. 54.B. Wegbreit. The Synthesis of Loop Predicates. Communications ofthe ACM 17 2. (February 1974).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. 55.R. Wahbe, S. Lucco, T. E. Anderson, and S. L. Graham. Efficient Software-Based Fault Isolation. 14th Symposium on Operating System Principles. Asheville, NC. (December 1993).]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Safety checking of machine code

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Conferences
                PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation
                August 2000
                358 pages
                ISBN:1581131992
                DOI:10.1145/349299

                Copyright © 2000 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 1 May 2000

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • Article

                Acceptance Rates

                PLDI '00 Paper Acceptance Rate30of173submissions,17%Overall Acceptance Rate406of2,067submissions,20%

                Upcoming Conference

                PLDI '24

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader