syzbot


KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl

Status: fixed on 2021/03/10 01:48
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com
Fix commit: 31dcb6c30a26 misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells()
First crash: 1428d, last: 1343d
Discussions (14)
Title Replies (including bot) Last reply
[PATCH 5.4 00/47] 5.4.87-rc1 review 58 (58) 2021/02/26 14:21
[PATCH 4.14 00/29] 4.14.214-rc1 review 32 (32) 2021/01/08 17:38
[PATCH 4.4 00/19] 4.4.250-rc1 review 21 (21) 2021/01/08 01:13
[PATCH 4.9 00/32] 4.9.250-rc1 review 33 (33) 2021/01/07 14:16
[PATCH 5.10 00/63] 5.10.5-rc1 review 75 (75) 2021/01/07 08:13
[PATCH 4.19 00/35] 4.19.165-rc1 review 44 (44) 2021/01/06 13:46
[PATCH 4.19 00/29] 4.19.165-rc2 review 36 (36) 2021/01/06 13:46
[PATCH AUTOSEL 5.4 001/130] soc: aspeed-lpc-ctrl: Fail probe of lpc-ctrl if reserved memory is not aligned 140 (140) 2021/01/06 07:33
[PATCH AUTOSEL 4.14 01/66] locks: Fix UBSAN undefined behaviour in flock64_to_posix_lock 70 (70) 2020/12/23 15:31
[PATCH AUTOSEL 4.4 01/38] locks: Fix UBSAN undefined behaviour in flock64_to_posix_lock 40 (40) 2020/12/23 14:14
[PATCH AUTOSEL 4.9 01/48] locks: Fix UBSAN undefined behaviour in flock64_to_posix_lock 48 (48) 2020/12/23 02:24
[PATCH AUTOSEL 4.19 01/87] locks: Fix UBSAN undefined behaviour in flock64_to_posix_lock 87 (87) 2020/12/23 02:21
[PATCH] misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() 1 (1) 2020/11/22 22:45
KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl 0 (1) 2020/11/17 09:00
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl (2) kernel C 2 747d 747d 22/28 fixed on 2023/02/24 13:50
Last patch testing requests (2)
Created Duration User Patch Repo Result
2020/11/22 22:10 14m anant.thazhemadam@gmail.com https://github.com/google/kmsan.git master report log
2020/11/22 18:42 22m anant.thazhemadam@gmail.com patch https://github.com/google/kmsan.git master OK

Sample crash report:
=====================================================
BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x9c/0xb0 mm/kmsan/kmsan_hooks.c:249
CPU: 0 PID: 8217 Comm: syz-executor698 Not tainted 5.10.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+0x21c/0x280 lib/dump_stack.c:118
 kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118
 kmsan_internal_check_memory+0x484/0x520 mm/kmsan/kmsan.c:437
 kmsan_copy_to_user+0x9c/0xb0 mm/kmsan/kmsan_hooks.c:249
 instrument_copy_to_user include/linux/instrumented.h:121 [inline]
 _copy_to_user+0x1ac/0x270 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:209 [inline]
 vmci_host_do_ctx_get_cpt_state drivers/misc/vmw_vmci/vmci_host.c:723 [inline]
 vmci_host_unlocked_ioctl+0x3489/0x59b0 drivers/misc/vmw_vmci/vmci_host.c:939
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0x311/0x4d0 fs/ioctl.c:739
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:739
 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x442879
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdb193eb18 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 0000000000442879
RDX: 0000000020001540 RSI: 00000000000007b1 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007ffdb193ecb8 R09: 00007ffdb193ecb8
R10: 00007ffdb193ecb8 R11: 0000000000000246 R12: 0000000000406100
R13: 431bde82d7b634db R14: 00000000004b0018 R15: 0000000000400488

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline]
 kmsan_internal_poison_shadow+0x5c/0xf0 mm/kmsan/kmsan.c:104
 kmsan_slab_alloc+0x8d/0xe0 mm/kmsan/kmsan_hooks.c:76
 slab_alloc_node mm/slub.c:2906 [inline]
 slab_alloc mm/slub.c:2915 [inline]
 __kmalloc+0x307/0x550 mm/slub.c:3983
 kmalloc include/linux/slab.h:557 [inline]
 vmci_ctx_get_chkpt_doorbells drivers/misc/vmw_vmci/vmci_context.c:746 [inline]
 vmci_ctx_get_chkpt_state+0x6fe/0xf20 drivers/misc/vmw_vmci/vmci_context.c:798
 vmci_host_do_ctx_get_cpt_state drivers/misc/vmw_vmci/vmci_host.c:719 [inline]
 vmci_host_unlocked_ioctl+0x2e05/0x59b0 drivers/misc/vmw_vmci/vmci_host.c:939
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0x311/0x4d0 fs/ioctl.c:739
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:739
 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Bytes 8-15 of 16 are uninitialized
