general protection fault in __vb2_queue_free

9 views
Skip to first unread message

syzbot

unread,
Jun 16, 2019, 12:22:05 PM6/16/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: a74d0e93 Linux 4.14.126
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10d76476a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb5b89703401900e
dashboard link: https://syzkaller.appspot.com/bug?extid=4bb107dc49a70be0a67b
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+4bb107...@syzkaller.appspotmail.com

0 pages cma reserved
Out of memory: Kill process 8129 (syz-executor.2) score 1005 or sacrifice
child
Killed process 8129 (syz-executor.2) total-vm:72712kB, anon-rss:4864kB,
file-rss:34688kB, shmem-rss:0kB
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: 15771 Comm: syz-executor.0 Not tainted 4.14.126 #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff888094aba400 task.stack: ffff88805dcd8000
RIP: 0010:vb2_vmalloc_put_userptr+0x6e/0x210
drivers/media/v4l2-core/videobuf2-vmalloc.c:136
RSP: 0018:ffff88805dcdf9c8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffc90013b47000 RCX: ffffc90007036000
RDX: 0000000000000001 RSI: ffffffff8424c255 RDI: 0000000000000009
RBP: ffff88805dcdf9f0 R08: dffffc0000000000 R09: ffffffff88cb6940
R10: ffff88805dcdfa80 R11: ffff888094aba400 R12: ffff8880a16b0b80
R13: 0000000000000000 R14: ffff8880a16b0b80 R15: ffff8880a16b0b88
FS: 00007fb17ad72700(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200001c0 CR3: 000000008034c000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__vb2_buf_userptr_put drivers/media/v4l2-core/videobuf2-core.c:256 [inline]
__vb2_free_mem drivers/media/v4l2-core/videobuf2-core.c:413 [inline]
__vb2_queue_free+0x3a8/0x7d0 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+0x16/0x20 drivers/media/v4l2-core/videobuf2-v4l2.c:669
v4l2_m2m_ctx_release+0x2d/0x40 drivers/media/v4l2-core/v4l2-mem2mem.c:674
vim2m_release+0xde/0x130 drivers/media/platform/vim2m.c:959
v4l2_release+0xf9/0x190 drivers/media/v4l2-core/v4l2-dev.c:446
__fput+0x275/0x7a0 fs/file_table.c:210
____fput+0x16/0x20 fs/file_table.c:244
task_work_run+0x114/0x190 kernel/task_work.c:113
get_signal+0x18a8/0x1cd0 kernel/signal.c:2220
do_signal+0x86/0x19a0 arch/x86/kernel/signal.c:814
exit_to_usermode_loop+0x15c/0x220 arch/x86/entry/common.c:160
prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4592c9
RSP: 002b:00007fb17ad71c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: fffffffffffffff2 RBX: 0000000000000003 RCX: 00000000004592c9
RDX: 00000000200001c0 RSI: 00000000c100565c RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb17ad726d4
R13: 00000000004c4241 R14: 00000000004d7ee0 R15: 00000000ffffffff
Code: 4c 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 8d 01 00 00 48 b8 00 00 00 00
00 fc ff df 4d 8b 6c 24 08 49 8d 7d 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 3c 01 00
RIP: vb2_vmalloc_put_userptr+0x6e/0x210
drivers/media/v4l2-core/videobuf2-vmalloc.c:136 RSP: ffff88805dcdf9c8
---[ end trace fa9a29b0d3205455 ]---


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 16, 2019, 1:43:05 PM6/16/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: a74d0e93 Linux 4.14.126
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1023442aa00000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb5b89703401900e
dashboard link: https://syzkaller.appspot.com/bug?extid=4bb107dc49a70be0a67b
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=108daa32a00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13f2144ea00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+4bb107...@syzkaller.appspotmail.com

Out of memory: Kill process 7192 (syz-executor616) score 999 or sacrifice
child
Killed process 7192 (syz-executor616) total-vm:17532kB, anon-rss:44kB,
file-rss:0kB, shmem-rss:0kB
oom_reaper: reaped process 7192 (syz-executor616), now anon-rss:0kB,
file-rss:0kB, shmem-rss:0kB
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: 7175 Comm: syz-executor616 Not tainted 4.14.126 #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff8880928b21c0 task.stack: ffff888093af8000
RIP: 0010:vb2_vmalloc_put_userptr+0x6e/0x210
drivers/media/v4l2-core/videobuf2-vmalloc.c:136
RSP: 0018:ffff888093aff870 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffffc90005e2d000 RCX: 1ffffffff0da7224
RDX: 0000000000000001 RSI: ffff8880a5d86d54 RDI: 0000000000000009
RBP: ffff888093aff898 R08: dffffc0000000000 R09: ffffffff88c94d58
R10: ffff888093aff928 R11: ffff8880928b21c0 R12: ffff888092c83a00
R13: 0000000000000000 R14: ffff888092c83a00 R15: ffff888092c83a08
FS: 0000000000000000(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200001c0 CR3: 000000000766a000 CR4: 00000000001406e0
Call Trace:
__vb2_buf_userptr_put drivers/media/v4l2-core/videobuf2-core.c:256 [inline]
__vb2_free_mem drivers/media/v4l2-core/videobuf2-core.c:413 [inline]
__vb2_queue_free+0x3a8/0x7d0 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+0x16/0x20 drivers/media/v4l2-core/videobuf2-v4l2.c:669
v4l2_m2m_ctx_release+0x2d/0x40 drivers/media/v4l2-core/v4l2-mem2mem.c:674
vim2m_release+0xde/0x130 drivers/media/platform/vim2m.c:959
v4l2_release+0xf9/0x190 drivers/media/v4l2-core/v4l2-dev.c:446
__fput+0x275/0x7a0 fs/file_table.c:210
____fput+0x16/0x20 fs/file_table.c:244
task_work_run+0x114/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
get_signal+0x381/0x1cd0 kernel/signal.c:2409
do_signal+0x86/0x19a0 arch/x86/kernel/signal.c:814
exit_to_usermode_loop+0x15c/0x220 arch/x86/entry/common.c:160
prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x442b19
RSP: 002b:00007ffce8a4b288 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: fffffffffffffff2 RBX: 0000000000000000 RCX: 0000000000442b19
RDX: 00000000200001c0 RSI: 00000000c100565c RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000403920 R09: 0000000000403920
R10: 0000000000403920 R11: 0000000000000246 R12: 0000000000403890
R13: 0000000000403920 R14: 0000000000000000 R15: 0000000000000000
Code: 4c 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 8d 01 00 00 48 b8 00 00 00 00
00 fc ff df 4d 8b 6c 24 08 49 8d 7d 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 3c 01 00
RIP: vb2_vmalloc_put_userptr+0x6e/0x210
drivers/media/v4l2-core/videobuf2-vmalloc.c:136 RSP: ffff888093aff870
---[ end trace 94464bb8bd2b03b2 ]---

Reply all
Reply to author
Forward
0 new messages