Skip to content

Commit 990a4de

Browse files
committed
io_uring/net: ensure compat import handlers clear free_iov
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 <[email protected]> Fixes: 4c17a49 ("io_uring/net: fix cleanup double free free_iov init") Cc: [email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 35d90f9 commit 990a4de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

io_uring/net.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ static int __io_compat_recvmsg_copy_hdr(struct io_kiocb *req,
494494
if (req->flags & REQ_F_BUFFER_SELECT) {
495495
compat_ssize_t clen;
496496

497+
iomsg->free_iov = NULL;
497498
if (msg.msg_iovlen == 0) {
498499
sr->len = 0;
499500
} else if (msg.msg_iovlen > 1) {

0 commit comments

Comments
 (0)