1 / 8

Stack buffer overflow

Stack buffer overflow. Stack frame layout. #include < string.h > void foo (char *bar) { char c[12]; strcpy (c, bar); //no bound } int main ( int argc , char ** argv ) { foo( argv [1]); }. #include < string.h > void foo (char *bar) { char c[12]; strcpy (c, bar); //no bound

raja
Download Presentation

Stack buffer overflow

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stack buffer overflow

  2. Stack frame layout

  3. #include <string.h> void foo (char *bar) { char c[12]; strcpy (c, bar); //no bound } int main (intargc, char **argv) { foo(argv[1]); }

  4. #include <string.h> void foo (char *bar) { char c[12]; strcpy (c, bar); //no bound } int main (intargc, char **argv) { foo(argv[1]); }

  5. #include <string.h> void foo (char *bar) { char c[12]; strcpy (c, bar); //no bound } int main (intargc, char **argv) { foo(argv[1]); }

  6. Demo • Linux

  7. Homework 3 • Due next week. Tuesday?? • Stack buffer overflow problem, very similar to what we have described today. • Demo.

  8. Linker Exercise • 2.31

More Related