syzbot


general protection fault in __vb2_queue_free

Status: fixed on 2019/01/11 01:22
Subsystems: media
[Documentation on labels]
Reported-by: syzbot+e1fb118a2ebb88031d21@syzkaller.appspotmail.com
Fix commit: 62dcb4f41836 media: vb2: check memory model for VIDIOC_CREATE_BUFS
First crash: 2058d, last: 2002d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 4.19 000/170] 4.19.14-stable review 194 (194) 2019/01/11 07:09
[PATCH 4.20 000/145] 4.20.1-stable review 164 (164) 2019/01/09 23:18
[PATCH] vb2: check memory model for VIDIOC_CREATE_BUFS 1 (1) 2018/11/08 12:23
general protection fault in __vb2_queue_free 0 (2) 2018/10/30 20:40
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 general protection fault in __vb2_queue_free C inconclusive 64 476d 1829d 0/1 upstream: reported C repro on 2019/06/16 16:22

Sample crash report:
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
CPU: 0 PID: 5658 Comm: syz-executor296 Not tainted 4.19.0+ #97
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:vb2_vmalloc_put_userptr+0x73/0x250 drivers/media/common/videobuf2/videobuf2-vmalloc.c:136
Code: fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 c2 01 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5e 08 48 8d 7b 09 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 72 01 00 00
RSP: 0018:ffff8801b9c873a0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffffffff113e4e0
RDX: 0000000000000001 RSI: ffffffff854de5d9 RDI: 0000000000000009
RBP: ffff8801b9c873d0 R08: ffff8801d3520180 R09: ffffed00395c0cba
R10: ffff8801b9c874c8 R11: ffff8801cae065d7 R12: ffffc90002571000
R13: 0000000000000000 R14: ffff8801c8cd0680 R15: ffff8801c8cd0680
FS:  0000000002010880(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000043e920 CR3: 000000000946a000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __vb2_buf_userptr_put drivers/media/common/videobuf2/videobuf2-core.c:258 [inline]
 __vb2_free_mem drivers/media/common/videobuf2/videobuf2-core.c:417 [inline]
 __vb2_queue_free+0x4b1/0xa30 drivers/media/common/videobuf2/videobuf2-core.c:458
 vb2_core_queue_release+0x62/0x80 drivers/media/common/videobuf2/videobuf2-core.c:2231
 vb2_queue_release drivers/media/common/videobuf2/videobuf2-v4l2.c:837 [inline]
 _vb2_fop_release+0x1d2/0x2b0 drivers/media/common/videobuf2/videobuf2-v4l2.c:1010
 vb2_fop_release+0x77/0xc0 drivers/media/common/videobuf2/videobuf2-v4l2.c:1024
 vivid_fop_release+0x18e/0x440 drivers/media/platform/vivid/vivid-core.c:474
 v4l2_release+0x224/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:456
 __fput+0x385/0xa30 fs/file_table.c:278
 ____fput+0x15/0x20 fs/file_table.c:309
 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x1ad6/0x26d0 kernel/exit.c:867
 do_group_exit+0x177/0x440 kernel/exit.c:970
 __do_sys_exit_group kernel/exit.c:981 [inline]
 __se_sys_exit_group kernel/exit.c:979 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:979
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x442da8
Code: Bad RIP value.
RSP: 002b:00007ffe13adb938 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000442da8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c2968 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d4180 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace b8c9b021415d499f ]---
RIP: 0010:vb2_vmalloc_put_userptr+0x73/0x250 drivers/media/common/videobuf2/videobuf2-vmalloc.c:136
Code: fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 c2 01 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5e 08 48 8d 7b 09 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 72 01 00 00
RSP: 0018:ffff8801b9c873a0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffffffff113e4e0
RDX: 0000000000000001 RSI: ffffffff854de5d9 RDI: 0000000000000009
RBP: ffff8801b9c873d0 R08: ffff8801d3520180 R09: ffffed00395c0cba
R10: ffff8801b9c874c8 R11: ffff8801cae065d7 R12: ffffc90002571000
R13: 0000000000000000 R14: ffff8801c8cd0680 R15: ffff8801c8cd0680
FS:  0000000002010880(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000442d7e CR3: 000000000946a000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (38):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/04 22:15 upstream 71e56028173b 8bd6bd63 .config console log report syz C ci-upstream-kasan-gce-smack-root
2018/11/03 00:53 upstream 8adcc59974b8 8bd6bd63 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/11/03 00:45 upstream 8adcc59974b8 8bd6bd63 .config console log report syz C ci-upstream-kasan-gce-root
2018/11/02 21:43 upstream 8adcc59974b8 8bd6bd63 .config console log report syz C ci-upstream-kasan-gce
2018/11/01 04:24 upstream 59fc453b21f7 1f38e9ae .config console log report syz C ci-upstream-kasan-gce-root
2018/10/31 10:51 upstream 310c7585e830 4ccf7bb4 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/10/31 07:57 upstream 310c7585e830 4ccf7bb4 .config console log report syz C ci-upstream-kasan-gce
2018/10/31 06:34 upstream 310c7585e830 4ccf7bb4 .config console log report syz C ci-upstream-kasan-gce-smack-root
2018/10/31 05:32 upstream 310c7585e830 4ccf7bb4 .config console log report syz C ci-upstream-kasan-gce-root
2018/10/30 23:07 upstream 11743c56785c 8dbb755a .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/10/30 20:52 upstream 11743c56785c 8dbb755a .config console log report syz C ci-upstream-kasan-gce
2018/10/30 20:39 upstream 11743c56785c 8dbb755a .config console log report syz C ci-upstream-kasan-gce-smack-root
2018/11/02 19:53 upstream 8adcc59974b8 8bd6bd63 .config console log report syz C ci-upstream-kasan-gce-386
2018/10/31 15:44 upstream 310c7585e830 89781090 .config console log report syz C ci-upstream-kasan-gce-386
2018/10/31 05:41 upstream 310c7585e830 4ccf7bb4 .config console log report syz C ci-upstream-kasan-gce-386
2018/11/03 05:03 linux-next 25e9471b6a27 8bd6bd63 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/10/31 06:57 linux-next c39eb210d7a0 4ccf7bb4 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/10/30 21:22 linux-next 6201f31a39f8 8dbb755a .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/12/25 19:56 upstream 8fe28cb58bcb 8a41a0ad .config console log report ci-upstream-kasan-gce
2018/12/17 13:13 upstream 7566ec393f41 def91db3 .config console log report ci-upstream-kasan-gce-root
2018/12/17 06:52 upstream 7566ec393f41 def91db3 .config console log report ci-upstream-kasan-gce-selinux-root
2018/12/09 04:14 upstream 8214bdf7d3e6 c7918378 .config console log report ci-upstream-kasan-gce
2018/11/28 00:49 upstream ef78e5ec9214 4b6d14f2 .config console log report ci-upstream-kasan-gce
2018/11/26 11:40 upstream 2e6e902d1850 ac912200 .config console log report ci-upstream-kasan-gce-smack-root
2018/11/21 03:01 upstream 06e68fed3282 9aca6b52 .config console log report ci-upstream-kasan-gce-root
2018/11/20 01:53 upstream f2ce1065e767 adf636a8 .config console log report ci-upstream-kasan-gce
2018/11/14 19:17 upstream ccda4af0f4b9 5f5f6d14 .config console log report ci-upstream-kasan-gce
2018/11/14 11:40 upstream ccda4af0f4b9 5f5f6d14 .config console log report ci-upstream-kasan-gce
2018/11/14 09:01 upstream ccda4af0f4b9 5f5f6d14 .config console log report ci-upstream-kasan-gce-root
2018/11/04 16:24 upstream 71e56028173b 8bd6bd63 .config console log report ci-upstream-kasan-gce-smack-root
2018/11/01 23:28 upstream 5b7449810ae6 1f38e9ae .config console log report ci-upstream-kasan-gce
2018/10/31 04:18 upstream 310c7585e830 4ccf7bb4 .config console log report ci-upstream-kasan-gce
2018/10/30 18:34 upstream 11743c56785c 8dbb755a .config console log report ci-upstream-kasan-gce-smack-root
2018/11/22 10:39 upstream 92b419289cee 2ee77802 .config console log report ci-upstream-kasan-gce-386
2018/11/22 10:36 linux-next 442b8cea2477 2ee77802 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/14 14:40 linux-next 442b8cea2477 5f5f6d14 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/09 00:29 linux-next f7af6d2c48bf e85d2a61 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/11/02 08:43 linux-next 25e9471b6a27 1f38e9ae .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.