io_uring/net: don't update msg_name if not provided
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 29 Sep 2022 21:23:18 +0000 (22:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:18 +0000 (12:34 +0200)
commitf9dc33f231531f0e3ae6c0d7c9977b729d9291bd
tree454f5544b2f543ee61d8281a9022a8b1c47cd8da
parenta1bd289c10ac457247aaf9cd674bba1cc60e24a1
io_uring/net: don't update msg_name if not provided

commit 6f10ae8a155446248055c7ddd480ef40139af788 upstream.

io_sendmsg_copy_hdr() may clear msg->msg_name if the userspace didn't
provide it, we should retain NULL in this case.

Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/97d49f61b5ec76d0900df658cfde3aa59ff22121.1664486545.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c