Re: [PATCH] net/x25: Fix null-ptr-deref in x25_disconnect

2020-04-28 Thread David Miller
From: YueHaibing Date: Tue, 28 Apr 2020 16:12:08 +0800 > We should check null before do x25_neigh_put in x25_disconnect, > otherwise may cause null-ptr-deref like this: ... > Reported-by: syzbot+6db548b615e5aeefd...@syzkaller.appspotmail.com > Fixes: 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt l

Re: [PATCH] net/x25: Fix null-ptr-deref in x25_disconnect

2020-04-28 Thread Markus Elfring
> We should check null before do x25_neigh_put in x25_disconnect, > otherwise may cause null-ptr-deref like this: Will it be clearer to use the term “null pointer dereference” in the final commit subject? Regards, Markus

[PATCH] net/x25: Fix null-ptr-deref in x25_disconnect

2020-04-28 Thread YueHaibing
We should check null before do x25_neigh_put in x25_disconnect, otherwise may cause null-ptr-deref like this: #include #include int main() { int sck_x25; sck_x25 = socket(AF_X25, SOCK_SEQPACKET, 0); close(sck_x25); return 0; } BUG: kernel NULL pointer dereference, address: