diff options
author | Palash Oswal <[email protected]> | 2021-04-27 18:21:49 +0530 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2021-04-27 07:37:39 -0600 |
commit | 6d042ffb598ed83e7d5623cc961d249def5b9829 (patch) | |
tree | c6b857d10a645b11e5f3c5ebbce5acf227dc64dd /tools/perf/util/trace-event-scripting.c | |
parent | 0b8c0e7c9692cfcfa02c9052d4d53ae67901c400 (diff) |
io_uring: Check current->io_uring in io_uring_cancel_sqpoll
syzkaller identified KASAN: null-ptr-deref Write in
io_uring_cancel_sqpoll.
io_uring_cancel_sqpoll is called by io_sq_thread before calling
io_uring_alloc_task_context. This leads to current->io_uring being NULL.
io_uring_cancel_sqpoll should not have to deal with threads where
current->io_uring is NULL.
In order to cast a wider safety net, perform input sanitisation directly
in io_uring_cancel_sqpoll and return for NULL value of current->io_uring.
This is safe since if current->io_uring isn't set, then there's no way
for the task to have submitted any requests.
Reported-by: [email protected]
Cc: [email protected]
Signed-off-by: Palash Oswal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions