skip to main content
10.1145/2451116.2451151acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article

Automated repair of binary and assembly programs for cooperating embedded devices

Published:16 March 2013Publication History

ABSTRACT

We present a method for automatically repairing arbitrary software defects in embedded systems, which have limited memory, disk and CPU capacities, but exist in great numbers. We extend evolutionary computation (EC) algorithms that search for valid repairs at the source code level to assembly and ELF format binaries, compensating for limited system resources with several algorithmic innovations. Our method does not require access to the source code or build toolchain of the software under repair, does not require program instrumentation, specialized execution environments, or virtual machines, or prior knowledge of the bug type.

We repair defects in ARM and x86 assembly as well as ELF binaries, observing decreases of 86% in memory and 95% in disk requirements, with 62% decrease in repair time, compared to similar source-level techniques. These advances allow repairs previously possible only with C source code to be applied to any ARM or x86 assembly or ELF executable. Efficiency gains are achieved by introducing stochastic fault localization, with much lower overhead than comparable deterministic methods, and low-level program representations.

When distributed over multiple devices, our algorithm finds repairs faster than predicted by naive parallelism. Four devices using our approach are five times more efficient than a single device because of our collaboration model. The algorithm is implemented on Nokia N900 smartphones, with inter-phone communication fitting in 900 bytes sent in 7 SMS text messages per device per repair on average.

