Re: [syzbot] general protection fault in hrtimer_start_range_ns

From: Thomas Gleixner
Date: Wed Sep 08 2021 - 17:11:32 EST


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: syzbot+b935db3fe409625cca1b@xxxxxxxxxxxxxxxxxxxxxxxxx
>>>>
>>>> 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