Re:Everything you need to know about the Shellshock Bash bug
by rbh42 on Thursday September 25, 2014 @03:14PM
(#8369101)
From "man perlfunc" unser "system":
If there is only one scalar argument, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system's command shell for parsing (this is "/bin/sh -c" on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly to "execvp", which is more efficient.
Re:Everything you need to know about the Shellshock Bash bug
by candl on Thursday September 25, 2014 @03:28PM
(#8369192)
Passing a shell metacharacter to the system function does indeed then trigger the vurnerability. Thanks as I didn't realize it wasn't calling the shell otherwise.
If there is only one scalar argument, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system's command shell for parsing (this is "/bin/sh -c" on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly to "execvp", which is more efficient.
So your example does not invoke the shell.