public inbox for [email protected]
 help / color / mirror / Atom feed
* Re: [syzbot] general protection fault in hrtimer_start_range_ns
       [not found] <[email protected]>
@ 2021-09-08 16:45 ` Thomas Gleixner
  2021-09-08 17:02   ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2021-09-08 16:45 UTC (permalink / raw)
  To: syzbot, linux-kernel, syzkaller-bugs, io-uring, Jens Axboe

On Mon, Sep 06 2021 at 03:28, syzbot wrote:
> syzbot found the following issue on:
>
> HEAD commit:    835d31d319d9 Merge tag 'media/v5.15-1' of git://git.kernel..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=14489886300000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d793523866f2daea
> dashboard link: https://syzkaller.appspot.com/bug?extid=b935db3fe409625cca1b
> compiler:       Debian clang version 11.0.1-2, 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: [email protected]
>
> general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
> KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
> CPU: 0 PID: 12936 Comm: iou-sqp-12929 Not tainted 5.14.0-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> RIP: 0010:lock_hrtimer_base kernel/time/hrtimer.c:173 [inline]

That's almost certainly deferencing hrtimer->base and as that is NULL this looks
like a not initialized hrtimer.

Jens?

> RIP: 0010:hrtimer_start_range_ns+0xc9/0x1ae0 kernel/time/hrtimer.c:1296
> Code: 89 9c 24 88 00 00 00 42 80 3c 33 00 74 08 48 89 ef e8 7b 34 5b 00 4c 8b 6d 00 4d 39 fd 0f 84 95 00 00 00 4d 89 ef 49 c1 ef 03 <43> 80 3c 37 00 74 08 4c 89 ef e8 58 34 5b 00 49 8b 7d 00 e8 6f 19
> RSP: 0018:ffffc900097af170 EFLAGS: 00010046
> RAX: ffff888016d49508 RBX: 1ffff11002da92a7 RCX: ffff888027371c80
> RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
> RBP: ffff888016d49538 R08: ffffffff816fb4b5 R09: 0000000000000003
> R10: fffff520012f5e2d R11: 0000000000000004 R12: 0000000000000000
> R13: 0000000000000000 R14: dffffc0000000000 R15: 0000000000000000
> FS:  00007f7386f28700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000000000000000 CR3: 000000002b5e4000 CR4: 00000000001526f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
>  hrtimer_start include/linux/hrtimer.h:418 [inline]
>  io_timeout fs/io_uring.c:6120 [inline]
>  io_issue_sqe+0x53d3/0x9280 fs/io_uring.c:6590
>  __io_queue_sqe+0xe3/0x1000 fs/io_uring.c:6864
>  tctx_task_work+0x2ad/0x560 fs/io_uring.c:2143
>  task_work_run+0x146/0x1c0 kernel/task_work.c:164
>  tracehook_notify_signal include/linux/tracehook.h:212 [inline]
>  io_run_task_work+0x110/0x140 fs/io_uring.c:2403
>  io_sq_thread+0xb5e/0x1220 fs/io_uring.c:7337
>  ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
> Modules linked in:
> ---[ end trace 841fafb7511d53d3 ]---
> RIP: 0010:lock_hrtimer_base kernel/time/hrtimer.c:173 [inline]
> RIP: 0010:hrtimer_start_range_ns+0xc9/0x1ae0 kernel/time/hrtimer.c:1296
> Code: 89 9c 24 88 00 00 00 42 80 3c 33 00 74 08 48 89 ef e8 7b 34 5b 00 4c 8b 6d 00 4d 39 fd 0f 84 95 00 00 00 4d 89 ef 49 c1 ef 03 <43> 80 3c 37 00 74 08 4c 89 ef e8 58 34 5b 00 49 8b 7d 00 e8 6f 19
> RSP: 0018:ffffc900097af170 EFLAGS: 00010046
> RAX: ffff888016d49508 RBX: 1ffff11002da92a7 RCX: ffff888027371c80
> RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
> RBP: ffff888016d49538 R08: ffffffff816fb4b5 R09: 0000000000000003
> R10: fffff520012f5e2d R11: 0000000000000004 R12: 0000000000000000
> R13: 0000000000000000 R14: dffffc0000000000 R15: 0000000000000000
> FS:  00007f7386f28700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000000000000000 CR3: 000000002b5e4000 CR4: 00000000001526f0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> ----------------
> Code disassembly (best guess):
>    0:	89 9c 24 88 00 00 00 	mov    %ebx,0x88(%rsp)
>    7:	42 80 3c 33 00       	cmpb   $0x0,(%rbx,%r14,1)
>    c:	74 08                	je     0x16
>    e:	48 89 ef             	mov    %rbp,%rdi
>   11:	e8 7b 34 5b 00       	callq  0x5b3491
>   16:	4c 8b 6d 00          	mov    0x0(%rbp),%r13
>   1a:	4d 39 fd             	cmp    %r15,%r13
>   1d:	0f 84 95 00 00 00    	je     0xb8
>   23:	4d 89 ef             	mov    %r13,%r15
>   26:	49 c1 ef 03          	shr    $0x3,%r15
> * 2a:	43 80 3c 37 00       	cmpb   $0x0,(%r15,%r14,1) <-- trapping instruction
>   2f:	74 08                	je     0x39
>   31:	4c 89 ef             	mov    %r13,%rdi
>   34:	e8 58 34 5b 00       	callq  0x5b3491
>   39:	49 8b 7d 00          	mov    0x0(%r13),%rdi
>   3d:	e8                   	.byte 0xe8
>   3e:	6f                   	outsl  %ds:(%rsi),(%dx)
>   3f:	19                   	.byte 0x19
>
>
> ---
> 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 [email protected].
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

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

* Re: [syzbot] general protection fault in hrtimer_start_range_ns
  2021-09-08 16:45 ` [syzbot] general protection fault in hrtimer_start_range_ns Thomas Gleixner
