android_kernel_motorola_sm6225/net/x25
Martin Schiller 868f9e509e net/x25: fix nonblocking connect
commit e21dba7a4df4d93da237da65a096084b4f2e87b4 upstream.

This patch fixes 2 issues in x25_connect():

1. It makes absolutely no sense to reset the neighbour and the
connection state after a (successful) nonblocking call of x25_connect.
This prevents any connection from being established, since the response
(call accept) cannot be processed.

2. Any further calls to x25_connect() while a call is pending should
simply return, instead of creating new Call Request (on different
logical channels).

This patch should also fix the "KASAN: null-ptr-deref Write in
x25_connect" and "BUG: unable to handle kernel NULL pointer dereference
in x25_connect" bugs reported by syzbot.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Reported-by: syzbot+429c200ffc8772bfe070@syzkaller.appspotmail.com
Reported-by: syzbot+eec0c87f31a7c3b66f7b@syzkaller.appspotmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-29 16:43:24 +01:00
..
af_x25.c net/x25: fix nonblocking connect 2020-01-29 16:43:24 +01:00
Kconfig x25: remove blank lines at EOF 2018-07-24 14:10:42 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysctl_net_x25.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
x25_dev.c x25: convert printks to pr_<level> 2013-12-09 20:24:18 -05:00
x25_facilities.c net: x25: mark expected switch fall-throughs 2017-10-22 03:08:46 +01:00
x25_forward.c x25: convert printks to pr_<level> 2013-12-09 20:24:18 -05:00
x25_in.c net: x25: mark expected switch fall-throughs 2017-10-22 03:08:46 +01:00
x25_link.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
x25_out.c x25: remove the BKL 2011-03-05 10:55:45 +01:00
x25_proc.c proc: introduce proc_create_seq{,_data} 2018-05-16 07:23:35 +02:00
x25_route.c net, x25: convert x25_route.refcnt from atomic_t to refcount_t 2017-07-04 22:35:18 +01:00
x25_subr.c x25: remove blank lines at EOF 2018-07-24 14:10:42 -07:00
x25_timer.c treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts 2017-11-21 16:35:54 -08:00