in reply to Re^4: Taint and Shellshock
in thread Taint and Shellshock
First problem: HOW does the client set "the environmental variable BAD_VAR" (and assuming the worst, let's use your earlier suggestion that BAD_VAR be set to rm rm -rf /) and where does the script you've shown us access BAD_VAR?
Somehow, that value has to get passed in to the script... not just to the params packaged up by CGI, but from the params to the script. Taint won't allow that except to allow the 'bad' params to be passed to a part of the script that purports to scrub the input; the untaint function. Of course, if the scrubbing is done badly, that's a failure on the programmer's part; not Perl's and not taint's.
Second (or, more of the same): if the script allows rm -rf / to pass an untaint function, the script's author hasn't done an adequate job. The script should have been designed to ensure that outside data conforms to a (reasonably) testable format... and should (with taint's help) block execution, eval or anything else dangerous, if the data doesn't conform.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Taint and Shellshock
by tobyink (Canon) on Sep 28, 2014 at 20:40 UTC | |
by ww (Archbishop) on Sep 29, 2014 at 02:20 UTC | |
by kennethk (Abbot) on Sep 29, 2014 at 17:50 UTC | |
by Corion (Patriarch) on Sep 29, 2014 at 17:58 UTC | |
by kennethk (Abbot) on Sep 29, 2014 at 20:28 UTC | |
|
Re^6: Taint and Shellshock
by kennethk (Abbot) on Sep 28, 2014 at 15:51 UTC |