diff options
author | 2020-02-19 00:19:09 +0300 | |
---|---|---|
committer | 2020-02-18 17:12:23 -0700 | |
commit | 929a3af90f0f4bd7132d83552c1a98c83f60ef7e (patch) | |
tree | 0d485e68f97162440e341abbafc3aa268b7fcd0b /lib/test_overflow.c | |
parent | io_uring: remove unnecessary NULL checks (diff) | |
download | wireguard-linux-929a3af90f0f4bd7132d83552c1a98c83f60ef7e.tar.xz wireguard-linux-929a3af90f0f4bd7132d83552c1a98c83f60ef7e.zip |
io_uring: fix use-after-free by io_cleanup_req()
io_cleanup_req() should be called before req->io is freed, and so
shouldn't be after __io_free_req() -> __io_req_aux_free(). Also,
it will be ignored for in io_free_req_many(), which use
__io_req_aux_free().
Place cleanup_req() into __io_req_aux_free().
Fixes: 99bc4c38537d774 ("io_uring: fix iovec leaks")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions