Re: [PATCH 1/2] BUG/MINOR: mworker: Prevent potential use-after-free in mworker_env_to_proc_list

2019-05-14 Thread Tim Düsterhus
William,

Am 14.05.19 um 11:40 schrieb William Lallemand:
> Sorry, I'm only reading this mail and I already fixed this one in the master!
> 

All good, at least it's fixed. Take a look at the other patch (the
memory leak), though!

Best regards
Tim Düsterhus



Re: [PATCH 1/2] BUG/MINOR: mworker: Prevent potential use-after-free in mworker_env_to_proc_list

2019-05-14 Thread William Lallemand
Hi Tim,

On Mon, May 13, 2019 at 02:37:24PM +0200, Tim Duesterhus wrote:
> This was found by reading the code while investigating issue #96 and not
> verified with any tools:
> 
> If `child->pid` is falsy `child` will be freed instead of being added to
> `proc_list`. The setting of `PROC_O_LEAVING` happens unconditionally after
> this check.
> 
> Fix the issue by mising the setting of the LEAVING option right behind the
> allocation of `child`.
> 
> This bug was introduced in 4528611ed66d8bfa344782f6c7f1e7151cf48bf5, which
> is specific to the 2.0-dev branch. No backport required.
 
Sorry, I'm only reading this mail and I already fixed this one in the master!

-- 
William Lallemand