Re: fork1 use-after-free of the child process

2017-09-08 Thread Kamil Rytarowski
On 08.09.2017 04:32, Mateusz Guzik wrote: > The fork1 routine can wait for the child to exit (if vforked) and/or > return the pointer to the child. > > Neither case guarantees the safety of said operation. The key is that > the parent can be ignoring SIGCHLD, which results in autoreaping the >

fork1 use-after-free of the child process

2017-09-08 Thread Mateusz Guzik
The fork1 routine can wait for the child to exit (if vforked) and/or return the pointer to the child. Neither case guarantees the safety of said operation. The key is that the parent can be ignoring SIGCHLD, which results in autoreaping the child and the child itself is made runnable. Thus in