@ 2021-09-08 17:02   ` Jens Axboe
  2021-09-08 17:20     ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2021-09-08 17:02 UTC (permalink / raw)
  To: Thomas Gleixner, syzbot, linux-kernel, syzkaller-bugs, io-uring

On 9/8/21 10:45 AM, Thomas Gleixner wrote:
> On Mon, Sep 06 2021 at 03:28, syzbot wrote:
>> syzbot found the following issue on:
>>
>> HEAD commit:    835d31d319d9 Merge tag 'media/v5.15-1' of git://git.kernel..
>> git tree:       upstream
>> console output: https://syzkaller.appspot.com/x/log.txt?x=14489886300000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=d793523866f2daea
>> dashboard link: https://syzkaller.appspot.com/bug?extid=b935db3fe409625cca1b
>> compiler:       Debian clang version 11.0.1-2, 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: [email protected]
>>
>> general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
>> KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
>> CPU: 0 PID: 12936 Comm: iou-sqp-12929 Not tainted 5.14.0-syzkaller #0
>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
>> RIP: 0010:lock_hrtimer_base kernel/time/hrtimer.c:173 [inline]
> 
> That's almost certainly deferencing hrtimer->base and as that is NULL
> this looks like a not initialized hrtimer.

Does certainly look like that, I'll take a look. And agree the next one
looks like the same thing.

-- 
Jens Axboe


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

* Re: [syzbot] general protection fault in hrtimer_start_range_ns
  2021-09-08 17:02   ` Jens Axboe
@ 2021-09-08 17:20     ` Jens Axboe
  2021-09-08 21:11       ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2021-09-08 17:20 UTC (permalink / raw)
  To: Thomas Gleixner, syzbot, linux-kernel, syzkaller-bugs, io-uring

On 9/8/21 11:02 AM, Jens Axboe wrote:
> On 9/8/21 10:45 AM, Thomas Gleixner wrote:
>> On Mon, Sep 06 2021 at 03:28, syzbot wrote:
>>> syzbot found the following issue on:
>>>
>>> HEAD commit:    835d31d319d9 Merge tag 'media/v5.15-1' of git://git.kernel..
>>> git tree:       upstream
>>> console output: https://syzkaller.appspot.com/x/log.txt?x=14489886300000
>>> kernel config:  https://syzkaller.appspot.com/x/.config?x=d793523866f2daea
>>> dashboard link: https://syzkaller.appspot.com/bug?extid=b935db3fe409625cca1b
>>> compiler:       Debian clang version 11.0.1-2, 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: [email protected]
>>>
>>> general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
>>> KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
>>> CPU: 0 PID: 12936 Comm: iou-sqp-12929 Not tainted 5.14.0-syzkaller #0
>>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
>>> RIP: 0010:lock_hrtimer_base kernel/time/hrtimer.c:173 [inline]
>>
>> That's almost certainly deferencing hrtimer->base and as that is NULL
>> this looks like a not initialized hrtimer.
> 
> Does certainly look like that, I'll take a look. And agree the next one
> looks like the same thing.

I think both are fallout from a regression that we had in linked
requests, where we'd queue requests that weren't fully prepared. Current
Linus -git should not have this problem:

These were the two related fixes:

      io_uring: fix queueing half-created requests
      io_uring: don't submit half-prepared drain request

-- 
Jens Axboe


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

* Re: [syzbot] general protection fault in hrtimer_start_range_ns
  2021-09-08 17:20     ` Jens Axboe
@ 2021-09-08 21:11       ` Thomas Gleixner
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2021-09-08 21:11 UTC (permalink / raw)
  To: Jens Axboe, syzbot, linux-kernel, syzkaller-bugs, io-uring

On Wed, Sep 08 2021 at 11:20, Jens Axboe wrote:

> On 9/8/21 11:02 AM, Jens Axboe wrote:
>> On 9/8/21 10:45 AM, Thomas Gleixner wrote:
>>> On Mon, Sep 06 2021 at 03:28, syzbot wrote:
>>>> syzbot found the following issue on:
>>>>
>>>> HEAD commit:    835d31d319d9 Merge tag 'media/v5.15-1' of git://git.kernel..
>>>> git tree:       upstream
>>>> console output: https://syzkaller.appspot.com/x/log.txt?x=14489886300000
>>>> kernel config:  https://syzkaller.appspot.com/x/.config?x=d793523866f2daea
>>>> dashboard link: https://syzkaller.appspot.com/bug?extid=b935db3fe409625cca1b
>>>> compiler:       Debian clang version 11.0.1-2, 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: [email protected]
>>>>
>>>> general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
>>>> KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
>>>> CPU: 0 PID: 12936 Comm: iou-sqp-12929 Not tainted 5.14.0-syzkaller #0
>>>> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
>>>> RIP: 0010:lock_hrtimer_base kernel/time/hrtimer.c:173 [inline]
>>>
>>> That's almost certainly deferencing hrtimer->base and as that is NULL
>>> this looks like a not initialized hrtimer.
>> 
>> Does certainly look like that, I'll take a look. And agree the next one
>> looks like the same thing.
>
> I think both are fallout from a regression that we had in linked
> requests, where we'd queue requests that weren't fully prepared. Current
> Linus -git should not have this problem:
>
> These were the two related fixes:
>
>       io_uring: fix queueing half-created requests
>       io_uring: don't submit half-prepared drain request

Makes sense and the backtraces in the changelogs point at the same class
of problem.

Thanks,

        tglx

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

end of thread, other threads:[~2021-09-08 21:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <[email protected]>
2021-09-08 16:45 ` [syzbot] general protection fault in hrtimer_start_range_ns Thomas Gleixner
2021-09-08 17:02   ` Jens Axboe
2021-09-08 17:20     ` Jens Axboe
2021-09-08 21:11       ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox