syzbot


WARNING in dma_buf_vunmap

Status: fixed on 2019/11/11 16:48
Subsystems: dri media
[Documentation on labels]
Reported-by: syzbot+a9317fe7ad261fc76b88@syzkaller.appspotmail.com
Fix commit: 62dcb4f41836 media: vb2: check memory model for VIDIOC_CREATE_BUFS
First crash: 1983d, last: 1945d
Cause bisection: introduced by (bisect log) :
commit d5e73f7be850323ae3adbbe84ed37a38b0c31476
Author: Mahesh Bandewar <maheshb@google.com>
Date: Wed Mar 8 18:55:51 2017 +0000

  bonding: restructure arp-monitor

Crash: KASAN: use-after-free Write in ida_get_new_above (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 62dcb4f41836bd3c44b5b651bb6df07ea4cb1551
Author: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Date: Thu Nov 8 12:23:37 2018 +0000

  media: vb2: check memory model for VIDIOC_CREATE_BUFS

  
Discussions (3)
Title Replies (including bot) Last reply
WARNING in dma_buf_vunmap 1 (5) 2019/11/11 13:54
Reminder: 35 open syzbot bugs in media subsystem 1 (1) 2019/07/24 01:39
Reminder: 28 open syzbot bugs in media subsystem 1 (1) 2019/06/27 03:53
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 WARNING in dma_buf_vunmap C inconclusive 61 570d 1828d 0/1 upstream: reported C repro on 2019/04/17 14:27

Sample crash report:
WARNING: CPU: 1 PID: 15807 at drivers/dma-buf/dma-buf.c:992 dma_buf_vunmap+0x1bb/0x220 drivers/dma-buf/dma-buf.c:992
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 15807 Comm: syz-executor654 Not tainted 4.20.0-rc2+ #334
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x244/0x39d lib/dump_stack.c:113
 panic+0x2ad/0x55c kernel/panic.c:188
 __warn.cold.8+0x20/0x45 kernel/panic.c:540
 report_bug+0x254/0x2d0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271
 do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:290
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:969
RIP: 0010:dma_buf_vunmap+0x1bb/0x220 drivers/dma-buf/dma-buf.c:992
Code: 00 00 00 00 e8 56 f2 27 fd 4c 89 f7 e8 7e 1f 77 03 e8 49 f2 27 fd 48 83 c4 08 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 35 f2 27 fd <0f> 0b eb e3 e8 2c f2 27 fd 0f 0b e8 25 f2 27 fd 0f 0b e8 1e f2 27
RSP: 0018:ffff8881c2c2f948 EFLAGS: 00010293
RAX: ffff8881bbffa680 RBX: 0000000000000000 RCX: ffffffff854cfa50
RDX: 0000000000000000 RSI: ffffffff845795ab RDI: 0000000000000000
RBP: ffff8881c2c2f978 R08: ffff8881bbffa680 R09: ffffed1037dbaa6e
R10: ffff8881c2c2fad0 R11: ffff8881bedd5377 R12: ffffc90009527000
R13: ffff8881c2ed9200 R14: ffff8881c2ed9268 R15: ffff8881c3f15d00
 vb2_vmalloc_detach_dmabuf+0x5a/0x80 drivers/media/common/videobuf2/videobuf2-vmalloc.c:406
 __vb2_plane_dmabuf_put.isra.5+0x122/0x310 drivers/media/common/videobuf2/videobuf2-core.c:275
 __vb2_buf_dmabuf_put drivers/media/common/videobuf2/videobuf2-core.c:291 [inline]
 __vb2_free_mem drivers/media/common/videobuf2/videobuf2-core.c:415 [inline]
 __vb2_queue_free+0x7f3/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+0x15/0x20 drivers/media/common/videobuf2/videobuf2-v4l2.c:837
 v4l2_m2m_ctx_release+0x1e/0x35 drivers/media/v4l2-core/v4l2-mem2mem.c:930
 vim2m_release+0xe6/0x150 drivers/media/platform/vim2m.c:977
 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
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166
 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
 do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x408251
Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 b4 17 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007fff710a16c0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000408251
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000004 R08: 0000000000000002 R09: 0000000000000000
R10: 00007fff710a16d0 R11: 0000000000000293 R12: 00000000000003e8
R13: 00000000006e5a1c R14: 00000000006e5a10 R15: 000000000000002d
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/15 08:16 upstream d41217aac0a5 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-root
2018/11/15 08:07 upstream d41217aac0a5 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce
2018/11/15 07:38 upstream d41217aac0a5 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2018/11/15 09:12 upstream d41217aac0a5 5f5f6d14 .config console log report syz C ci-upstream-kasan-gce-386
2018/11/15 08:05 linux-next 442b8cea2477 5f5f6d14 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2018/12/21 04:39 upstream 9097a058d49e 2b497001 .config console log report ci-upstream-kasan-gce-smack-root
2018/12/20 08:19 upstream ab63e725b49c 02e69052 .config console log report ci-upstream-kasan-gce-smack-root
2018/12/19 22:25 upstream 62393dbcbe0f fe2dc057 .config console log report ci-upstream-kasan-gce-root
2018/12/17 19:22 upstream 7566ec393f41 def91db3 .config console log report ci-upstream-kasan-gce-selinux-root
2018/12/16 00:38 upstream 6531e115b7ab def91db3 .config console log report ci-upstream-kasan-gce-selinux-root
2018/12/13 00:26 upstream f5d582777bcb 02613a41 .config console log report ci-upstream-kasan-gce-root
2018/12/12 03:06 upstream f5d582777bcb 7795ae03 .config console log report ci-upstream-kasan-gce-smack-root
2018/12/03 19:22 upstream 2595646791c3 819002b0 .config console log report ci-upstream-kasan-gce-smack-root
2018/11/29 01:42 upstream 121b018f8c74 4b6d14f2 .config console log report ci-upstream-kasan-gce-root
2018/11/25 16:15 upstream e195ca6cb6f2 3d3ec907 .config console log report ci-upstream-kasan-gce-selinux-root
2018/11/15 07:09 upstream d41217aac0a5 5f5f6d14 .config console log report ci-upstream-kasan-gce-selinux-root
2018/11/12 20:12 upstream ccda4af0f4b9 7b5f8621 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.