title: Why can the execve system call run "/bin/sh" without any argv arguments, but not "/bin/ls"?
body: <p>I am confused with the syscall of <code>__NR_execve</code>. When I learn linux system call. The correct way that I know to use <code>execve</code> is like this:</p>
  
  <pre><code>char *sc[2]; 
  sc[0]="/bin/sh"; 
  sc[1]= NULL; 
  execve(sc[0],sc,NULL); 
  </code></pre>
  
  <p>Then the function <code>execve</code> will call <code>syscall()</code> to get into system kernel with putting the arguments on Registers <code>EAX</code>, <code>EBX</code>, <code>ECX</code> and <code>EDX</code>. However, It still succeed if I use </p>
  
  <pre><code>execve("/bin/sh",NULL,NULL);
  </code></pre>
  
  <p>But if I replace <code>"/bin/sh"</code> with <code>"/bin/ls"</code>，it fail with:</p>
  
  <pre><code>A NULL argv[0] was passed through an exec system call.
  </code></pre>
  
  <p>I wonder why <code>"/bin/sh"</code> can be executed successfully without enough parameters while <code>"/bin/ls"</code> fail?</p>