linux/net/core
Pavel Begunkov f2f57f51b5 io_uring/af_unix: disable sending io_uring over sockets
commit 705318a99a upstream.

File reference cycles have caused lots of problems for io_uring
in the past, and it still doesn't work exactly right and races with
unix_stream_read_generic(). The safest fix would be to completely
disallow sending io_uring files via sockets via SCM_RIGHT, so there
are no possible cycles invloving registered files and thus rendering
SCM accounting on the io_uring side unnecessary.

Cc:  <stable@vger.kernel.org>
Fixes: 0091bfc817 ("io_uring/af_unix: defer registered files gc to io_uring release")
Reported-and-suggested-by: Jann Horn <jannh@google.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/c716c88321939156909cfa1bd8b0faaf1c804103.1701868795.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-13 18:39:17 +01:00
..
bpf_sk_storage.c
datagram.c
dev_addr_lists_test.c
dev_addr_lists.c
dev_ioctl.c
dev.c net: move altnames together with the netdevice 2023-10-25 12:03:16 +02:00
dev.h net: check for altname conflicts when changing netdev's netns 2023-10-25 12:03:08 +02:00
drop_monitor.c drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group 2023-12-13 18:39:12 +01:00
dst_cache.c
dst.c
failover.c
fib_notifier.c
fib_rules.c
filter.c bpf: sockmap, updating the sg structure should also update curr 2023-12-13 18:39:11 +01:00
flow_dissector.c
flow_offload.c
gen_estimator.c
gen_stats.c
gro_cells.c
gro.c
hwbm.c
link_watch.c
lwt_bpf.c
lwtunnel.c
Makefile
neighbour.c neighbour: fix various data-races 2023-11-02 09:35:27 +01:00
net_namespace.c
net-procfs.c
net-sysfs.c
net-sysfs.h
net-traces.c
netclassid_cgroup.c
netevent.c
netpoll.c
netprio_cgroup.c
of_net.c
page_pool.c net: page_pool: add missing free_percpu when page_pool_init fail 2023-11-20 11:52:16 +01:00
pktgen.c net: pktgen: Fix interface flags printing 2023-10-25 12:03:08 +02:00
ptp_classifier.c
request_sock.c
rtnetlink.c netlink: Correct offload_xstats size 2023-10-25 12:03:07 +02:00
scm.c io_uring/af_unix: disable sending io_uring over sockets 2023-12-13 18:39:17 +01:00
secure_seq.c
selftests.c
skbuff.c net: skb_find_text: Ignore patterns extending past 'to' 2023-11-20 11:51:54 +01:00
skmsg.c
sock_destructor.h
sock_diag.c
sock_map.c
sock_reuseport.c
sock.c net: annotate data-races around sk->sk_dst_pending_confirm 2023-11-28 17:06:56 +00:00
stream.c tcp: allow again tcp_disconnect() when threads are waiting 2023-10-25 12:03:12 +02:00
sysctl_net_core.c
timestamping.c
tso.c
utils.c
xdp.c