skip to main content
10.1145/1103780.1103786acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
Article

An electric fence for kernel buffers

Published:11 November 2005Publication History

ABSTRACT

Improper access of data buffers is one of the most common errors in programs written in assembler, C, C++, and several other languages. Existing programs and OSs frequently access the data beyond the allocated buffers or access buffers that were already freed. Such programs and OSs may run for years before their problems can be detected because improper memory accesses frequently result in a silent data corruption. Not surprisingly, most computer worms exploit buffer overflow errors to gain complete control over computer systems. Only after recent worm epidemics, did code developers begin to realize the scale of the problem and the number of potential memory-access violations in existing code.Due to the syntax and flexibility of many programming languages, memory access violation problems cannot be detected at compile time. Tools that verify correctness before every memory access impose unacceptably high overheads. As a result, most of the developed techniques focus on preventing the hijacking of control by hackers and worms due to stack overflows. Consequently, hidden data corruption is given less attention.Memory access violations can be efficiently detected using the hardware support of the paging and virtual memory.Kefence is the general run-time solution we developed that allows to detect and avoid in-kernel overflow, underflow, and stale access problems for internal kernel buffers. Kefence is especially applicable to file system code because file systems operate at a high level of abstraction and require no direct access to the physical memory. At the same time, file systems use a large number of kernel buffers and file system errors are most harmful for users because users' persistent data can be corrupted.

References

  1. A. Aranya, C. P. Wright, and E. Zadok. Tracefs: A File System to Trace Them All. In Proceedings of the Third USENIX Conference on File and Storage Technologies (FAST 2004), pages 129--143, San Francisco, CA, March/April 2004. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. J. Braam. The Lustre Storage Architecture. www.lustre.org/documentation.html, October 2002.Google ScholarGoogle Scholar
  3. CERT Coordination Center. CERT/CC Overview incident and Vulnerability Trends Technical Report. www.cert.org/present/cert-overview-trends.Google ScholarGoogle Scholar
  4. T. Chiueh and F. Hsu. RAD: A Compile-time Solution to Buffer Overflow Attacks. In Proceedings of the 21rst International Conference on Distributed Computing Systems (ICDCS), pages 409--420, Phoenix, AZ, April 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Cowan, C. Pu, D. Maier, H. Hintongif, J. Walpole, P. Bakke, S. Beattie, A. Grier, P. Wagle, and Qian Zhang. StackGuard: Automatic Adaptive Detection and Prevention of Buffer-Overflow Attacks. In Proceedings of the Seventh USENIX Security Symposium, pages 63--78, San Antonio, TX, January 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Intel. Intel Itanium 2 Processor Reference Manual For Software Development and Optimization. Intel Corporation, 2004.Google ScholarGoogle Scholar
  7. J. Katcher. PostMark: A New Filesystem Benchmark. Technical Report TR3022, Network Appliance, 1997. www.netapp.com/tech_library/3022.html.Google ScholarGoogle Scholar
  8. BSD Library Functions Manual. libgmalloc(3).Google ScholarGoogle Scholar
  9. V. Markstein, J. Cocke, and P. Markstein. Optimization of Range Checking. In Proceedings of the 17th Symposium on Compiler Construction (SIGPLAN'82), pages 114--119, June 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. B. Milekic. memguard(9).Google ScholarGoogle Scholar
  11. A. Morton. Re: {patch, 2.5} _ _vmalloc allocates spurious page?, October 2002. www.uwsg.iu.edu/hypermail/linux/kernel/0210.1/2532.html.Google ScholarGoogle Scholar
  12. J. Navarro, S. Iyer, P. Druschel, and A. Cox. Practical, transparent operating system support for superpages. In Proceedings of the Fifth Symposium on Operating System Design and Implementation (OSDI '02), pages 89--104, Boston, MA, December 2002. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Nguyen and F. Irigoin. Efficient and Effective Array Bound Checking. ACM Transactions on Programming Languages and Systems, 27(3):527--570, May 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. W. Oney. Programming the Microsoft Windows Driver Model. Microsoft Press, Redmond, WA, second edition, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. S. Pendry, N. Williams, and E. Zadok. Am-utils User Manual, 6.1b3 edition, July 2003. www.am-utils.org.Google ScholarGoogle Scholar
  16. B. Perens. efence(3), April 1993.Google ScholarGoogle Scholar
  17. H. Shacham, M. Page, B. Pfaff, E. Goh, N. Modadugu, and D. Boneh. On the Effectiveness of Address-Space Randomization. In Proceedings of 11th ACM Conference on Computer and Communications Security (CCS), pages 298--307, October 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. A. Solomon and M. E. Russinovich. Inside Microsoft Windows 2000. Microsoft Press, Redmond, WA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Szeredi. Filesystem in Userspace. fuse.sourceforge.net, February 2005.Google ScholarGoogle Scholar
  20. E. Zadok and I. Bǎdulescu. A stackable file system interface for Linux. In LinuxExpo Conference Proceedings, pages 141--151, Raleigh, NC, May 1999.Google ScholarGoogle Scholar
  21. E. Zadok and J. Nieh. FiST: A Language for Stackable File Systems. In Proceedings of the Annual USENIX Technical Conference, pages 55--70, San Diego, CA, June 2000. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An electric fence for kernel buffers

      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
        StorageSS '05: Proceedings of the 2005 ACM workshop on Storage security and survivability
        November 2005
        150 pages
        ISBN:159593233X
        DOI:10.1145/1103780

        Copyright © 2005 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: 11 November 2005

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        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