A few issues inspired by the coproc proposal in this thread:
http://lists.gnu.org/archive/html/bug-bash/2016-04/msg00050.html
1. coproc unsets readonly NAME after the process completes
$ declare -p UID; coproc UID { :; }; wait; declare -p UID
declare -ir UID="501"
bash: UID: readonly variable
bas
On 21 Apr 2016, at 09:36, Grisha Levit wrote:
> A few issues inspired by the coproc proposal in this thread:
> http://lists.gnu.org/archive/html/bug-bash/2016-04/msg00050.html
>
> 1. coproc unsets readonly NAME after the process completes [..]
> 2. Segfault if NAME is an existing associative ar
Hi
For the record it does not work with "fake" exported functions. I was scared
this could be really bad be so I've tested this case :
Here is inject.py
#!/usr/bin/python -tt
import os
os.putenv('BASH_FUNC_foo%%', '''() { avg=0;
avg=((avg+6));
echo -n "This function was never called. Bash versio
On 4/21/16 12:36 AM, Grisha Levit wrote:
> A few issues inspired by the coproc proposal in this
> thread: http://lists.gnu.org/archive/html/bug-bash/2016-04/msg00050.html
>
> 1. coproc unsets readonly NAME after the process completes
Yes. This is a gray area. Under some circumstances, e.g, geto
f() { COMPREPLY=(aa bb cc); }
complete -F f f
bind 'set completion-prefix-display-length 2'
$ f [TAB][TAB]
...aa ...bb ...cc
None of the completion entries share a common prefix, though the docs
suggest that only common prefixes a
On Thu, Apr 21, 2016 at 1:22 PM, Chet Ramey wrote:
>
> > 1. coproc unsets readonly NAME after the process completes
>
> Yes. This is a gray area. Under some circumstances, e.g, getopts with
> OPTARG, defined shell behavior can override a readonly setting.
Probably should at least disallow this
$ echo ${BASH_CMDS@a}; compgen -A arrayvar BASH_CMDS; echo $?
A
1
The description doesn't specify that the output is limited to indexed
arrays only and it would be nice to have associative array variables
included as well.
I had a recent use case for this when adding array index completion to
bas
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-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -D
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
Basically, after doing a bunch of unset -f, I can crash Bash, version GNU
bash, version 4.3.42(1)-release (x86_64-apple-darwin15.0.0), which could
possibly be an attack vector. Here's the info from /var/log/system.log
Apr 21 15:45:00 NikolayKolev-mac iTerm2[87962]:
ReceiveMessageAndFileDescriptor
10 matches
Mail list logo