Elamur Research

Native Client: A Sandbox for Portable, Untrusted x86 Native Code

Paper · 2009 · Bennet Yee, David Sehr, Gregory Dardyk et al.

Summary

Around 2009, browser applications could not reach the speed of native software. The existing routes for running native code on the web, ActiveX and NPAPI plugins, relied on users deciding whom to trust, and that repeatedly let malicious or defective code run. Google's authors present Native Client (NaCl), which lets a browser load untrusted x86 machine code safely and silently, with no permission pop-ups. Its core is an "inner sandbox." A validator inspects each binary before execution and accepts only a safe instruction subset that can be disassembled reliably. x86 memory segments then limit where code and data references may point. A trusted service runtime in the same process provides controlled services such as memory and threads. Modules communicate through the IMC datagram service, which underlies SRPC and NPAPI. NaCl modules are portable across operating systems and browsers while keeping threads, SSE and hand-written assembly. The authors report that porting Linux/gcc code is simple and that the sandbox costs little for compute-bound tasks. This shows native speed and web-level safety can coexist, and the system was released as open source.

Key points

  • Architecture has two layers: a constrained execution environment for untrusted modules (".nexe") and a trusted runtime through which allowed side effects pass. Storage and other privileged services stay outside NaCl, in a microkernel-like style.
  • The inner sandbox combines static validation with x86 segmented memory, refining CISC software fault isolation. It also shields modules from OS defects, such as shared libraries that Windows maps into every process.
  • Communication runs over IMC, a reliable datagram service with NaCl Resource Descriptors and shared memory. SRPC lets JavaScript call native code, and NPAPI gives access to DOM and URLs.
  • The threat model assumes arbitrary code and data, invalid ABI arguments, race-condition attacks, and thread or memory use up to resource limits.
  • Unlike ActiveX's Authenticode trust model or Nooks (which handles accidental bugs only), NaCl is built to resist deliberate abuse. The authors avoided virtualization to preserve OS and browser neutrality and peak performance.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Bennet Yee, David Sehr, Gregory Dardyk, J. Bradley Chen, Robert Muth, Tavis Ormandy, Shiki Okasaka, Neha Narula and Nicholas Fullagar. 2009. Native Client: A Sandbox for Portable, Untrusted x86 Native Code. IEEE S&P 2009.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{yee2009native,
  title = {{Native Client: A Sandbox for Portable, Untrusted x86 Native Code}},
  author = {Bennet Yee, David Sehr, Gregory Dardyk, J. Bradley Chen, Robert Muth, Tavis Ormandy, Shiki Okasaka, Neha Narula and Nicholas Fullagar},
  booktitle = {IEEE S\&P 2009},
  year = {2009},
  doi = {10.1109/sp.2009.25},
  url = {https://doi.org/10.1109/sp.2009.25}
}

References

