io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] general protection fault in __io_file_supports_nowait
@ 2021-08-31 22:05 syzbot
  2021-09-01  2:00 ` syzbot
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: syzbot @ 2021-08-31 22:05 UTC (permalink / raw)
  To: asml.silence, axboe, io-uring, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    9c849ce86e0f Merge tag '5.15-rc-smb3-fixes-part1' of git:/..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16eead75300000
kernel config:  https://syzkaller.appspot.com/x/.config?x=bf588afb178273fb
dashboard link: https://syzkaller.appspot.com/bug?extid=e51249708aaa9b0e4d2c
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1

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+e51249708aaa9b0e4d2c@syzkaller.appspotmail.com

general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
CPU: 1 PID: 13658 Comm: syz-executor.1 Not tainted 5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:file_inode include/linux/fs.h:1344 [inline]
RIP: 0010:__io_file_supports_nowait+0x26/0x500 fs/io_uring.c:2785
Code: 00 00 00 00 41 55 41 54 41 89 f4 55 48 89 fd 53 e8 6f 61 96 ff 48 8d 7d 20 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 2d 04 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc90003247948 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000008 RCX: ffffc9000b8c4000
RDX: 0000000000000004 RSI: ffffffff81dfb791 RDI: 0000000000000020
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffc90003247a00
R10: ffffffff81e293dc R11: 0000000000000001 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000001
FS:  00007fd0a23d1700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000014a53ad CR3: 000000002ebbe000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 io_file_supports_nowait fs/io_uring.c:2823 [inline]
 io_file_supports_nowait fs/io_uring.c:2816 [inline]
 io_write+0x4cf/0xed0 fs/io_uring.c:3545
 io_issue_sqe+0x289/0x6ba0 fs/io_uring.c:6563
 __io_queue_sqe+0x90/0xb50 fs/io_uring.c:6864
 io_req_task_submit+0xbf/0x1b0 fs/io_uring.c:2218
 tctx_task_work+0x166/0x610 fs/io_uring.c:2143
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 tracehook_notify_signal include/linux/tracehook.h:212 [inline]
 handle_signal_work kernel/entry/common.c:146 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x256/0x290 kernel/entry/common.c:209
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd0a23d1188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa
RAX: 0000000000000200 RBX: 000000000056bf80 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 00000000000045f5 RDI: 0000000000000004
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80
R13: 0000000000a9fb1f R14: 00007fd0a23d1300 R15: 0000000000022000
Modules linked in:
---[ end trace 2fda19a8d1802890 ]---
RIP: 0010:file_inode include/linux/fs.h:1344 [inline]
RIP: 0010:__io_file_supports_nowait+0x26/0x500 fs/io_uring.c:2785
Code: 00 00 00 00 41 55 41 54 41 89 f4 55 48 89 fd 53 e8 6f 61 96 ff 48 8d 7d 20 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 2d 04 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc90003247948 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000008 RCX: ffffc9000b8c4000
RDX: 0000000000000004 RSI: ffffffff81dfb791 RDI: 0000000000000020
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffc90003247a00
R10: ffffffff81e293dc R11: 0000000000000001 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000001
FS:  00007fd0a23d1700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000512630 CR3: 000000002ebbe000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	41 55                	push   %r13
   6:	41 54                	push   %r12
   8:	41 89 f4             	mov    %esi,%r12d
   b:	55                   	push   %rbp
   c:	48 89 fd             	mov    %rdi,%rbp
   f:	53                   	push   %rbx
  10:	e8 6f 61 96 ff       	callq  0xff966184
  15:	48 8d 7d 20          	lea    0x20(%rbp),%rdi
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 2d 04 00 00    	jne    0x461
  34:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  3b:	fc ff df
  3e:	4c                   	rex.WR
  3f:	8b                   	.byte 0x8b


---
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 syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] general protection fault in __io_file_supports_nowait
  2021-08-31 22:05 [syzbot] general protection fault in __io_file_supports_nowait syzbot
@ 2021-09-01  2:00 ` syzbot
  2021-09-01  2:08   ` Jens Axboe
  2021-09-01  6:41 ` syzbot
  2021-10-06 17:54 ` syzbot
  2 siblings, 1 reply; 7+ messages in thread
From: syzbot @ 2021-09-01  2:00 UTC (permalink / raw)
  To: asml.silence, axboe, io-uring, linux-kernel, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    b91db6a0b52e Merge tag 'for-5.15/io_uring-vfs-2021-08-30' ..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12718683300000
kernel config:  https://syzkaller.appspot.com/x/.config?x=210537ff2ddcc232
dashboard link: https://syzkaller.appspot.com/bug?extid=e51249708aaa9b0e4d2c
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12615c35300000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16c57845300000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e51249708aaa9b0e4d2c@syzkaller.appspotmail.com

general protection fault, probably for non-canonical address 0xdffffc0000000004: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000020-0x0000000000000027]
CPU: 0 PID: 13214 Comm: iou-sqp-13213 Not tainted 5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:file_inode include/linux/fs.h:1344 [inline]
RIP: 0010:__io_file_supports_nowait+0x26/0x500 fs/io_uring.c:2785
Code: 00 00 00 00 41 55 41 54 41 89 f4 55 48 89 fd 53 e8 6f 61 96 ff 48 8d 7d 20 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 2d 04 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc9000305f800 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000004 RSI: ffffffff81dfb791 RDI: 0000000000000020
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff81e28292 R11: 0000000000000001 R12: 0000000000000000
R13: ffffc9000305f8d8 R14: 0000000000000000 R15: 0000000000000001
FS:  00007fa1a4652700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000084 CR3: 0000000027153000 CR4: 0000000000350ef0
Call Trace:
 io_file_supports_nowait fs/io_uring.c:2823 [inline]
 io_file_supports_nowait fs/io_uring.c:2816 [inline]
 io_read+0x4a9/0x1140 fs/io_uring.c:3440
 io_issue_sqe+0x209/0x6ba0 fs/io_uring.c:6558
 __io_queue_sqe+0x90/0xb50 fs/io_uring.c:6864
 io_req_task_submit+0xbf/0x1b0 fs/io_uring.c:2218
 tctx_task_work+0x166/0x610 fs/io_uring.c:2143
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 tracehook_notify_signal include/linux/tracehook.h:212 [inline]
 io_run_task_work fs/io_uring.c:2403 [inline]
 io_run_task_work fs/io_uring.c:2399 [inline]
 io_sq_thread+0x867/0x1370 fs/io_uring.c:7337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Modules linked in:
---[ end trace f12dea0e85a314d8 ]---
RIP: 0010:file_inode include/linux/fs.h:1344 [inline]
RIP: 0010:__io_file_supports_nowait+0x26/0x500 fs/io_uring.c:2785
Code: 00 00 00 00 41 55 41 54 41 89 f4 55 48 89 fd 53 e8 6f 61 96 ff 48 8d 7d 20 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 2d 04 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffffc9000305f800 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000004 RSI: ffffffff81dfb791 RDI: 0000000000000020
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff81e28292 R11: 0000000000000001 R12: 0000000000000000
R13: ffffc9000305f8d8 R14: 0000000000000000 R15: 0000000000000001
FS:  00007fa1a4652700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7e4803c008 CR3: 0000000027153000 CR4: 0000000000350ee0
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	41 55                	push   %r13
   6:	41 54                	push   %r12
   8:	41 89 f4             	mov    %esi,%r12d
   b:	55                   	push   %rbp
   c:	48 89 fd             	mov    %rdi,%rbp
   f:	53                   	push   %rbx
  10:	e8 6f 61 96 ff       	callq  0xff966184
  15:	48 8d 7d 20          	lea    0x20(%rbp),%rdi
  19:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  20:	fc ff df
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 2d 04 00 00    	jne    0x461
  34:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  3b:	fc ff df
  3e:	4c                   	rex.WR
  3f:	8b                   	.byte 0x8b


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] general protection fault in __io_file_supports_nowait
  2021-09-01  2:00 ` syzbot
