Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-09 Thread Chet Ramey
On 6/7/22 10:17 AM, Gergely wrote: On 6/7/22 15:49, Chet Ramey wrote: On 6/7/22 7:57 AM, Gergely wrote: Because you haven't forced bash to write outside its own address space or corrupt another area on the stack. This is a resource exhaustion issue, no more. I did force it to write out of bou

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-07 Thread Gergely
On 6/7/22 15:49, Chet Ramey wrote: > On 6/7/22 7:57 AM, Gergely wrote: > >>> Because you haven't forced bash to write outside its own address space or >>> corrupt another area on the stack. This is a resource exhaustion issue, >>> no more. >> >> I did force it to write out of bounds, hence the seg

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-07 Thread Chet Ramey
On 6/7/22 7:57 AM, Gergely wrote: >> Because you haven't forced bash to write outside its own address space or >> corrupt another area on the stack. This is a resource exhaustion issue, >> no more. > > > I did force it to write out of bounds, hence the segfault. That's backwards. You got a SIGS

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-07 Thread Gergely
On 6/6/22 16:14, Chet Ramey wrote: > On 6/2/22 4:00 PM, Gergely wrote: > >> I could not produce a scenario in 15 minutes that would indicate that >> this corrupts other sections, as there is a considerable gap between the >> stack and everything else. This is OS-dependent though and bash has no >>

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-06 Thread Chet Ramey
On 6/2/22 4:00 PM, Gergely wrote: I could not produce a scenario in 15 minutes that would indicate that this corrupts other sections, as there is a considerable gap between the stack and everything else. This is OS-dependent though and bash has no control over what happens should this occur. B

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-06 Thread Chet Ramey
On 6/1/22 4:49 PM, Gergely wrote: Hi, I stumbled upon a recursion overflow crash in BASH. It affects both my Debian machine (this report), as well as the latest stable built from source. Yes, you created an infinitely recursive script. It's a race to see whether you exceed your stack or VM re

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-04 Thread Ángel
On 2022-06-02 at 20:00 +, Gergely wrote: > Well, the issue is not the fact that this is a resource exhaustion, > but rather the fact that it's entirely OS-dependent and the > programmer has zero control over it. The programmer could have avoided creating an infinite source file recursion. I d

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-02 Thread Gergely
Hi Martin, >> There's a slim chance this might be exploitable. > I would really be interested in an example. I could not produce a scenario in 15 minutes that would indicate that this corrupts other sections, as there is a considerable gap between the stack and everything else. This is OS-depend

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-01 Thread Martin Schulte
Hi Gergely! > I stumbled upon a recursion overflow crash in BASH. There are many ways to exhaust memory (and other) recources, recursion is one them. In your case a variable like SRCNEST (and all the code with its performance impacts needed behind it) might help, but what exactly is the advant

BASH recursion segfault, FUNCNEST doesn't help

2022-06-01 Thread Gergely
Hi, I stumbled upon a recursion overflow crash in BASH. It affects both my Debian machine (this report), as well as the latest stable built from source. There's a slim chance this might be exploitable. Best, Gergely Kalman Configuration Information [Automatically generated, do not change]: M