linux-stable/net/x25
Hyunwoo Kim 6186abddb2 net/x25: Fix to not accept on connected socket
[ Upstream commit f2b0b5210f ]

When listen() and accept() are called on an x25 socket
that connect() succeeds, accept() succeeds immediately.
This is because x25_connect() queues the skb to
sk->sk_receive_queue, and x25_accept() dequeues it.

This creates a child socket with the sk of the parent
x25 socket, which can cause confusion.

Fix x25_listen() to return -EINVAL if the socket has
already been successfully connect()ed to avoid this issue.

Signed-off-by: Hyunwoo Kim <v4bel@theori.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-22 12:46:02 +01:00
..
af_x25.c net/x25: Fix to not accept on connected socket 2023-02-22 12:46:02 +01:00
Kconfig
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 net/x25: Fix skb leak in x25_lapb_receive_frame() 2022-11-25 17:36:51 +01:00
x25_facilities.c net: fix a kernel infoleak in x25 module 2016-05-09 22:45:33 -04:00
x25_forward.c
x25_in.c
x25_link.c net, x25: convert x25_neigh.refcnt from atomic_t to refcount_t 2017-07-04 22:35:18 +01:00
x25_out.c
x25_proc.c
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 net/x25: Fix null-ptr-deref in x25_disconnect 2020-08-05 10:06:50 +02:00
x25_timer.c