io_uring: fix leaking uid in files registration
PATCH 1/1 io_uring: fix leaking uid in files registration
When there are no files for __io_sqe_files_scm() to process in the range, it'll free everything and return. However, it forgets to put uid.
Fixes 08a451739a9b5 ("io_uring: allow sparse fixed file sets")
Signed-off-by Pavel Begunkov <[email protected]>
--- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)
fs/io_uring.c +1 -0
@@ -8834,6 +8834,7 @@ static int __io_sqe_files_scm(struct io_ring_ctx *ctx, int nr, int offset)fput (fpl->fp[i]); }else {kfree_skb (skb); +free_uid (fpl->user);kfree (fpl); }
Signature · 1 line
2.35.1
Quoted 4 lines · Pavel Begunkov
When there are no files for
__io_sqe_files_scm()to process in the range, it'll free everything and return. However, it forgets to put uid.
Applied, thanks!
[1/1] io_uring: fix leaking uid in files registration
commit: c86d18f4aa93e0e66cda0e55827cd03eea6bc5f8
Best regards,
Signature · 1 line
Jens Axboe