@ 2021-09-01  2:08   ` Jens Axboe
  2021-09-01  3:34     ` syzbot
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2021-09-01  2:08 UTC (permalink / raw)
  To: syzbot, asml.silence, io-uring, linux-kernel, syzkaller-bugs

On 8/31/21 8:00 PM, syzbot wrote:
> syzbot has found a reproducer for the following issue on:
> 
> HEAD commit:    b91db6a0b52e Merge tag 'for-5.15/io_uring-vfs-2021-08-30' ..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=12718683300000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=210537ff2ddcc232
> dashboard link: https://syzkaller.appspot.com/bug?extid=e51249708aaa9b0e4d2c
> compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=12615c35300000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16c57845300000

#syz test git://git.kernel.dk/linux-block for-5.15/io_uring

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] general protection fault in __io_file_supports_nowait
  2021-09-01  2:08   ` Jens Axboe
@ 2021-09-01  3:34     ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2021-09-01  3:34 UTC (permalink / raw)
  To: asml.silence, axboe, io-uring, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+e51249708aaa9b0e4d2c@syzkaller.appspotmail.com

Tested on:

commit:         a64296d7 io-wq: split bounded and unbounded work into ..
git tree:       git://git.kernel.dk/linux-block for-5.15/io_uring
kernel config:  https://syzkaller.appspot.com/x/.config?x=765eea9a273a8879
dashboard link: https://syzkaller.appspot.com/bug?extid=e51249708aaa9b0e4d2c
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] general protection fault in __io_file_supports_nowait
  2021-08-31 22:05 [syzbot] general protection fault in __io_file_supports_nowait syzbot
  2021-09-01  2:00 ` syzbot
