syzbot


BUG: unable to handle kernel NULL pointer dereference in kthread_stop

Status: upstream: reported C repro on 2019/04/14 05:07
Reported-by: syzbot+fa8adb1ff6f3e0b0750c@syzkaller.appspotmail.com
First crash: 1829d, last: 1414d
Fix bisection the fix commit could be any of (bisect log):
  fa5941f45d7e Linux 4.14.114
  4139fb08c05f Linux 4.14.187
  
Last patch testing requests (4)
Created Duration User Patch Repo Result
2023/01/19 22:32 9m retest repro linux-4.14.y report log
2023/01/19 21:32 9m retest repro linux-4.14.y report log
2022/09/04 12:27 12m retest repro linux-4.14.y report log
2022/09/04 11:27 10m retest repro linux-4.14.y report log
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2020/07/01 17:20 33m (2) bisect fix linux-4.14.y job log (2)
2020/06/01 16:52 28m bisect fix linux-4.14.y job log (0) log
2020/05/02 16:22 28m bisect fix linux-4.14.y job log (0) log
2020/04/02 15:52 29m bisect fix linux-4.14.y job log (0) log
2020/03/03 15:17 29m bisect fix linux-4.14.y job log (0) log
2020/02/02 14:49 28m bisect fix linux-4.14.y job log (0) log
2020/01/03 14:22 27m bisect fix linux-4.14.y job log (0) log
2019/12/04 09:46 27m bisect fix linux-4.14.y job log (0) log

Sample crash report:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: atomic_inc arch/x86/include/asm/atomic.h:92 [inline]
IP: kthread_stop+0x4c/0x650 kernel/kthread.c:525
PGD 74097067 P4D 74097067 PUD 953c2067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 7484 Comm: syz-executor267 Not tainted 4.14.114 #4
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff888072404640 task.stack: ffff888099770000
RIP: 0010:atomic_inc arch/x86/include/asm/atomic.h:92 [inline]
RIP: 0010:kthread_stop+0x4c/0x650 kernel/kthread.c:525
RSP: 0018:ffff888099777a20 EFLAGS: 00010297
RAX: ffff888072404640 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000282
RBP: ffff888099777a40 R08: ffff888072404640 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88809667f270 R14: ffff88809667f268 R15: ffffffff89bb9bc0
FS:  00000000022f5880(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000020 CR3: 0000000075444000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 vivid_stop_generating_vid_cap+0x1b9/0x664 drivers/media/platform/vivid/vivid-kthread-cap.c:934
 vid_cap_stop_streaming+0x7c/0xd0 drivers/media/platform/vivid/vivid-vid-cap.c:273
 __vb2_queue_cancel+0xa6/0x8a0 drivers/media/v4l2-core/videobuf2-core.c:1655
 vb2_core_streamoff+0x52/0x110 drivers/media/v4l2-core/videobuf2-core.c:1788
 __vb2_cleanup_fileio+0x78/0x150 drivers/media/v4l2-core/videobuf2-core.c:2313
 vb2_core_queue_release+0x1d/0x80 drivers/media/v4l2-core/videobuf2-core.c:2040
 vb2_queue_release drivers/media/v4l2-core/videobuf2-v4l2.c:669 [inline]
 _vb2_fop_release+0x1cf/0x2a0 drivers/media/v4l2-core/videobuf2-v4l2.c:840
 vb2_fop_release+0x75/0xc0 drivers/media/v4l2-core/videobuf2-v4l2.c:854
 vivid_fop_release+0x180/0x3f0 drivers/media/platform/vivid/vivid-core.c:486
 v4l2_release+0xfb/0x190 drivers/media/v4l2-core/v4l2-dev.c:446
 __fput+0x277/0x7a0 fs/file_table.c:210
 ____fput+0x16/0x20 fs/file_table.c:244
 task_work_run+0x119/0x190 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x7df/0x2c10 kernel/exit.c:874
 do_group_exit+0x111/0x330 kernel/exit.c:977
 SYSC_exit_group kernel/exit.c:988 [inline]
 SyS_exit_group+0x1d/0x20 kernel/exit.c:986
 do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x443b78
RSP: 002b:00007ffee6fbf008 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443b78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c34f0 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 000000000000000f R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d5180 R14: 0000000000000000 R15: 0000000000000000
Code: 00 65 8b 1d 67 2f c3 7e 83 fb 3f 0f 87 63 04 00 00 e8 d9 96 1e 00 89 db 48 0f a3 1d bf 98 e6 06 0f 82 4c 03 00 00 e8 c4 96 1e 00 <f0> 41 ff 44 24 20 49 8d 7c 24 24 48 b8 00 00 00 00 00 fc ff df 
RIP: atomic_inc arch/x86/include/asm/atomic.h:92 [inline] RSP: ffff888099777a20
RIP: kthread_stop+0x4c/0x650 kernel/kthread.c:525 RSP: ffff888099777a20
CR2: 0000000000000020
---[ end trace 016a95db80f4c598 ]---

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/28 18:30 linux-4.14.y fa5941f45d7e b617407b .config console log report syz C ci2-linux-4-14
2019/04/24 23:13 linux-4.14.y 68d7a45eec10 8e3c52b1 .config console log report syz C ci2-linux-4-14
2019/08/15 10:13 linux-4.14.y 3ffe1e79c174 0d298d6b .config console log report ci2-linux-4-14
2019/07/31 06:21 linux-4.14.y 10d6aa565d05 7c7ded69 .config console log report ci2-linux-4-14
2019/07/25 10:08 linux-4.14.y ff33472c282e 32329ceb .config console log report ci2-linux-4-14
2019/07/01 11:37 linux-4.14.y f4cc0ed9b2c7 907bf746 .config console log report ci2-linux-4-14
2019/06/20 07:45 linux-4.14.y bb263a2a2d43 34bf9440 .config console log report ci2-linux-4-14
2019/06/19 08:23 linux-4.14.y bb263a2a2d43 34bf9440 .config console log report ci2-linux-4-14
2019/06/18 14:47 linux-4.14.y e861d0673eb8 e3f76baa .config console log report ci2-linux-4-14
2019/06/18 13:51 linux-4.14.y e861d0673eb8 e3f76baa .config console log report ci2-linux-4-14
2019/05/07 08:10 linux-4.14.y 6d1510d86ef6 04e9d8ce .config console log report ci2-linux-4-14
2019/04/20 08:05 linux-4.14.y 68d7a45eec10 b0e8efcb .config console log report ci2-linux-4-14
2019/04/14 04:06 linux-4.14.y 1ec8f1f0bffe c402d8f1 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.