On 3/20/12 2:17 PM, Stephane Chazelas wrote:
> 2012-03-20 16:47:51 +0000, Eamonn Smyth:
>> Without sounding alarmist, I can break my machine using bash. I also have a
>> fix. I shall be officially releasing the c code this weekend at the
>> hackathon london.
> [...]
>
> A DOS vector often found is bash *scripts* is when a script
> takes user input in a variable and that variable is left
> unquoted upon expansion in list contexts.
The most common attack vector, based on the number of times it has been
rediscovered, is infinite recursion:
f()
{
f | f &
}
while :; do f ; done
or the even simpler
f()
{
f | f &
}
f
both variants of the classic `fork bomb'. The first will probably do your
machine in quicker.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/