References

  1. S. Adams. Google software updates: Courgette (design documents). http://dev.chromium.org/developers/design-documents/software-updates-courgette, 2011.Google ScholarGoogle Scholar
  2. BBC News. Microsoft zune affected by 'bug'. In http://news.bbc.co.uk/2/hi/technology/7806683.stm, Dec. 2008.Google ScholarGoogle Scholar
  3. M. Costa, J. Crowcroft, M. Castro, A. Rowstron, L. Zhou, L. Zhang, and P. Barham. Vigilante: End-to-end containment of internet worm epidemics. ACM Trans. Comput. Syst., 26 (4): 1--68, 2008. ISSN 0734-2071. http://doi.acm.org/10.1145/1455258.1455259. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. Ebert and C. Jones. Embedded software: Facts, figures, and future. Computer, 42 (4): 42--52, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Eiben and J. Smith. Introduction to Evolutionary Computing. Springer, 2003.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. F. Fernández, M. Tomassini, and L. Vanneschi. An empirical study of multipopulation genetic programming. Genetic Programming and Evolvable Machines, 4 (1): 21--51, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Ferrie. Malware analysis: Flibi night. Virus Bulletin, pages 4--5, March 2011.Google ScholarGoogle Scholar
  8. J. Fitzpatrick. An interview with Steve Furber. Commun. ACM, 54: 34--39, May 2011. http://doi.acm.org/10.1145/1941487.1941501. URL http://doi.acm.org/10.1145/1941487.1941501. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. Forrest, W. Weimer, T. Nguyen, and C. Le Goues. A genetic programming approach to automated software repair. In Genetic and Evolutionary Computing Conference, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. J. Grefenstette. Optimization of control parameters for genetic algorithms. IEEE Transactions on Systems, Man and Cybernetics, 16 (1): 122--128, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. B. Grosso. Computer Simulations of Genetic Adaptation: Parallel Subcomponent Interaction in a Multilocus Model. PhD thesis, The University of Michigan, Ann Arbor, MI, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Harding. Genetic programming on graphics processing units bibliography. Memorial Univeristy, Canada, Feb. 9, 2010. http://www.gpgpgpu.com.Google ScholarGoogle Scholar
  13. B. Harvey, J. A. Foster, and D. A. Frincke. Towards byte code genetic programming. In Genetic and evolutionary computing conference, page 1234, 1999.Google ScholarGoogle Scholar
  14. J. H. Holland. Adaptation in Natural and Artificial Systems. MIT Press, Cambridge, MA, 1992. Second edition. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. Jin, L. Song, W. Zhang, S. Lu, and B. Liblit. Automated atomicity-violation fixing. In Programming Language Design and Implementation, pages 389--400, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. A. Jones and M. J. Harrold. Empirical evaluation of the tarantula automatic fault-localization technique. In Automated Software Engineering, pages 273--282, 2005. ISBN 1-59593-993-4. http://doi.acm.org/10.1145/1101908.1101949. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Z. Konfrst. Parallel genetic algorithms: Advances, computing trends, applications and perspectives. In Parallel and Distributed Processing Symposium. IEEE, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  18. J. R. Koza. Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. F. Kühling, K. Wolff, and P. Nordin. Brute-force approach to automatic induction of machine code on CISC architectures. In European Conference on Genetic Programming, pages 288--297, 2002. ISBN 3-540-43378-3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Le Goues, M. Dewey-Vogt, S. Forrest, and W. Weimer. A systematic study of automated program repair: Fixing 55 out of 105 bugs for$8 each. In International Conference on Software Engineering, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Levon. OProfile Manual. Victoria University of Manchester, 2004.Google ScholarGoogle Scholar
  22. A. Munawar, M. Wahib, M. Munetomo, and K. Akama. A survey: Genetic algorithms and the fast evolving world of parallel computing. In High Performance Computing and Communications, pages 897--902, 2008. ISBN 978-0-7695-3352-0. http://doi.ieeecomputersociety.org/10.1109/HPCC.2008.77. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Nordin, W. Banzhaf, and F. D. Francone. Efficient evolution of machine code for CISC architectures using instruction blocks and homologous crossover. In Advances in Genetic Programming 3, pages 275--299. June 1999. ISBN 0-262-19423-6. URL http://www.aimlearning.com/aigp31.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. C. Ofria, C. Adami, and T. C. Collier. Design of evolvable computer languages. IEEE Transactions on Evolutionary Computation, 6: 420--424, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Orlov and M. Sipper. Genetic programming in the wild: evolving unrestricted bytecode. In Genetic and evolutionary computation, pages 1043--1050, 2009. ISBN 978-1-60558-325-9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. H. Perkins, S. Kim, S. Larsen, S. Amarasinghe, J. Bachrach, M. Carbin, C. Pacheco, F. Sherwood, S. Sidiroglou, G. Sullivan, W.-F. Wong, Y. Zibin, M. D. Ernst, and M. Rinard. Automatically patching errors in deployed software. In Symposium on Operating Systems Principles, pages 87--102, October 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. E. Schulte, S. Forrest, and W. Weimer. Automated program repair through the evolution of assembly code. In Automated Software Engineering, pages 313--316, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. C. Seacord, D. Plakosh, and G. A. Lewis. Modernizing Legacy Systems: Software Technologies, Engineering Process and Business Practices. Addison-Wesley, 2003. ISBN 0321118847. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. L. G. Shapiro, G. C. Stockman, L. G. Shapiro, and G. Stockman. Computer Vision. Prentice Hall, 2001. ISBN 0130307963. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Symantec. Internet security threat report. Technical report, http://eval.symantec.com/mktginfo/enterprise/white_papers/ent-whitepaper_symantec_internet_security_threat_report_x_09_2006.en-us.pdf, Sept. 2006.Google ScholarGoogle Scholar
  31. S. Thomas. Taking the redpill: Artificial evolution in native x86 systems. http://spth.vxheavens.com/ArtEvol.html, October 2010.Google ScholarGoogle Scholar
  32. P. Valencia. In situ genetic programming for wireless sensor networks. In SenSys Doctoral Colloquium, 2007.Google ScholarGoogle Scholar
  33. Y. Wei, Y. Pei, C. A. Furia, L. S. Silva, S. Buchholz, B. Meyer, and A. Zeller. Automated fixing of programs with contracts. In International Symposium on Software Testing and Analysis, pages 61--72, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. W. Weimer. Patches as better bug reports. In Generative Programming and Component Engineering, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. and Forrest}icse09W. Weimer, T. Nguyen, C. Le Goues, and S. Forrest. Automatically finding patches using genetic programming. In International Conference on Software Engineering, pages 364--367, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. W. Weimer, S. Forrest, C. L. Goues, and T. Nguyen. Automatic program repair with evolutionary computation. Commun. ACM, 53 (5): 109--116, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Automated repair of binary and assembly programs for cooperating embedded devices

      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
        ASPLOS '13: Proceedings of the eighteenth international conference on Architectural support for programming languages and operating systems
        March 2013
        574 pages
        ISBN:9781450318709
        DOI:10.1145/2451116
        • cover image ACM SIGARCH Computer Architecture News
          ACM SIGARCH Computer Architecture News  Volume 41, Issue 1
          ASPLOS '13
          March 2013
          540 pages
          ISSN:0163-5964
          DOI:10.1145/2490301
          Issue’s Table of Contents
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 48, Issue 4
          ASPLOS '13
          April 2013
          540 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2499368
          Issue’s Table of Contents

        Copyright © 2013 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: 16 March 2013

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate535of2,713submissions,20%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader