Pavel Begunkov
bcc87d978b
io_uring: fix error pbuf checking
...
Syz reports a problem, which boils down to NULL vs IS_ERR inconsistent
error handling in io_alloc_pbuf_ring().
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
RIP: 0010:__io_remove_buffers+0xac/0x700 io_uring/kbuf.c:341
Call Trace:
<TASK>
io_put_bl io_uring/kbuf.c:378 [inline]
io_destroy_buffers+0x14e/0x490 io_uring/kbuf.c:392
io_ring_ctx_free+0xa00/0x1070 io_uring/io_uring.c:2613
io_ring_exit_work+0x80f/0x8a0 io_uring/io_uring.c:2844
process_one_work kernel/workqueue.c:3231 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Cc: stable@vger.kernel.org
Reported-by: syzbot+2074b1a3d447915c6f1c@syzkaller.appspotmail.com
Fixes: 87585b05757dc ("io_uring/kbuf: use vm_insert_pages() for mmap'ed pbuf ring")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/c5f9df20560bd9830401e8e48abc029e7cfd9f5e.1721329239.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-07-20 11:04:57 -06:00
..
2024-06-16 14:54:55 -06:00
2024-04-15 08:10:25 -06:00
2024-04-15 08:10:26 -06:00
2024-06-13 19:25:28 -06:00
2023-05-26 20:22:41 -06:00
2024-06-16 14:54:55 -06:00
2024-06-16 14:54:55 -06:00
2024-04-15 08:10:26 -06:00
2024-05-08 08:27:45 -06:00
2024-02-08 13:27:03 -07:00
2023-11-20 09:01:42 -07:00
2024-04-15 08:10:25 -06:00
2024-04-15 08:10:25 -06:00
2024-07-15 13:49:10 -07:00
2024-06-24 08:39:45 -06:00
2024-07-11 01:51:44 -06:00
2024-06-16 14:54:55 -06:00
2024-07-20 11:04:57 -06:00
2024-04-22 11:26:01 -06:00
2024-06-16 14:54:55 -06:00
2024-05-29 09:53:14 -06:00
2024-04-15 08:10:26 -06:00
2024-07-01 09:10:59 -06:00
2024-06-24 08:39:55 -06:00
2024-07-10 00:20:52 -06:00
2024-02-09 11:54:32 -07:00
2024-07-16 19:28:34 -07:00
2024-06-19 07:57:21 -06:00
2024-05-10 06:09:45 -06:00
2024-04-30 13:06:27 -06:00
2024-04-22 19:31:18 -06:00
2024-06-19 08:58:00 -06:00
2024-06-19 08:58:00 -06:00
2024-01-23 15:25:14 -07:00
2023-12-12 07:42:57 -07:00
2024-04-15 08:10:25 -06:00
2024-04-15 08:10:25 -06:00
2024-04-15 08:10:26 -06:00
2024-06-19 08:58:00 -06:00
2023-12-19 08:54:20 -07:00
2024-07-15 13:49:10 -07:00
2024-04-15 08:10:26 -06:00
2024-06-20 15:19:17 -06:00
2024-04-15 08:10:25 -06:00
2023-03-09 10:10:58 -07:00
2023-12-12 16:19:59 +01:00
2024-05-21 13:41:14 -06:00
2024-03-01 06:28:19 -07:00
2024-06-05 17:03:57 +02:00
2023-01-29 15:18:26 -07:00
2023-05-16 08:06:00 -06:00
2022-10-07 12:25:30 -06:00
2024-04-15 08:10:27 -06:00
2022-09-21 13:15:01 -06:00
2024-02-09 09:04:39 -07:00
2024-02-09 09:04:39 -07:00
2024-07-20 11:04:56 -06:00
2024-04-15 08:10:25 -06:00
2024-04-15 08:10:24 -06:00
2023-09-21 12:04:45 -06:00
2024-06-05 17:03:57 +02:00