android_kernel_oneplus_msm8998/net/l2tp
Guillaume Nault 196f4755cc l2tp: check ps->sock before running pppol2tp_session_ioctl()
[ Upstream commit 5903f594935a3841137c86b9d5b75143a5b7121c ]

When pppol2tp_session_ioctl() is called by pppol2tp_tunnel_ioctl(),
the session may be unconnected. That is, it was created by
pppol2tp_session_create() and hasn't been connected with
pppol2tp_connect(). In this case, ps->sock is NULL, so we need to check
for this case in order to avoid dereferencing a NULL pointer.

Fixes: 309795f4be ("l2tp: Add netlink control API for L2TP")
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-18 11:11:05 +01:00
..
Kconfig l2tp: Call udp_sock_create 2014-07-14 16:12:15 -07:00
l2tp_core.c l2tp: fix race condition in l2tp_tunnel_delete 2017-10-21 17:09:03 +02:00
l2tp_core.h l2tp: fix race condition in l2tp_tunnel_delete 2017-10-21 17:09:03 +02:00
l2tp_debugfs.c l2tp: take reference on sessions being dumped 2017-05-02 21:19:52 -07:00
l2tp_eth.c l2tp: auto load type modules 2015-09-25 12:27:22 -07:00
l2tp_ip.c l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv 2017-03-22 12:04:14 +01:00
l2tp_ip6.c l2tp: do not use udp_ioctl() 2017-02-18 16:39:28 +01:00
l2tp_netlink.c l2tp: take reference on sessions being dumped 2017-05-02 21:19:52 -07:00
l2tp_ppp.c l2tp: check ps->sock before running pppol2tp_session_ioctl() 2017-11-18 11:11:05 +01:00
Makefile l2tp: introduce L2TPv3 IP encapsulation support for IPv6 2012-05-01 09:30:55 -04:00