syzbot


KMSAN: kernel-infoleak-after-free in drm_ioctl

Status: auto-obsoleted due to no activity on 2022/12/09 05:19
Subsystems: dri
[Documentation on labels]
First crash: 1434d, last: 1434d
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/12/09 01:31 20m retest repro https://github.com/google/kmsan.git master OK log
2022/08/30 17:27 6m retest repro https://github.com/google/kmsan.git master error OK

Sample crash report:
=====================================================
BUG: KMSAN: kernel-infoleak-after-free in kmsan_copy_to_user+0x81/0x90 mm/kmsan/kmsan_hooks.c:251
CPU: 0 PID: 16644 Comm: syz-executor.0 Not tainted 5.7.0-rc4-syzkaller #0
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+0x1c9/0x220 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
 kmsan_internal_check_memory+0x358/0x3d0 mm/kmsan/kmsan.c:457
 kmsan_copy_to_user+0x81/0x90 mm/kmsan/kmsan_hooks.c:251
 _copy_to_user+0x15a/0x1f0 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:174 [inline]
 drm_ioctl+0xceb/0x1230 drivers/gpu/drm/drm_ioctl.c:888
 drm_compat_ioctl+0x49a/0x530 drivers/gpu/drm/drm_ioc32.c:986
 __do_compat_sys_ioctl fs/ioctl.c:865 [inline]
 __se_compat_sys_ioctl+0x57c/0xed0 fs/ioctl.c:816
 __ia32_compat_sys_ioctl+0x4a/0x70 fs/ioctl.c:816
 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline]
 do_fast_syscall_32+0x3bf/0x6d0 arch/x86/entry/common.c:398
 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7fbedd9
Code: 90 e8 0b 00 00 00 f3 90 0f ae e8 eb f9 8d 74 26 00 89 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 002b:00000000f7fb90cc EFLAGS: 00000296 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000c02064b2
RDX: 0000000020000080 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310
 __msan_chain_origin+0x50/0x90 mm/kmsan/kmsan_instr.c:165
 vkms_dumb_create+0x44f/0x490 drivers/gpu/drm/vkms/vkms_gem.c:142
 drm_mode_create_dumb drivers/gpu/drm/drm_dumb_buffers.c:94 [inline]
 drm_mode_create_dumb_ioctl+0x41d/0x450 drivers/gpu/drm/drm_dumb_buffers.c:100
 drm_ioctl_kernel+0x597/0x700 drivers/gpu/drm/drm_ioctl.c:787
 drm_ioctl+0xc6f/0x1230 drivers/gpu/drm/drm_ioctl.c:887
 drm_compat_ioctl+0x49a/0x530 drivers/gpu/drm/drm_ioc32.c:986
 __do_compat_sys_ioctl fs/ioctl.c:865 [inline]
 __se_compat_sys_ioctl+0x57c/0xed0 fs/ioctl.c:816
 __ia32_compat_sys_ioctl+0x4a/0x70 fs/ioctl.c:816
 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline]
 do_fast_syscall_32+0x3bf/0x6d0 arch/x86/entry/common.c:398
 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127
 kmsan_slab_free+0x6e/0xb0 mm/kmsan/kmsan_hooks.c:105
 slab_free_freelist_hook mm/slub.c:1478 [inline]
 slab_free mm/slub.c:3051 [inline]
 kfree+0x562/0x30c0 mm/slub.c:4028
 vkms_gem_free_object+0xcb/0x130 drivers/gpu/drm/vkms/vkms_gem.c:42
 drm_gem_object_free drivers/gpu/drm/drm_gem.c:983 [inline]
 kref_put include/linux/kref.h:65 [inline]
 drm_gem_object_put_unlocked+0x484/0x7a0 drivers/gpu/drm/drm_gem.c:1017
 vkms_gem_create+0x3f4/0x440 drivers/gpu/drm/vkms/vkms_gem.c:116
 vkms_dumb_create+0x216/0x490 drivers/gpu/drm/vkms/vkms_gem.c:138
 drm_mode_create_dumb drivers/gpu/drm/drm_dumb_buffers.c:94 [inline]
 drm_mode_create_dumb_ioctl+0x41d/0x450 drivers/gpu/drm/drm_dumb_buffers.c:100
 drm_ioctl_kernel+0x597/0x700 drivers/gpu/drm/drm_ioctl.c:787
 drm_ioctl+0xc6f/0x1230 drivers/gpu/drm/drm_ioctl.c:887
 drm_compat_ioctl+0x49a/0x530 drivers/gpu/drm/drm_ioc32.c:986
 __do_compat_sys_ioctl fs/ioctl.c:865 [inline]
 __se_compat_sys_ioctl+0x57c/0xed0 fs/ioctl.c:816
 __ia32_compat_sys_ioctl+0x4a/0x70 fs/ioctl.c:816
 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline]
 do_fast_syscall_32+0x3bf/0x6d0 arch/x86/entry/common.c:398
 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139

Bytes 24-31 of 32 are uninitialized
Memory access of size 32 starts at ffffb09b812ebc40
Data copied to user address 0000000020000080
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/23 08:58 https://github.com/google/kmsan.git master 8b97c6271626 9682898d .config console log report syz ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.