I'm re-adding the list. On Wed, Feb 15, 2017 at 4:34 PM, kkk K <3n4t...@gmail.com> wrote:
> What If I find a bug bypassing the FUNCNEST limitation ? > I mean I found a bug which about some paser logic in bash, > finially It will crash bash, And FUNCNEST cannot stop it from crashing > bash. > > I think you should feel free to submit your bug report, since the number of reports is low, false reports are not a problem and you may have a genuine bug. > 2017-02-15 21:01 GMT+08:00 Pierre Gaston <pierre.gas...@gmail.com>: > >> >> >> On Wed, Feb 15, 2017 at 11:44 AM, kkk K <3n4t...@gmail.com> wrote: >> >>> for example, >>> simple bash recur function call: >>> >>> ====================== >>> #!/bin/bash >>> >>> function test() >>> { >>> test $1 >>> } >>> >>> test 1 >>> ====================== >>> >>> sincerely for your reply >>> >>> >> bash has a special variable FUNCNEST to limit the recursion if you want >> to prevent infinite recursion. >> >> However, this subject has been discussed multiple times, it's easy to >> write arbitrary code that crashes bash (not to mention the whole machine). >> This doesn't necessarily mean that there is a bug in bash, but in your >> code. >> >> If you can run arbitrary code in a shell (or even if your script doesn't >> validate its input), your security is already compromised. >> >> >> >