title: Why I do get "Cannot find bound of current function" when I overwrite the ret address of a vulnerable program?
body: <p>I want to exploit a stack based buffer overflow for education purposes.</p>
  
  <p>There is a typical function called with a parameter from main, which is given as input from the program a local buffer where the parameter is saved. Given an input such that <code>nops+shellcode+address_shellcode</code>, I will exploit it. </p>
  
  <p>After debugging with gdb I found the address of the shell code as it will pass as a parameter, and right after the <code>strcpy</code> I examine the stack and the <code>$ebp+8</code> which is the return address has successfully overwritten with the address of the shell code. So I have what I want. But when I stepped forward the execution I got:</p>
  
  <pre><code>-&gt;shellcode_address in ?? ()
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>Cannot find bound of current function
  </code></pre>
  
  <p>The return address has the value that I want. Any ideas what is happening?</p>
  
  <p>Also when I execute it I got a segmentation fault and I have compile it with <code>-g -fno-stack-protector</code>. Why?</p>