Re: general protection fault in io_sqe_files_unregister
On 09/01/2021 11:50, Hillf Danton wrote: > Sat, 09 Jan 2021 00:29:16 -0800 >> syzbot found the following issue on: >> >> HEAD commit:71c061d2 Merge tag 'for-5.11-rc2-tag' of git://git.kernel... >> git tree: upstream >> console output: https://syzkaller.appspot.com/x/log.txt?x=17ec3f6750 >> kernel config: https://syzkaller.appspot.com/x/.config?x=8aa30b9da402d224 >> dashboard link: https://syzkaller.appspot.com/bug?extid=9ec0395bc17f2b1e3cc1 >> compiler: gcc (GCC) 10.1.0-syz 20200507 >> >> Unfortunately, I don't have any reproducer for this issue yet. >> >> IMPORTANT: if you fix the issue, please add the following tag to the commit: >> Reported-by: syzbot+9ec0395bc17f2b1e3...@syzkaller.appspotmail.com >> >> general protection fault, probably for non-canonical address >> 0xdc00: [#1] PREEMPT SMP KASAN >> KASAN: null-ptr-deref in range [0x-0x0007] >> CPU: 1 PID: 9107 Comm: syz-executor.2 Not tainted 5.11.0-rc2-syzkaller #0 >> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS >> Google 01/01/2011 >> RIP: 0010:__list_add include/linux/list.h:71 [inline] >> RIP: 0010:list_add_tail include/linux/list.h:100 [inline] >> RIP: 0010:io_sqe_files_set_node fs/io_uring.c:7243 [inline] >> RIP: 0010:io_sqe_files_unregister+0x42a/0x770 fs/io_uring.c:7279 >> Code: 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 07 03 00 00 4c 89 ea 4c 89 >> ad 88 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 >> f4 02 00 00 49 8d 7f 18 48 8d 85 80 00 00 00 48 >> RSP: 0018:c9000982fcf8 EFLAGS: 00010247 >> RAX: dc00 RBX: 88814763fe90 RCX: c9000d28d000 >> RDX: RSI: 81d82695 RDI: 0003 >> RBP: 88814763fe00 R08: 0001 R09: 0001 >> R10: 81d82684 R11: R12: fffc >> R13: 0004 R14: 88814763fe80 R15: fff4 >> FS: 7f6532203700() GS:8880b9f0() knlGS: >> CS: 0010 DS: ES: CR0: 80050033 >> CR2: 20d8 CR3: 14ad5000 CR4: 001506e0 >> DR0: DR1: DR2: >> DR3: DR6: fffe0ff0 DR7: 0400 >> Call Trace: >> __io_uring_register fs/io_uring.c:9916 [inline] >> __do_sys_io_uring_register+0x1185/0x4080 fs/io_uring.c:1 >> do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 >> entry_SYSCALL_64_after_hwframe+0x44/0xa9 >> RIP: 0033:0x45e219 >> Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 >> 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff >> 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 >> RSP: 002b:7f6532202c68 EFLAGS: 0246 ORIG_RAX: 01ab >> RAX: ffda RBX: 0007 RCX: 0045e219 >> RDX: RSI: 0003 RDI: 0003 >> RBP: 7f6532202ca0 R08: R09: >> R10: R11: 0246 R12: >> R13: 016afb5f R14: 7f65322039c0 R15: 0119bf8c >> Modules linked in: >> ---[ end trace 6e4aada9e44ca3d1 ]--- > > Fix typo in 1ffc54220c44 Thanks for the suggestion, but it was already fixed #syz fix: io_uring: Fix return value from alloc_fixed_file_ref_node > > --- a/fs/io_uring.c > +++ b/fs/io_uring.c > @@ -7255,8 +7255,8 @@ static int io_sqe_files_unregister(struc > if (!data) > return -ENXIO; > backup_node = alloc_fixed_file_ref_node(ctx); > - if (!backup_node) > - return -ENOMEM; > + if (IS_ERR(backup_node)) > + return PTR_ERR(backup_node); > > spin_lock_bh(&data->lock); > ref_node = data->node; > -- Pavel Begunkov
general protection fault in io_sqe_files_unregister
Hello, syzbot found the following issue on: HEAD commit:71c061d2 Merge tag 'for-5.11-rc2-tag' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17ec3f6750 kernel config: https://syzkaller.appspot.com/x/.config?x=8aa30b9da402d224 dashboard link: https://syzkaller.appspot.com/bug?extid=9ec0395bc17f2b1e3cc1 compiler: gcc (GCC) 10.1.0-syz 20200507 Unfortunately, I don't have any reproducer for this issue yet. IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+9ec0395bc17f2b1e3...@syzkaller.appspotmail.com general protection fault, probably for non-canonical address 0xdc00: [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x-0x0007] CPU: 1 PID: 9107 Comm: syz-executor.2 Not tainted 5.11.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__list_add include/linux/list.h:71 [inline] RIP: 0010:list_add_tail include/linux/list.h:100 [inline] RIP: 0010:io_sqe_files_set_node fs/io_uring.c:7243 [inline] RIP: 0010:io_sqe_files_unregister+0x42a/0x770 fs/io_uring.c:7279 Code: 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 07 03 00 00 4c 89 ea 4c 89 ad 88 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 f4 02 00 00 49 8d 7f 18 48 8d 85 80 00 00 00 48 RSP: 0018:c9000982fcf8 EFLAGS: 00010247 RAX: dc00 RBX: 88814763fe90 RCX: c9000d28d000 RDX: RSI: 81d82695 RDI: 0003 RBP: 88814763fe00 R08: 0001 R09: 0001 R10: 81d82684 R11: R12: fffc R13: 0004 R14: 88814763fe80 R15: fff4 FS: 7f6532203700() GS:8880b9f0() knlGS: CS: 0010 DS: ES: CR0: 80050033 CR2: 20d8 CR3: 14ad5000 CR4: 001506e0 DR0: DR1: DR2: DR3: DR6: fffe0ff0 DR7: 0400 Call Trace: __io_uring_register fs/io_uring.c:9916 [inline] __do_sys_io_uring_register+0x1185/0x4080 fs/io_uring.c:1 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45e219 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:7f6532202c68 EFLAGS: 0246 ORIG_RAX: 01ab RAX: ffda RBX: 0007 RCX: 0045e219 RDX: RSI: 0003 RDI: 0003 RBP: 7f6532202ca0 R08: R09: R10: R11: 0246 R12: R13: 016afb5f R14: 7f65322039c0 R15: 0119bf8c Modules linked in: ---[ end trace 6e4aada9e44ca3d1 ]--- RIP: 0010:__list_add include/linux/list.h:71 [inline] RIP: 0010:list_add_tail include/linux/list.h:100 [inline] RIP: 0010:io_sqe_files_set_node fs/io_uring.c:7243 [inline] RIP: 0010:io_sqe_files_unregister+0x42a/0x770 fs/io_uring.c:7279 Code: 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 07 03 00 00 4c 89 ea 4c 89 ad 88 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 f4 02 00 00 49 8d 7f 18 48 8d 85 80 00 00 00 48 RSP: 0018:c9000982fcf8 EFLAGS: 00010247 RAX: dc00 RBX: 88814763fe90 RCX: c9000d28d000 RDX: RSI: 81d82695 RDI: 0003 RBP: 88814763fe00 R08: 0001 R09: 0001 R10: 81d82684 R11: R12: fffc R13: 0004 R14: 88814763fe80 R15: fff4 FS: 7f6532203700() GS:8880b9f0() knlGS: CS: 0010 DS: ES: CR0: 80050033 CR2: 20d8 CR3: 14ad5000 CR4: 001506e0 DR0: DR1: DR2: DR3: DR6: fffe0ff0 DR7: 0400 --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkal...@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot.