Commit 929a3af
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: 99bc4c3 ("io_uring: fix iovec leaks")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 297a31e commit 929a3af
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1260 | 1260 | | |
1261 | 1261 | | |
1262 | 1262 | | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1263 | 1266 | | |
1264 | 1267 | | |
1265 | 1268 | | |
| |||
1275 | 1278 | | |
1276 | 1279 | | |
1277 | 1280 | | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
| |||
0 commit comments