Nice DoS:
{{{ tg@blau:~ $ PS4='$(echo foo) + ' tg@blau:~ $ set -x
^C/bin/mksh: can't fork - try again + echo foo foo + echo foo […] }}}
Solution: disable Flag(XTRACE) while expanding PS4, hard (possibly make Flag(XTRACE) a bitfield).
Nice DoS:
{{{
tg@blau:~ $ PS4='$(echo foo) + '
tg@blau:~ $ set -x
^C/bin/mksh: can't fork - try again
+ echo foo
foo + echo foo
[…]
}}}
Solution: disable Flag(XTRACE) while expanding PS4, hard (possibly make Flag(XTRACE) a bitfield).