title: Buffer overflow doesn't run
body: <p>I try an basic buffer overflow, i overwrite the saved EIP on the stack an jump on to the adress. This adress point to à shell variable who containt my shellcode.</p>
  
  <p>But on gdb, program sigserv on the first nop on the nopslide.</p>
  
  <p>I lauch th program like this command:</p>
  
  <pre><code>gdb-peda$ r $(python -c 'print "A"*22 + "\x5f\xb8\xff\xff"')
  </code></pre>
  
  <p>I have this trace:</p>
  
  <pre><code>[----------------------------------registers-----------------------------------]
  EAX: 0x1a 
  EBX: 0xf7fc3ff4 --&gt; 0x15dd7c 
  ECX: 0xffffaf38 --&gt; 0xf7fc44e0 --&gt; 0xfbad2a84 
  EDX: 0xf7fc5360 --&gt; 0x0 
  ESI: 0x0 
  EDI: 0x0 
  EBP: 0x41414141 ('AAAA')
  ESP: 0xffffaf80 --&gt; 0xffffb100 --&gt; 0xc ('\x0c')
  EIP: 0xffffb85f --&gt; 0x90909090
  EFLAGS: 0x10296 (carry PARITY ADJUST zero SIGN trap INTERRUPT direction overflow)
  [-------------------------------------code-------------------------------------]
     0xffffb85c:  nop
     0xffffb85d:  nop
     0xffffb85e:  nop
  =&gt; 0xffffb85f:  nop
     0xffffb860:  nop
     0xffffb861:  nop
     0xffffb862:  nop
     0xffffb863:  nop
  [------------------------------------stack-------------------------------------]
  0000| 0xffffaf80 --&gt; 0xffffb100 --&gt; 0xc ('\x0c')
  0004| 0xffffaf84 --&gt; 0xf7fef060 (push   ebp)
  0008| 0xffffaf88 --&gt; 0x80484bb (&lt;__libc_csu_init+11&gt;:   add    ebx,0x1219)
  0012| 0xffffaf8c --&gt; 0xf7fc3ff4 --&gt; 0x15dd7c 
  0016| 0xffffaf90 --&gt; 0x80484b0 (&lt;__libc_csu_init&gt;:  push   ebp)
  0020| 0xffffaf94 --&gt; 0x0 
  0024| 0xffffaf98 --&gt; 0xffffb018 --&gt; 0x0 
  0028| 0xffffaf9c --&gt; 0xf7e7ce46 (&lt;__libc_start_main+230&gt;:   mov    DWORD PTR [esp],eax)
  [------------------------------------------------------------------------------]
  Legend: code, data, rodata, value
  Stopped reason: SIGSEGV
  0xffffb85f in ?? ()
  gdb-peda$ x/i $eip
  =&gt; 0xffffb85f:  nop
  </code></pre>
  
  <p>I run on debian wheezy, gcc version is gcc (Debian 4.7.2-4) 4.7.2, gdb version 7.4.1-debian.</p>
  
  <p>Is an new protection on this gcc version? Or other think?</p>
  
  <p>Thanks you. (Sorry for my english :))</p>