Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14091

Re: [PATCH] `bind -x' inside `bind -x' bindings causes execution of random strings

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: [PATCH] `bind -x' inside `bind -x' bindings causes execution of random strings
Date 2018-05-04 15:08 -0400
Message-ID <mailman.13407.1525460903.27995.bug-bash@gnu.org> (permalink)
References <CAFLRLk_S11EzRtgvWN-kXpdts_6rT2bDKUeKBocnxo+WCByNQA@mail.gmail.com>

Show all headers | View raw


On 5/3/18 11:27 AM, Koichi Murase wrote:

> Bash Version: 4.4
> Patch Level: 19
> Release Status: release
> 
> Description:
> 
>   After calls of `bind -x' inside functions called via `bind -x',
> random strings are executed as a command.
> 
>   This happens in the following way: When the binding is overwritten
> using `bind -x' inside the function called through `bind -x' bindings,
> the original string registered for the binding is deallocated although
> it is still under evaluation. Then the memory block will be allocated
> for other purposes and the content will be rewritten. Finally the new
> data written to the memory block is evaluated.

Thanks for the report. This is a good fix.

Chet

-- 
``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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] `bind -x' inside `bind -x' bindings causes execution of random strings Chet Ramey <chet.ramey@case.edu> - 2018-05-04 15:08 -0400

csiph-web