Memory access of size 16 starts at ffff888125ea7100
Data copied to user address 0000000020000540
=====================================================

Crashes (22):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/04 17:35 https://github.com/google/kmsan.git master 73d62e81b476 42b90a7c .config console log report syz C ci-upstream-kmsan-gce KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl
2020/11/16 22:27 https://github.com/google/kmsan.git master 73d62e81b476 1bf9a662 .config console log report syz C ci-upstream-kmsan-gce
2021/02/09 11:35 https://github.com/google/kmsan.git master 73d62e81b476 2bd9619f .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl
2021/01/27 05:29 https://github.com/google/kmsan.git master 73d62e81b476 55a7d4df .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl
2021/01/27 05:29 https://github.com/google/kmsan.git master 73d62e81b476 55a7d4df .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl
2021/01/27 05:12 https://github.com/google/kmsan.git master 73d62e81b476 55a7d4df .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl
2021/01/22 09:56 https://github.com/google/kmsan.git master 73d62e81b476 d4f4eca5 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl
2021/01/22 08:42 https://github.com/google/kmsan.git master 73d62e81b476 d4f4eca5 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl
2021/01/22 08:42 https://github.com/google/kmsan.git master 73d62e81b476 d4f4eca5 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in vmci_host_unlocked_ioctl
2021/01/14 10:34 https://github.com/google/kmsan.git master 73d62e81b476 269d24e8 .config console log report info ci-upstream-kmsan-gce
2021/01/14 10:34 https://github.com/google/kmsan.git master 73d62e81b476 269d24e8 .config console log report info ci-upstream-kmsan-gce
2020/12/21 09:06 https://github.com/google/kmsan.git master 73d62e81b476 04201c06 .config console log report info ci-upstream-kmsan-gce
2020/12/14 21:34 https://github.com/google/kmsan.git master 73d62e81b476 97183ed7 .config console log report info ci-upstream-kmsan-gce
2020/12/14 21:19 https://github.com/google/kmsan.git master 73d62e81b476 97183ed7 .config console log report info ci-upstream-kmsan-gce
2020/12/14 21:10 https://github.com/google/kmsan.git master 73d62e81b476 97183ed7 .config console log report info ci-upstream-kmsan-gce
2020/12/14 21:09 https://github.com/google/kmsan.git master 73d62e81b476 97183ed7 .config console log report info ci-upstream-kmsan-gce
2020/12/14 21:09 https://github.com/google/kmsan.git master 73d62e81b476 97183ed7 .config console log report info ci-upstream-kmsan-gce
2020/12/10 18:01 https://github.com/google/kmsan.git master 73d62e81b476 f900b48c .config console log report info ci-upstream-kmsan-gce
2020/12/10 11:23 https://github.com/google/kmsan.git master 73d62e81b476 c090b4da .config console log report info ci-upstream-kmsan-gce
2020/12/06 17:27 https://github.com/google/kmsan.git master 73d62e81b476 f12ba0c5 .config console log report info ci-upstream-kmsan-gce
2020/12/06 15:08 https://github.com/google/kmsan.git master 73d62e81b476 f12ba0c5 .config console log report info ci-upstream-kmsan-gce
2020/11/16 19:25 https://github.com/google/kmsan.git master 73d62e81b476 1bf9a662 .config console log report info ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.