63 references, 0 of them with a card of ours. Each entry links to our card when we hold the work, else to OpenAlex and Google Scholar searches for it.

  1. M. Abadi, M. Budiu, U. Erlingsson, and J. Ligatti. Control-flow integrity: Principles, implementations, and applications. In Proceedings of the 12th ACM Conference on Computer and Communications Security, November 2005. OpenAlex ↗ · Scholar ↗
  2. M. Accetta, R. Baron, W. Bolosky, D. Golub, R. Rashid, A. Tevanian, and M. Young. Mach: A new kernel foundation for UNIX development. pages 93–112, 1986. OpenAlex ↗ · Scholar ↗
  3. A. Adl-Tabatabai, G. Langdale, S. Lucco, and R. Wahbe. Efficient and language-independent mobile programs. SIGPLAN Not., 31(5):127–136, 1996. OpenAlex ↗ · Scholar ↗
  4. Advanced Micro Devices. AMD64 Architecture Programmer’s Manual, Volume 1: Application Programming. Advanced Micro Devices, September 2007. Publication number: 24592. OpenAlex ↗ · Scholar ↗
  5. Autoconf. http://www.gnu.org/software/autoconf/. OpenAlex ↗ · Scholar ↗
  6. P. Barham, B. Dragovic, K. Fraser, S. Hand, A. Ho, R. Neuge-bauer, I. Pratt, and A. Warfield. Xen and the art of virtualization. In 19th ACM Symposium on Operating Systems Principles, pages 164–177, 2003. OpenAlex ↗ · Scholar ↗
  7. E. Bugnion, S. Devine, K. Govil, and M. Rosenblum. Disco: Running commodity operating systems on scalable multiprocessors. ACM Transactions on Computer Systems, 15(4):412– 447, November 1997. OpenAlex ↗ · Scholar ↗
  8. Bullet physics SDK. http://www.bulletphysics.com. OpenAlex ↗ · Scholar ↗
  9. J. Burns. Developing secure mobile applications for android. http://isecpartners.com/files/iSEC Securing Android Apps.pdf, 2008. OpenAlex ↗ · Scholar ↗
  10. K. Campbell, L. Gordon, M. Loeb, and L. Zhou. The economic cost of publicly announced information security breaches: empirical evidence from the stock market. Journal of Computer Security, 11(3):431–448, 2003. OpenAlex ↗ · Scholar ↗
  11. B. Cantrill, M. Shapiro, and A. Leventhal. Dynamic instrumentation of production systems. In 2004 USENIX Annual Technical Conference, June 2004. OpenAlex ↗ · Scholar ↗
  12. D. R. Cheriton. The V distributed system. Communications of the ACM, 31:314–333, 1988. OpenAlex ↗ · Scholar ↗
  13. F. B. Cohen. Defense-in-depth against computer viruses. Computers and Security, 11(6):565–584, 1993. OpenAlex ↗ · Scholar ↗
  14. J. Crawford and P. Gelsinger. Programming 80386. Sybex Inc., 1991. OpenAlex ↗ · Scholar ↗
  15. A. Denning. ActiveX Controls Inside Out. Microsoft Press, May 1997. OpenAlex ↗ · Scholar ↗
  16. Directorate for Command, Control, Communications and Computer Systems, U.S. Department of Defense Joint Staff. Information assurance through defense-in-depth. Technical report, Directorate for Command, Control, Communications and Computer Systems, U.S. Department of Defense Joint Staff, February 200… OpenAlex ↗ · Scholar ↗
  17. J. R. Douceur, J. Elson, J. Howell, and J. R. Lorch. Leveraging legacy code to deploy desktop applications on the web. In Proceedings of the 2008 Symposium on Operating System Design and Implementation, December 2008. OpenAlex ↗ · Scholar ↗
  18. M. Eisler (editor). XDR: External data representation. Internet RFC 4506, 2006. OpenAlex ↗ · Scholar ↗
  19. U. Erlingsson, M. Abadi, M. Vrable, M. Budiu, and G. Necula. XFI: Software guards for system address spaces. In OSDI ’06: 7th Symposium on Operating Systems Design And Implementation, pages 75–88, November 2006. OpenAlex ↗ · Scholar ↗
  20. B. Ford. VXA: A virtual architecture for durable compressed archives. In USENIX File and Storage Technologies, December 2005. OpenAlex ↗ · Scholar ↗
  21. B. Ford and R. Cox. Vx32: Lightweight user-level sandboxing on the x86. In 2008 USENIX Annual Technical Conference, June 2008. OpenAlex ↗ · Scholar ↗
  22. The GNU compiler collection. http://gcc.gnu.org. OpenAlex ↗ · Scholar ↗
  23. GNU binutils. http://www.gnu.org/software/binutils/. OpenAlex ↗ · Scholar ↗
  24. I. Goldberg, D. Wagner, R. Thomas, and E. A. Brewer. A secure enviroment for untrusted helper applications. In Proceedings of the 6th USENIX Security Symposium, 1996. OpenAlex ↗ · Scholar ↗
  25. D. Golub, A. Dean, R. Forin, and R. Rashid. UNIX as an application program. In Proceedings of the Summer 1990 USENIX Conference, pages 87–95, 1990. http://code.google.com/p/ OpenAlex ↗ · Scholar ↗
  26. Google Inc. Android—an open handset alliance project. http://code.google.com/android, 2007. OpenAlex ↗ · Scholar ↗
  27. J. Gosling, B. Joy, G. Steele, and G. Bracha. Language Specification. Addison-Wesley, 2000. The Java OpenAlex ↗ · Scholar ↗
  28. B. Gough and R. Stallman. An Introduction to GCC. Network Theory, Ltd., 2004. OpenAlex ↗ · Scholar ↗
  29. G. Hunt, J. Larus, M. Abadi, M. Aiken, P. Barham, M. Fah-ndrich, C. Hawblitzel, O. Hodson, S. Levi, N. Murphy, B. Steensgaard, D. Tarditi, T. Wobber, and B. Zill. An overview of the Singularity project. Technical Report MSR-TR-2005-135, Microsoft Research, October 2005. OpenAlex ↗ · Scholar ↗
  30. Intel Corporation. Intel Pentium processor invalid instruction errata overview. http://support.intel.com/support/processor/pentium/ppiie/index.html. OpenAlex ↗ · Scholar ↗
  31. Intel Corporation. Intel 64 and IA-32 Architectures Software Developers Manual, Volume 1: Basic Architecture. Intel Corporation, August 2007. Order Number: 253655-024US. OpenAlex ↗ · Scholar ↗
  32. S. Ioannidis and S. M. Bellovin. Building a secure web browser. In USENIX Annual Technical Conference, FREENIX Track, pages 127–134, 2001. OpenAlex ↗ · Scholar ↗
  33. S. Ioannidis, S. M. Bellovin, and J. M. Smith. Sub-operating systems: A new approach to application security. In Proceedings of the 10th ACM SIGOPS European Workshop, 2002. OpenAlex ↗ · Scholar ↗
  34. Jam 2.1 user’s guide. http://javagen.com/jam/. OpenAlex ↗ · Scholar ↗
  35. C. Jensen and D. Hagimont. Protection wrappers: a simple and portable sandbox for untrusted applications. In Proceedings of the 8th ACM SIGOPS European Systems Conference, pages 104–110, 1998. OpenAlex ↗ · Scholar ↗
  36. W. Joy, E. Cooper, R. Fabry, S. Leffler, K. McKusick, and D. Mosher. 4.2 BSD system manual. Technical report, Computer Systems Research Group, University of California, Berkeley, 1983. OpenAlex ↗ · Scholar ↗
  37. K. Kaspersky and A. Chang. Remote code execution through Intel CPU bugs. In Hack In The Box (HITB) 2008 Malaysia Conference. OpenAlex ↗ · Scholar ↗
  38. T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Prentice Hall, 1999. OpenAlex ↗ · Scholar ↗
  39. S. McCamant and G. Morrisett. Efficient, verifiable binary sandboxing for a CISC architecture. Technical Report MIT-CSAIL-TR-2005-030, 2005. OpenAlex ↗ · Scholar ↗
  40. S. McCamant and G. Morrisett. Evaluating SFI for a CISC architecture. In 15th USENIX Security Symposium, August 2006. OpenAlex ↗ · Scholar ↗
  41. Microsoft Corporation. The kill-bit faq - part 1 of 3. Microsoft Security Vulnerability Research and Defense (Blog). OpenAlex ↗ · Scholar ↗
  42. Microsoft Corporation. Signing and checking code with Authenticode. http://msdn.microsoft.com/en-us/library/ms537364(VS.85).aspx. OpenAlex ↗ · Scholar ↗
  43. Microsoft Corporation. Structured exception handling. http://msdn.microsoft.com/en-us/library/ms680657(VS.85).aspx, 2008. OpenAlex ↗ · Scholar ↗
  44. G. Morrisett, K. Crary, N. Glew, and D. Walker. Stack-based typed assembly language. Journal of Functional Programming, 12(1):43–88, 2002. OpenAlex ↗ · Scholar ↗
  45. G. Necula. Proof carrying code. In Principles of Programming Languages, 1997. OpenAlex ↗ · Scholar ↗
  46. G. Nelson (editor). Prentice-Hall, 1991. System Programming in Modula-3. OpenAlex ↗ · Scholar ↗
  47. Netscape Corporation. Gecko plugin API reference. http://developer.mozilla.org/en/docs/Gecko Plugin API Reference. OpenAlex ↗ · Scholar ↗
  48. V. Prasad, W. Cohen, F. Eigler, M. Hunt, J. Keniston, and J. Chen. Locating system problems using dynamic instrumentation. In 2005 Ottawa Linux Symposium, pages 49–64, July 2005. OpenAlex ↗ · Scholar ↗
  49. N. Provos. Improving host security with system call policies. In USENIX Security Symposium, August 2003. OpenAlex ↗ · Scholar ↗
  50. J. Reinders. Intel Thread Building Blocks. Associates, 2007. O’Reilly & OpenAlex ↗ · Scholar ↗
  51. J. G. Richard West. User-level sandboxing: a safe and efficient mechanism for extensibility. Technical Report TR-2003-014, Boston University, Computer Science Department, Boston, MA, 2003. OpenAlex ↗ · Scholar ↗
  52. J. Richter. CLR via C\#, Second Edition. Microsoft Press, 2006. OpenAlex ↗ · Scholar ↗
  53. M. Savage. Cost of computer viruses top $10 billion already this year. ChannelWeb, August 2001. OpenAlex ↗ · Scholar ↗
  54. J. Shapiro, J. Smith, and D. Farber. EROS: a fast capability system. In Symposium on Operating System Principles, pages 170–185, 1999. OpenAlex ↗ · Scholar ↗
  55. C. Small. MiSFIT: A tool for constructing safe extensible C++ systems. In Proceedings of the Third USENIX Conference on Object-Oriented Technologies, June 1997. OpenAlex ↗ · Scholar ↗
  56. B. Stroustrup. The C++ Programming Language: Second Edition. Addison-Wesley, 1997. OpenAlex ↗ · Scholar ↗
  57. M. Swift, M. Annamalai, B. Bershad, and H. Levy. Recovering device drivers. In 6th USENIX Symposium on Operating Systems Design and Implementation, December 2004. OpenAlex ↗ · Scholar ↗
  58. D. Tarditi, G. Morrisett, P. Cheng, C. Stone, R. Harper, and P. Lee. TIL: a type-directed optimizing compiler for ML. In PLDI ’96: Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation, pages 181–192, New York, NY, USA, 1996. ACM. OpenAlex ↗ · Scholar ↗
  59. W. Tarreau. ptrace documentation. http://www.linuxhq.com/kernel/v2.4/36-rc1/Documentation/ptrace.txt, 2007. OpenAlex ↗ · Scholar ↗
  60. U. S. Department of Defense, Computer Security Center. Trusted computer system evaluation criteria, December 1985. OpenAlex ↗ · Scholar ↗
  61. R. Wahbe, S. Lucco, T. E. Anderson, and S. L. Graham. Efficient software-based fault isolation. ACM SIGOPS Operating Systems Review, 27(5):203–216, December 1993. OpenAlex ↗ · Scholar ↗
  62. C. Waldspurger. Memory resource management in VMware ESX Server. In 5th Symposium on Operating Systems Design and Implementation, December 2002. OpenAlex ↗ · Scholar ↗
  63. Document Object Model (DOM) Level 1 Specification. Number REC-DOM-Level-1-19981001. World Wide Web Consortium, October 1998. OpenAlex ↗ · Scholar ↗

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/yee-2009-native-client-sandbox-portable-untrusted/