Skip to content
Commit cac9e441 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/net: save msghdr->msg_control for retries

If the application sets ->msg_control and we have to later retry this
command, or if it got queued with IOSQE_ASYNC to begin with, then we
need to retain the original msg_control value. This is due to the net
stack overwriting this field with an in-kernel pointer, to copy it
in. Hitting that path for the second time will now fail the copy from
user, as it's attempting to copy from a non-user address.

Cc: stable@vger.kernel.org # 5.10+
Link: https://github.com/axboe/liburing/issues/880


Reported-and-tested-by: default avatarMarek Majkowski <marek@cloudflare.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b6dad517
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment