BUG: unable to handle kernel NULL pointer dereference in vb2_vmalloc_put

8 views
Skip to first unread message

syzbot

unread,
Nov 29, 2019, 2:55:07 PM11/29/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 43598c57 Linux 4.14.156
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=159c2712e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=2d9649ec3417f96d
dashboard link: https://syzkaller.appspot.com/bug?extid=5818edfe0769a2d0f9d1
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11b2d82ae00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17a798eae00000

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

random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
audit: type=1400 audit(1575054594.667:36): avc: denied { map } for
pid=7011 comm="syz-executor736" path="/root/syz-executor736934292"
dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023
tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: refcount_dec_and_test arch/x86/include/asm/refcount.h:75 [inline]
IP: vb2_vmalloc_put+0xe/0x70 drivers/media/v4l2-core/videobuf2-vmalloc.c:68
PGD 0 P4D 0
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7011 Comm: syz-executor736 Not tainted 4.14.156-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff888077a9e2c0 task.stack: ffff88809acb8000
RIP: 0010:refcount_dec_and_test arch/x86/include/asm/refcount.h:75 [inline]
RIP: 0010:vb2_vmalloc_put+0xe/0x70
drivers/media/v4l2-core/videobuf2-vmalloc.c:68
RSP: 0018:ffff88809acbfab8 EFLAGS: 00010297
RAX: ffff888077a9e2c0 RBX: ffff8880932a6a00 RCX: ffffffff84367bc0
RDX: 0000000000000000 RSI: ffff888077a9eb68 RDI: 0000000000000000
RBP: ffff88809acbfac0 R08: 000000008c6a54e2 R09: ffff888077a9eb88
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8880932a6a14 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000020 CR3: 000000000786a000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__vb2_buf_mem_free+0x103/0x1e0 drivers/media/v4l2-core/videobuf2-core.c:240
__vb2_free_mem drivers/media/v4l2-core/videobuf2-core.c:409 [inline]
__vb2_queue_free+0x634/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 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+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/0x2ce0 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+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x442c78
RSP: 002b:00007ffee635b8f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000442c78
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004c2648 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d4180 R14: 0000000000000000 R15: 0000000000000000
Code: ff e8 17 3b 51 fd e9 db fe ff ff e8 2d 3b 51 fd e9 fc fe ff ff 0f 1f
84 00 00 00 00 00 55 48 89 e5 41 54 49 89 fc e8 b2 ab 26 fd <f0> 41 ff 4c
24 20 0f 88 53 b9 f5 01 74 09 e8 9f ab 26 fd 41 5c
RIP: refcount_dec_and_test arch/x86/include/asm/refcount.h:75 [inline] RSP:
ffff88809acbfab8
RIP: vb2_vmalloc_put+0xe/0x70
drivers/media/v4l2-core/videobuf2-vmalloc.c:68 RSP: ffff88809acbfab8
CR2: 0000000000000020
---[ end trace 3c4a03ab0fdda7fe ]---


---
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 can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages