syzbot


general protection fault in refcount_sub_and_test

Status: upstream: reported C repro on 2019/04/16 18:23
Reported-by: syzbot+3bbb09fefbc07eec5027@syzkaller.appspotmail.com
First crash: 1829d, last: 1422d
Fix bisection the fix commit could be any of (bisect log):
  1ec8f1f0bffe Linux 4.14.111
  4139fb08c05f Linux 4.14.187
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in refcount_sub_and_test 1 2455d 2439d 3/26 fixed on 2017/11/06 20:49
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/12/27 03:31 13m retest repro linux-4.14.y report log
2022/08/31 10:27 15m retest repro linux-4.14.y report log
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2020/06/26 14:16 29m (3) bisect fix linux-4.14.y job log (2)
2020/05/27 13:53 22m bisect fix linux-4.14.y job log (0) log
2020/04/27 13:29 23m bisect fix linux-4.14.y job log (0) log
2020/03/28 10:10 23m bisect fix linux-4.14.y job log (0) log
2020/02/27 09:45 24m bisect fix linux-4.14.y job log (0) log
2020/01/28 09:21 23m bisect fix linux-4.14.y job log (0) log
2019/12/29 05:28 26m bisect fix linux-4.14.y job log (0) log
2019/11/29 04:59 23m bisect fix linux-4.14.y job log (0) log

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
audit: type=1400 audit(1555436523.629:36): avc:  denied  { map } for  pid=6839 comm="syz-executor505" path="/root/syz-executor505751706" dev="sda1" ino=16482 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 6839 Comm: syz-executor505 Not tainted 4.14.111 #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff88808a9ea240 task.stack: ffff888081e68000
RIP: 0010:__read_once_size include/linux/compiler.h:183 [inline]
RIP: 0010:atomic_read arch/x86/include/asm/atomic.h:27 [inline]
RIP: 0010:refcount_sub_and_test+0x2b/0xf0 lib/refcount.c:179
RSP: 0018:ffff888081e6fa68 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff888092859a40 RCX: ffffffff842582d0
RDX: 0000000000000004 RSI: 0000000000000020 RDI: 0000000000000001
RBP: ffff888081e6fa90 R08: 000000004f3c8ce9 R09: ffff88808a9eab08
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000020
R13: 0000000000000001 R14: ffff888092859a54 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055bee90fb190 CR3: 000000000766a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 refcount_dec_and_test+0x1b/0x20 lib/refcount.c:212
 vb2_vmalloc_put+0x18/0x70 drivers/media/v4l2-core/videobuf2-vmalloc.c:68
 __vb2_buf_mem_free+0x106/0x1e0 drivers/media/v4l2-core/videobuf2-core.c:240
 __vb2_free_mem drivers/media/v4l2-core/videobuf2-core.c:409 [inline]
 __vb2_queue_free+0x63a/0x7e0 drivers/media/v4l2-core/videobuf2-core.c:454
 vb2_core_queue_release+0x64/0x80 drivers/media/v4l2-core/videobuf2-core.c:2043
 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:0x442cc8
RSP: 002b:00007ffe9e9455c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000442cc8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c25e8 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d4180 R14: 0000000000000000 R15: 0000000000000000
Code: 55 48 89 e5 41 56 41 55 41 89 fd 41 54 49 89 f4 53 48 83 ec 08 e8 96 e1 85 fe 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 14 02 4c 89 e0 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 
RIP: __read_once_size include/linux/compiler.h:183 [inline] RSP: ffff888081e6fa68
RIP: atomic_read arch/x86/include/asm/atomic.h:27 [inline] RSP: ffff888081e6fa68
RIP: refcount_sub_and_test+0x2b/0xf0 lib/refcount.c:179 RSP: ffff888081e6fa68
---[ end trace 6833091c11894b6e ]---

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/16 17:46 linux-4.14.y 1ec8f1f0bffe 505ab413 .config console log report syz C ci2-linux-4-14
2019/04/26 08:07 linux-4.14.y 68d7a45eec10 b617407b .config console log report ci2-linux-4-14
2019/04/19 13:49 linux-4.14.y 58b454ebf81e b0e8efcb .config console log report ci2-linux-4-14
2019/04/16 17:22 linux-4.14.y 1ec8f1f0bffe 505ab413 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.