From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.4 required=3.0 tests=FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 190AFC2BC61 for ; Tue, 30 Oct 2018 20:40:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B87F82081B for ; Tue, 30 Oct 2018 20:40:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B87F82081B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726750AbeJaFfF (ORCPT ); Wed, 31 Oct 2018 01:35:05 -0400 Received: from mail-it1-f200.google.com ([209.85.166.200]:53477 "EHLO mail-it1-f200.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725743AbeJaFfE (ORCPT ); Wed, 31 Oct 2018 01:35:04 -0400 Received: by mail-it1-f200.google.com with SMTP id f79-v6so13808821ita.3 for ; Tue, 30 Oct 2018 13:40:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:in-reply-to:message-id:subject :from:to; bh=YiT/1DAoDx7HhO61DB3QfZzctrUZLP52MPCXiwUzRSk=; b=jcDoPjznk1REJ76pUqCcLcR50wm+cF7EMFjYBLqDU1RfqFw56v53CMoaa8tEpXOCM6 TqL64tSvWeHxhBC3Wvdrj5OavLI41KFQXIi00LuKOifNiuHxuhHP2YM9uqwLRSUi6Tzt 3e+3CSUYlHnPAOjBhXqH9EBn9TqU3Y3JUPaw8vCoUO+vfD/ytkFk21TI/uTN39o6pb2l BJNoBCv62vqSbgFrW3NxoE5kdON7jHcXuuTzLd+Gb5sXYAXDatw+iPmvKf/6Hm9rcHEP E6tYXZuzs+IkS6oCTuO72OmBmmHWB6nLYrKfXoa+SEHOimMK6RyPwiF2pLmg2s7oKSKk aVeg== X-Gm-Message-State: AGRZ1gJZKkKehi97YpA2uYMi3DByuxBeZUR4VKi1fJ96LEU9/81ZRma7 xtlyCcQaM4t2MRbtusEWPjwlaBHXs8vfmWOc6zTXBqNWU3bA X-Google-Smtp-Source: AJdET5dk5HqMVRnkTmzHKZ+M4Sj/HPUnnbZIW1eFXrddc2VV7VIUKHqGzSecbQl5lsU1izj0WGxGvywjd8VO/P7SYKuJteSYr8/B MIME-Version: 1.0 X-Received: by 2002:a24:9883:: with SMTP id n125-v6mr106816itd.15.1540932003339; Tue, 30 Oct 2018 13:40:03 -0700 (PDT) Date: Tue, 30 Oct 2018 13:40:03 -0700 In-Reply-To: <00000000000003920305797785a0@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000aeaf8a057978304e@google.com> Subject: Re: general protection fault in __vb2_queue_free From: syzbot To: kyungmin.park@samsung.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, m.szyprowski@samsung.com, mchehab@kernel.org, pawel@osciak.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org syzbot has found a reproducer for the following crash on: HEAD commit: 11743c56785c Merge tag 'rpmsg-v4.20' of git://github.com/a.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14c8eb5b400000 kernel config: https://syzkaller.appspot.com/x/.config?x=93932074d01b4a5 dashboard link: https://syzkaller.appspot.com/bug?extid=e1fb118a2ebb88031d21 compiler: gcc (GCC) 8.0.1 20180413 (experimental) syz repro: https://syzkaller.appspot.com/x/repro.syz?x=158fdbcb400000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11d7d06d400000 IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+e1fb118a2ebb88031d21@syzkaller.appspotmail.com audit: type=1800 audit(1540931695.249:30): pid=5573 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 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: 5728 Comm: syz-executor006 Not tainted 4.19.0+ #88 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:ffff8801d2d77408 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffffffff113e0ac RDX: 0000000000000001 RSI: ffffffff854c11d9 RDI: 0000000000000009 RBP: ffff8801d2d77438 R08: ffff8801d4b246c0 R09: ffffed003a5d044e R10: ffff8801d2d77530 R11: ffff8801d2e82277 R12: ffffc90002551000 R13: 0000000000000000 R14: ffff8801cec5f380 R15: ffff8801cec5f380 FS: 0000000000000000(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000043e910 CR3: 000000000946a000 CR4: 00000000001406f0 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:415 [inline] __vb2_queue_free+0x4b1/0xa30 drivers/media/common/videobuf2/videobuf2-core.c:456 vb2_core_queue_release+0x62/0x80 drivers/media/common/videobuf2/videobuf2-core.c:2055 vb2_queue_release+0x15/0x20 drivers/media/common/videobuf2/videobuf2-v4l2.c:672 v4l2_m2m_ctx_release+0x1e/0x35 drivers/media/v4l2-core/v4l2-mem2mem.c:927 vicodec_release+0xbd/0x120 drivers/media/platform/vicodec/vicodec-core.c:1236 v4l2_release+0xfb/0x1a0 drivers/media/v4l2-core/v4l2-dev.c:448 __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:0x442d98 Code: Bad RIP value. RSP: 002b:00007ffc32d53f78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000442d98 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 894fb90190094ea9 ]--- 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:ffff8801d2d77408 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffffffff113e0ac RDX: 0000000000000001 RSI: ffffffff854c11d9 RDI: 0000000000000009 RBP: ffff8801d2d77438 R08: ffff8801d4b246c0 R09: ffffed003a5d044e R10: ffff8801d2d77530 R11: ffff8801d2e82277 R12: ffffc90002551000 R13: 0000000000000000 R14: ffff8801cec5f380 R15: ffff8801cec5f380 FS: 000000000073c880(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000442d6e CR3: 000000000946a000 CR4: 00000000001406f0