Re: pty: fix use after free/oops at pty_unix98_shutdown

2015-12-15 Thread Herton R. Krzesinski
On Tue, Dec 15, 2015 at 09:28:28AM -0800, Peter Hurley wrote: > On 12/15/2015 08:36 AM, Herton R. Krzesinski wrote: > > On Tue, Dec 15, 2015 at 08:17:56AM -0800, Peter Hurley wrote: > >>> I also expect in a rare case where all ptmx references are gone/closed, > >>> this also > >>> could happen on

Re: pty: fix use after free/oops at pty_unix98_shutdown

2015-12-15 Thread Peter Hurley
On 12/15/2015 08:36 AM, Herton R. Krzesinski wrote: > On Tue, Dec 15, 2015 at 08:17:56AM -0800, Peter Hurley wrote: >>> I also expect in a rare case where all ptmx references are gone/closed, >>> this also >>> could happen on final close when the master tty is given to >>> pty_unix98_shutdown. >>

Re: pty: fix use after free/oops at pty_unix98_shutdown

2015-12-15 Thread Herton R. Krzesinski
On Tue, Dec 15, 2015 at 08:17:56AM -0800, Peter Hurley wrote: > > I also expect in a rare case where all ptmx references are gone/closed, > > this also > > could happen on final close when the master tty is given to > > pty_unix98_shutdown. > > This logic I'm not following. If the pty master is

Re: pty: fix use after free/oops at pty_unix98_shutdown

2015-12-15 Thread Peter Hurley
Hi Herton, On 12/14/2015 07:29 PM, Herton R. Krzesinski wrote: > Hi, > > recently I got a report of a crash at pty_unix98_shutdown. after analyzing the > issue, I managed to create a small reproducer: > > $ cat test.sh > #!/bin/sh > > while true; do > find /sys > ./dopty >

pty: fix use after free/oops at pty_unix98_shutdown

2015-12-14 Thread Herton R. Krzesinski
Hi, recently I got a report of a crash at pty_unix98_shutdown. after analyzing the issue, I managed to create a small reproducer: $ cat test.sh #!/bin/sh while true; do find /sys ./dopty echo 2 > /proc/sys/vm/drop_caches ps aux sleep 40 done $ cat dopty.c