expand_prompt_string segmentation faults

2018-09-14 Thread Eduardo A . Bustamante López
Found the following two cases by fuzzing with AFL: # Case #1: array_expand_index bash <<'EOF' x='${p[--b[?]]'; echo ${x@P} EOF # Case #1 backtrace : <<'EOF' Program received signal SIGSEGV, Segmentation fault. 0x0080e0d3 in __strchr_sse2 () #0 0x0080e0d3 in __strchr_sse2 () #1 0

Re: error message for missing fi is not helpful

2018-09-14 Thread Manuel Reiter
On 13.09.2018 04:29, L A Walsh wrote: This isn't *exactly* what you wanted, but this gives the line number of the last unmatched statement (but doesn't tell you what the statement was).  The diff was against bash-4.4.23 (4.4 base w/23 patches) Thank you for taking the time to look into this! Th

Re: error message for missing fi is not helpful

2018-09-14 Thread L A Walsh
On 9/13/2018 1:21 PM, Chet Ramey wrote: I'm sure you noticed that word_lineno isn't set for every compound command and that it's limited. Actually I didn't notice. Under what circumstances is it not set? What is it's purpose if it's not to keep track of a stack of nested conditio

compgen -W evaluation is leading to security holes

2018-09-14 Thread joey
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKA