bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash -n: stack overflow in extract_delimited_string()


From: Chet Ramey
Subject: Re: bash -n: stack overflow in extract_delimited_string()
Date: Mon, 3 Aug 2020 09:15:19 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 8/3/20 5:30 AM, Jakub Wilk wrote:

> Bash Version: 5.0
> Patch Level: 18
> Release Status: release
> 
> bash crashes with stack overflow when checking syntax of this crafted script:
> 
>   $ ulimit -s
>   8192
> 
>   $ printf 'x[$(($(fi)))`\n%050000d\n][`]\n' | tr 0 '(' | bash -n
>   bash: command substitution: line 4: syntax error near unexpected token `fi'
>   bash: command substitution: line 4: `fi)))`'
>   Segmentation fault

I can't reproduce this with bash-5.1-alpha.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]