lkml.org 
[lkml]   [2023]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [syzbot] [io-uring?] general protection fault in io_uring_show_fdinfo
From
On 9/1/23 11:22 AM, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 99d99825fc07 Merge tag 'nfs-for-6.6-1' of git://git.linux-..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=12e9fc13a80000
> kernel config: https://syzkaller.appspot.com/x/.config?x=cce54b04d9a3d05b
> dashboard link: https://syzkaller.appspot.com/bug?extid=216e2ea6e0bf4a0acdd7
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1749fa10680000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10211c10680000

This should fix it:

diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index 300455b4bc12..c53678875416 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -93,6 +93,8 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
struct io_uring_sqe *sqe;
unsigned int sq_idx;

+ if (ctx->flags & IORING_SETUP_NO_SQARRAY)
+ break;
sq_idx = READ_ONCE(ctx->sq_array[entry & sq_mask]);
if (sq_idx > sq_mask)
continue;
--
Jens Axboe

\
 
 \ /
  Last update: 2023-09-01 21:59    [W:0.047 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site