syzbot


WARNING in io_link_timeout_fn

Status: fixed on 2021/11/10 00:50
Subsystems: fs io-uring
[Documentation on labels]
Reported-by: syzbot+5a864149dd970b546223@syzkaller.appspotmail.com
Fix commit: 447c19f3b507 io_uring: fix ltout double free on completion race
First crash: 1251d, last: 1251d
Cause bisection: introduced by (bisect log) :
commit 91f245d5d5de0802428a478802ec051f7de2f5d6
Author: Jens Axboe <axboe@kernel.dk>
Date: Tue Feb 9 20:48:50 2021 +0000

  io_uring: enable kmemcg account for io_uring requests

Crash: possible deadlock in tctx_task_work (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 5.12 000/161] 5.12.10-rc1 review 171 (171) 2021/06/09 20:47
[PATCH 1/1] io_uring: fix ltout double free on completion race 2 (2) 2021/05/14 14:51
[syzbot] WARNING in io_link_timeout_fn 3 (7) 2021/05/14 01:05
Last patch testing requests (3)
Created Duration User Patch Repo Result
2021/05/14 00:39 19m asml.silence@gmail.com https://github.com/isilence/linux.git syz_test8 OK
2021/05/13 21:03 11m asml.silence@gmail.com https://github.com/isilence/linux.git syz_test6 report log
2021/05/12 20:57 10m axboe@kernel.dk git://git.kernel.dk/linux-block.git io_uring-5.13 report log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 8784 at fs/io_uring.c:1499 req_ref_sub_and_test fs/io_uring.c:1499 [inline]
WARNING: CPU: 1 PID: 8784 at fs/io_uring.c:1499 io_put_req_deferred fs/io_uring.c:2191 [inline]
WARNING: CPU: 1 PID: 8784 at fs/io_uring.c:1499 io_link_timeout_fn+0x96c/0xb20 fs/io_uring.c:6369
Modules linked in:
CPU: 1 PID: 8784 Comm: systemd-cgroups Not tainted 5.13.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:req_ref_sub_and_test fs/io_uring.c:1499 [inline]
RIP: 0010:io_put_req_deferred fs/io_uring.c:2191 [inline]
RIP: 0010:io_link_timeout_fn+0x96c/0xb20 fs/io_uring.c:6369
Code: 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 84 f9 fd ff ff e8 ae ff da ff e9 ef fd ff ff e8 f4 03 96 ff <0f> 0b e9 6a fc ff ff e8 e8 03 96 ff 4c 89 ef e8 10 96 ff ff 48 8d
RSP: 0018:ffffc90000dc0d70 EFLAGS: 00010046
RAX: 0000000080010001 RBX: ffff88802c080c80 RCX: 0000000000000000
RDX: ffff8880373954c0 RSI: ffffffff81dece4c RDI: 0000000000000003
RBP: ffff88802c080cdc R08: 000000000000007f R09: ffff88802c080cdf
R10: ffffffff81decab3 R11: 0000000000000000 R12: 000000000000007f
R13: 0000000000000000 R14: ffff88802c15e000 R15: ffff88802c15e680
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6ba37daab4 CR3: 0000000015bdf000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 __run_hrtimer kernel/time/hrtimer.c:1537 [inline]
 __hrtimer_run_queues+0x609/0xe40 kernel/time/hrtimer.c:1601
 hrtimer_interrupt+0x330/0xa00 kernel/time/hrtimer.c:1663
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1089 [inline]
 __sysvec_apic_timer_interrupt+0x146/0x540 arch/x86/kernel/apic/apic.c:1106
 sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1100
 </IRQ>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647
RIP: 0010:orc_find arch/x86/kernel/unwind_orc.c:166 [inline]
RIP: 0010:unwind_next_frame+0x308/0x1ce0 arch/x86/kernel/unwind_orc.c:443
Code: 48 8d 3c 40 4c 8d 8c 3f cc 27 3d 8e 83 c2 01 49 81 f9 a4 0c dd 8e 0f 83 f3 10 00 00 89 d7 48 8d 3c 7f 48 8d bc 3f cc 27 3d 8e <48> 81 ff a4 0c dd 8e 0f 87 d8 10 00 00 48 8d 3c 85 3c 8f d2 8d 29
RSP: 0018:ffffc9000918f6a8 EFLAGS: 00000293
RAX: 000000000002bff1 RBX: 1ffff92001231edd RCX: 000000000002bff1
RDX: 000000000002bffb RSI: 000000000000b9cd RDI: ffffffff8e4da7ae
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff8e4da772
R10: fffff52001231efb R11: 0000000000084087 R12: ffffc9000918f7c8
R13: ffffc9000918f7b5 R14: ffffc9000918f780 R15: ffffffff81b9cd7f
 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:121
 kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38
 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46
 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357
 ____kasan_slab_free mm/kasan/common.c:360 [inline]
 ____kasan_slab_free mm/kasan/common.c:325 [inline]
 __kasan_slab_free+0xfb/0x130 mm/kasan/common.c:368
 kasan_slab_free include/linux/kasan.h:212 [inline]
 slab_free_hook mm/slub.c:1581 [inline]
 slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1606
 slab_free mm/slub.c:3166 [inline]
 kmem_cache_free+0x8a/0x740 mm/slub.c:3182
 anon_vma_chain_free mm/rmap.c:141 [inline]
 unlink_anon_vmas+0x472/0x860 mm/rmap.c:439
 free_pgtables+0xe2/0x2f0 mm/memory.c:413
 exit_mmap+0x2b7/0x590 mm/mmap.c:3209
 __mmput+0x122/0x470 kernel/fork.c:1096
 mmput+0x58/0x60 kernel/fork.c:1117
 exit_mm kernel/exit.c:502 [inline]
 do_exit+0xb0a/0x2a60 kernel/exit.c:813
 do_group_exit+0x125/0x310 kernel/exit.c:923
 __do_sys_exit_group kernel/exit.c:934 [inline]
 __se_sys_exit_group kernel/exit.c:932 [inline]
 __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:932
 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f6ba4eb3618
Code: Unable to access opcode bytes at RIP 0x7f6ba4eb35ee.
RSP: 002b:00007ffd8038caf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6ba4eb3618
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00007f6ba51908e0 R08: 00000000000000e7 R09: fffffffffffffee8
R10: 00007f6ba336e158 R11: 0000000000000246 R12: 00007f6ba51908e0
R13: 00007f6ba5195c20 R14: 0000000000000000 R15: 0000000000000000

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/12 14:58 upstream 88b06399c9c7 da958a4d .config console log report syz C ci-upstream-kasan-gce WARNING in io_link_timeout_fn
2021/05/12 14:24 upstream 88b06399c9c7 da958a4d .config console log report info ci-upstream-kasan-gce WARNING in io_link_timeout_fn
* Struck through repros no longer work on HEAD.