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

From: David Miller
Date: Tue Apr 28 2020 - 17:11:15 EST


From: YueHaibing <yuehaibing@xxxxxxxxxx>
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+6db548b615e5aeefdce2@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>

Applied.