Pavel Begunkov 18824f592a io_uring/af_unix: disable sending io_uring over sockets
commit 705318a99a138c29a512a72c3e0043b3cd7f55f4 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: 0091bfc81741b ("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:18:16 +01:00
..
2023-12-08 08:44:27 +01:00
2021-09-22 12:26:25 +02:00
2023-11-28 16:50:15 +00:00
2022-06-14 18:11:36 +02:00
2023-09-23 10:59:56 +02:00
2023-02-22 12:50:35 +01:00
2023-09-23 11:00:06 +02:00
2022-06-14 18:11:41 +02:00
2020-10-01 13:17:19 +02:00
2023-01-18 11:41:44 +01:00