Commit 447c19f
io_uring: fix ltout double free on completion race
Always remove linked timeout on io_link_timeout_fn() from the master
request link list, otherwise we may get use-after-free when first
io_link_timeout_fn() puts linked timeout in the fail path, and then
will be found and put on master's free.
Cc: stable@vger.kernel.org # 5.10+
Fixes: 90cd7e4 ("io_uring: track link timeout's master explicitly")
Reported-and-tested-by: syzbot+5a864149dd970b546223@syzkaller.appspotmail.com
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/69c46bf6ce37fec4fdcd98f0882e18eb07ce693a.1620990121.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent a298232 commit 447c19f
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6354 | 6354 | | |
6355 | 6355 | | |
6356 | 6356 | | |
6357 | | - | |
| 6357 | + | |
6358 | 6358 | | |
6359 | | - | |
6360 | | - | |
| 6359 | + | |
| 6360 | + | |
| 6361 | + | |
6361 | 6362 | | |
6362 | 6363 | | |
6363 | 6364 | | |
| |||
0 commit comments