io_uring/net: ensure compat import handlers clear free_iov
authorJens Axboe <axboe@kernel.dk>
Mon, 19 Dec 2022 14:28:26 +0000 (07:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:33:12 +0000 (13:33 +0100)
commitb87006265a1649e96e77f454e7dc47c22333635a
tree5cf9edc97da5753aec018753823924c44a6d562d
parente2c22a38fe299c4ed58aa4606fd435048c662a3a
io_uring/net: ensure compat import handlers clear free_iov

commit 990a4de57e44f4f4cfc33c90d2ec5d285b7c8342 upstream.

If we're not allocating the vectors because the count is below
UIO_FASTIOV, we still do need to properly clear ->free_iov to prevent
an erronous free of on-stack data.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Fixes: 4c17a496a7a0 ("io_uring/net: fix cleanup double free free_iov init")
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/net.c