skip to main content
10.1145/1866307.1866371acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

DieHarder: securing the heap

Published:04 October 2010Publication History

ABSTRACT

Heap-based attacks depend on a combination of memory management error and an exploitable memory allocator. Many allocators include ad hoc countermeasures against particular exploits but their effectiveness against future exploits has been uncertain. This paper presents the first formal treatment of the impact of allocator design on security. It analyzes a range of widely-deployed memory allocators, including those used by Windows, Linux, FreeBSD and OpenBSD, and shows that they remain vulnerable to attack. It them presents DieHarder, a new allocator whose design was guided by this analysis. DieHarder provides the highest degree of security from heap-based attacks of any practical allocator of which we are aware while imposing modest performance overhead. In particular, the Firefox web browser runs as fast with DieHarder as with the Linux allocator.

References

  1. }}J. Afek and A. Sharabani. Dangling pointer: Smashing the pointer for fun and profit. In Black Hat USA, 2007.Google ScholarGoogle Scholar
  2. }}P. Akritidis, C. Cadar, C. Raiciu, M. Costa, and M. Castro. Preventing memory error exploits with wit. In SP '08: Proceedings of the 2008 IEEE Symposium on Security and Privacy, pages 263--277, Washington, DC, USA, 2008. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}P. Akritidis, M. Costa, M. Castro, and S. Hand. Baggy bounds checking: An efficient and backwards-compatible defense against out-of-bounds errors. In Proceedings of the 18th USENIX Security Symposium, pages 51--66. USENIX, Aug. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}A. Anisimov. Defeating Microsoft Windows XP SP2 heap protection and DEP bypass, 2005.Google ScholarGoogle Scholar
  5. }}K. Avijit, P. Gupta, and D. Gupta. Tied, libsafeplus: Tools for runtime buffer overflow protection. In Proceedings of the 13th USENIX Security Symposium. USENIX, Aug. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}BBP. BSD heap smashing. http://www.ouah.org/BSD-heap-smashing.txt.Google ScholarGoogle Scholar
  7. }}E. D. Berger. HeapShield: Library-based heap overflow protection for free. Technical Report UMCS TR-2006--28, Department of Computer Science, University of Massachusetts Amherst, May 2006.Google ScholarGoogle Scholar
  8. }}E. D. Berger and B. G. Zorn. DieHard: Probabilistic memory safety for unsafe languages. In Proceedings of the 2006 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 158--168, New York, NY, USA, 2006. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}E. D. Berger and B. G. Zorn. Efficient probabilistic memory safety. Technical Report UMCS TR-2007--17, Department of Computer Science, University of Massachusetts Amherst, Mar. 2007.Google ScholarGoogle Scholar
  10. }}S. Bhatkar, D. C. DuVarney, and R. Sekar. Address obfuscation: An efficient approach to combat a broad range of memory error exploits. In Proceedings of the 12th USENIX Security Symposium, pages 105--120. USENIX, Aug. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}S. Bhatkar, R. Sekar, and D. C. DuVarney. Efficient techniques for comprehensive protection from memory error exploits. In Proceedings of the 14th USENIX Security Symposium, pages 271--286. USENIX, Aug. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}M. Conover and the w00w00 Security Team. w00w00 on heap overflows. http://www.w00w00.org/files/articles/heaptut.txt, January 1999.Google ScholarGoogle Scholar
  13. }}J. N. Ferguson. Understanding the heap by breaking it. In Black Hat USA, 2007.Google ScholarGoogle Scholar
  14. }}S. Gonchigar. Ani vulnerability: History repeats. http://www.sans.org/reading_room/whitepapers/threats/ani-vulnerability-%history-repeats_1926, 2007.Google ScholarGoogle Scholar
  15. }}D. R. Hanson. A portable storage management system for the Icon programming language. Software Practice and Experience, 10(6):489--500, 1980.Google ScholarGoogle ScholarCross RefCross Ref
  16. }}P.-H. Kamp. Malloc(3) revisited. http://phk.freebsd.dk/pubs/malloc.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}M. Kharbutli, X. Jiang, Y. Solihin, G. Venkataramani, and M. Prvulovic. Comprehensively and efficiently protecting the heap. In ASPLOS-XII: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, pages 207--218, New York, NY, USA, 2006. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}D. Lea. A memory allocator. http://gee.cs.oswego.edu/dl/html/malloc.html, 1997.Google ScholarGoogle Scholar
  19. }}V. B. Lvin, G. Novark, E. D. Berger, and B. G. Zorn. Archipelago: trading address space for reliability and security. In ASPLOS XIII: Proceedings of the 13th international conference on Architectural support for programming languages and operating systems, pages 115--124, New York, NY, USA, Mar. 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}J. McDonald and C. Valasek. Practical Windows XP/2003 heap exploitation. In Black Hat USA, 2009.Google ScholarGoogle Scholar
  21. }}Microsoft Corporation. Pageheap. http://support.microsoft.com/kb/286470.Google ScholarGoogle Scholar
  22. }}O. Moerbeek. A new malloc(3) for OpenBSD. In EuroBSDCon, 2009.Google ScholarGoogle Scholar
  23. }}G. C. Necula, S. McPeak, and W. Weimer. Ccured: Type-safe retrofitting of legacy code. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 128--139. ACM Press, Jan. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}G. Novark, E. D. Berger, and B. G. Zorn. Exterminator: automatically correcting memory errors with high probability. In Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 1--11, New York, NY, USA, 2007. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}G. Novark, E. D. Berger, and B. G. Zorn. Exterminator: Automatically correcting memory errors with high probability. Communications of the ACM, 51(12):87--95, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}PaX Team. PaX address space layout randomization (ASLR). http://pax.grsecurity.net/docs/aslr.txt.Google ScholarGoogle Scholar
  27. }}B. Perens. Electric Fence v2.1. http://perens.com/FreeSoftware/ElectricFence/.Google ScholarGoogle Scholar
  28. }}J. H. Perkins, S. Kim, S. Larsen, S. P. Amarasinghe, J. Bachrach, M. Carbin, C. Pacheco, F. Sherwood, S. Sidiroglou, G. Sullivan, W.-F. Wong, Y. Zibin, M. D. Ernst, and M. C. Rinard. Automatically patching errors in deployed software. In J. N. Matthews and T. E. Anderson, editors, SOSP, pages 87--102. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}F. Qin, J. Tucek, J. Sundaresan, and Y. Zhou. Rx: Treating bugs as allergies: A safe method to survive software failures. In Proceedings of the Twentieth Symposium on Operating Systems Principles, volume XX of Operating Systems Review, Brighton, UK, Oct. 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}P. Ratanaworabhan, B. Livshits, and B. Zorn. Nozzle: A defense against heap-spraying code injection attacks. In Proceedings of the 18th USENIX Security Symposium, pages 169--186. USENIX, Aug. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. }}W. Robertson, C. Kruegel, D. Mutz, and F. Valeur. Run-time detection of heap-based overflows. In LISA '03: Proceedings of the 17th Large Installation Systems Administration Conference, pages 51--60. USENIX, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. }}H. Shacham, M. Page, B. Pfaff, E. Jin Goh, N. Modadugu, and D. Boneh. On the effectiveness of address-space randomization. In CCS '04: Proceedings of the 11th ACM conference on Computer and communications security, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. }}Solar Designer. JPEG COM marker processing vulnerability in Netscape browsers. http://www.openwall.com/advisories/OW-002-netscape-jpeg/, 2000.Google ScholarGoogle Scholar
  34. }}A. Sotirov. Heap Feng Shui in JavaScript. In Black Hat Europe, 2007.Google ScholarGoogle Scholar
  35. }}O. Whitehouse. An analysis of address space layout randomization on Windows Vista. http://www.symantec.com/avcenter/reference/Address_Space_Layout_Randomi%zation.pdf, 2007.Google ScholarGoogle Scholar
  36. }}Wikipedia. Dangling pointer -- Wikipedia, the free encyclopedia, 2010. {Online; accessed 16-April-2010}.Google ScholarGoogle Scholar
  37. }}P. R. Wilson, M. S. Johnstone, M. Neely, and D. Boles. Dynamic storage allocation: A survey and critical review. In Proceedings of the International Workshop on Memory Management, volume 986 of Lecture Notes in Computer Science, pages 1--116, Kinross, Scotland, Sept. 1995. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. }}Y. Younan, W. Joosen, F. Piessens, and H. V. den Eynden. Security of memory allocators for C and C+. Technical Report CW 419, Department of Computer Science, Katholieke Universiteit Leuven, Belgium, July 2005.Google ScholarGoogle Scholar

Index Terms

  1. DieHarder: securing the heap

          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
            CCS '10: Proceedings of the 17th ACM conference on Computer and communications security
            October 2010
            782 pages
            ISBN:9781450302456
            DOI:10.1145/1866307

            Copyright © 2010 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: 4 October 2010

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            CCS '10 Paper Acceptance Rate55of325submissions,17%Overall Acceptance Rate1,261of6,999submissions,18%

            Upcoming Conference

            CCS '24
            ACM SIGSAC Conference on Computer and Communications Security
            October 14 - 18, 2024
            Salt Lake City , UT , USA

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader