Some “Secure Programming” Exercises for an Introductory Programming Class

  • Matt Bishop
Conference paper
Part of the IFIP Advances in Information and Communication Technology book series (IFIPAICT, volume 406)


Ideally, computer security should be an integral part of all programming courses. Beginning programming classes pose a particular challenge, because the students are learning basic concepts of programming. Thus, teaching them about buffer overflows as security problems, requiring an explanation of concepts such as “smashing the stack,” will confuse students more than motivate them to check array bounds. Advanced concepts such as race conditions require more background than the students have, or will have, when taking introductory programming classes. An alternate approach is to teach the underlying concepts of robust programming; preventing crashes or errors is central to such a course. This paper presents some exercises that illustrate this approach, and some thoughts on what constitutes “secure programming”.


secure programming robust programming introduction to programming 


  1. 1.
    Christey, S.: CWE/SANS Top 25 Most Dangerous Programming Errors (March 10, 2009),
  2. 2.
    Williams, J.,Wichers, D.: Top 10 2007 (2007),

Copyright information

© IFIP International Federation for Information Processing 2013

Authors and Affiliations

  • Matt Bishop
    • 1
  1. 1.Dept. of Computer ScienceUniversity of California at DavisDavisUSA

Personalised recommendations