@ 2021-09-01  6:41 ` syzbot
  2021-10-06 17:54 ` syzbot
  2 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2021-09-01  6:41 UTC (permalink / raw)
  To: asml.silence, axboe, haoxu, io-uring, linux-kernel, syzkaller-bugs

syzbot has bisected this issue to:

commit a8295b982c46d4a7c259a4cdd58a2681929068a9
Author: Hao Xu <haoxu@linux.alibaba.com>
Date:   Fri Aug 27 09:46:09 2021 +0000

    io_uring: fix failed linkchain code logic

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=147a8045300000
start commit:   b91db6a0b52e Merge tag 'for-5.15/io_uring-vfs-2021-08-30' ..
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=167a8045300000
console output: https://syzkaller.appspot.com/x/log.txt?x=127a8045300000
kernel config:  https://syzkaller.appspot.com/x/.config?x=961d30359ac81f8c
dashboard link: https://syzkaller.appspot.com/bug?extid=e51249708aaa9b0e4d2c
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10a91625300000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12512291300000

Reported-by: syzbot+e51249708aaa9b0e4d2c@syzkaller.appspotmail.com
Fixes: a8295b982c46 ("io_uring: fix failed linkchain code logic")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] general protection fault in __io_file_supports_nowait
  2021-08-31 22:05 [syzbot] general protection fault in __io_file_supports_nowait syzbot
  2021-09-01  2:00 ` syzbot
  2021-09-01  6:41 ` syzbot
@ 2021-10-06 17:54 ` syzbot
  2021-10-06 17:55   ` Jens Axboe
  2 siblings, 1 reply; 7+ messages in thread
From: syzbot @ 2021-10-06 17:54 UTC (permalink / raw)
  To: asml.silence, axboe, haoxu, io-uring, linux-kernel, syzkaller-bugs

syzbot suspects this issue was fixed by commit:

commit c6d3d9cbd659de8f2176b4e4721149c88ac096d4
Author: Pavel Begunkov <asml.silence@gmail.com>
Date:   Tue Aug 31 13:13:10 2021 +0000

    io_uring: fix queueing half-created requests

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=174ee814b00000
start commit:   b91db6a0b52e Merge tag 'for-5.15/io_uring-vfs-2021-08-30' ..
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=961d30359ac81f8c
dashboard link: https://syzkaller.appspot.com/bug?extid=e51249708aaa9b0e4d2c
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10a91625300000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=12512291300000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: io_uring: fix queueing half-created requests

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] general protection fault in __io_file_supports_nowait
  2021-10-06 17:54 ` syzbot
@ 2021-10-06 17:55   ` Jens Axboe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2021-10-06 17:55 UTC (permalink / raw)
  To: syzbot, asml.silence, haoxu, io-uring, linux-kernel, syzkaller-bugs

#syz fix: io_uring: fix queueing half-created requests
-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-06 17:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 22:05 [syzbot] general protection fault in __io_file_supports_nowait syzbot
2021-09-01  2:00 ` syzbot
2021-09-01  2:08   ` Jens Axboe
2021-09-01  3:34     ` syzbot
2021-09-01  6:41 ` syzbot
2021-10-06 17:54 ` syzbot
2021-10-06 17:55   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).