Re: [Patch net] net/wan: fix a double free in x25_asy_open_tty()

2018-12-30 Thread David Miller
From: Cong Wang Date: Sat, 29 Dec 2018 13:56:37 -0800 > When x25_asy_open() fails, it already cleans up by itself, > so its caller doesn't need to free the memory again. > > It seems we still have to call x25_asy_free() to clear the SLF_INUSE > bit, so just set these pointers to NULL after kfree

[Patch net] net/wan: fix a double free in x25_asy_open_tty()

2018-12-29 Thread Cong Wang
When x25_asy_open() fails, it already cleans up by itself, so its caller doesn't need to free the memory again. It seems we still have to call x25_asy_free() to clear the SLF_INUSE bit, so just set these pointers to NULL after kfree(). Reported-and-tested-by: syzbot+5e5e969e525129229...@syzkaller