syzbot


KASAN: null-ptr-deref Write in kvm_write_guest_virt_system

Status: fixed on 2019/12/12 05:11
Reported-by: syzbot+2bd67b417d81d09ef9d9@syzkaller.appspotmail.com
Fix commit: 2890b718f4a8 watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout
First crash: 1888d, last: 1870d
Fix bisection: fixed by (bisect log) :
commit 2890b718f4a8bab2b4e4ef773cecab2b99ddd5d6
Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date: Mon Aug 12 13:13:56 2019 +0000

  watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout

  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: null-ptr-deref Write in kvm_write_guest_virt_system C done 50 1870d 1888d 1/1 fixed on 2019/12/12 05:11

Sample crash report:
audit: type=1400 audit(1569232338.993:36): avc:  denied  { map } for  pid=6849 comm="syz-executor112" path="/root/syz-executor112931495" dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details.
==================================================================
BUG: KASAN: null-ptr-deref in memset include/linux/string.h:332 [inline]
BUG: KASAN: null-ptr-deref in kvm_write_guest_virt_system+0x64/0x90 arch/x86/kvm/x86.c:4730
Write of size 24 at addr           (null) by task syz-executor112/6849

CPU: 0 PID: 6849 Comm: syz-executor112 Not tainted 4.14.146 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x138/0x197 lib/dump_stack.c:53
 kasan_report_error mm/kasan/report.c:349 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0x127/0x2af mm/kasan/report.c:393
 check_memory_region_inline mm/kasan/kasan.c:260 [inline]
 check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
 memset+0x24/0x40 mm/kasan/kasan.c:285
 memset include/linux/string.h:332 [inline]
 kvm_write_guest_virt_system+0x64/0x90 arch/x86/kvm/x86.c:4730
 handle_vmread+0x548/0x730 arch/x86/kvm/vmx.c:8027
 vmx_handle_exit+0x20d/0x1330 arch/x86/kvm/vmx.c:9203
 vcpu_enter_guest+0xf28/0x5210 arch/x86/kvm/x86.c:7247
 vcpu_run arch/x86/kvm/x86.c:7310 [inline]
 kvm_arch_vcpu_ioctl_run+0x318/0x1000 arch/x86/kvm/x86.c:7477
 kvm_vcpu_ioctl+0x401/0xd10 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2611
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x443679
RSP: 002b:00007ffd4246e438 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffd4246e440 RCX: 0000000000443679
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000400f60 R09: 0000000000400f60
R10: 0000000020003800 R11: 0000000000000246 R12: 0000000000404720
R13: 00000000004047b0 R14: 0000000000000000 R15: 0000000000000000
==================================================================

Crashes (53):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/23 09:55 linux-4.14.y f6e27dbb1afa d96e88f3 .config console log report syz C ci2-linux-4-14
2019/10/11 06:36 linux-4.14.y 42327896f194 1a3bad90 .config console log report ci2-linux-4-14
2019/10/07 15:13 linux-4.14.y db1892238c55 28ac6e64 .config console log report ci2-linux-4-14
2019/10/07 07:08 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/07 04:43 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/07 02:02 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/06 15:52 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/06 14:32 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/06 11:40 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/06 10:03 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/06 06:35 linux-4.14.y db1892238c55 f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/05 06:36 linux-4.14.y f6e27dbb1afa f3f7d9c8 .config console log report ci2-linux-4-14
2019/10/04 05:36 linux-4.14.y f6e27dbb1afa fc17ba49 .config console log report ci2-linux-4-14
2019/10/04 04:07 linux-4.14.y f6e27dbb1afa fc17ba49 .config console log report ci2-linux-4-14
2019/10/03 21:35 linux-4.14.y f6e27dbb1afa fc17ba49 .config console log report ci2-linux-4-14
2019/10/03 02:00 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/03 01:55 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/03 01:07 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/03 00:27 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/02 15:54 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/02 15:54 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/02 15:33 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/02 15:32 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/02 15:32 linux-4.14.y f6e27dbb1afa 2e29b534 .config console log report ci2-linux-4-14
2019/10/02 04:54 linux-4.14.y f6e27dbb1afa b7a87a83 .config console log report ci2-linux-4-14
2019/10/02 04:49 linux-4.14.y f6e27dbb1afa b7a87a83 .config console log report ci2-linux-4-14
2019/10/02 04:02 linux-4.14.y f6e27dbb1afa b7a87a83 .config console log report ci2-linux-4-14
2019/10/02 01:57 linux-4.14.y f6e27dbb1afa b7a87a83 .config console log report ci2-linux-4-14
2019/10/01 22:59 linux-4.14.y f6e27dbb1afa b7a87a83 .config console log report ci2-linux-4-14
2019/10/01 22:57 linux-4.14.y f6e27dbb1afa b7a87a83 .config console log report ci2-linux-4-14
2019/09/30 09:27 linux-4.14.y f6e27dbb1afa c1ad5441 .config console log report ci2-linux-4-14
2019/09/30 09:15 linux-4.14.y f6e27dbb1afa c1ad5441 .config console log report ci2-linux-4-14
2019/09/30 09:14 linux-4.14.y f6e27dbb1afa c1ad5441 .config console log report ci2-linux-4-14
2019/09/30 09:09 linux-4.14.y f6e27dbb1afa c1ad5441 .config console log report ci2-linux-4-14
2019/09/29 22:45 linux-4.14.y f6e27dbb1afa c1ad5441 .config console log report ci2-linux-4-14
2019/09/29 18:47 linux-4.14.y f6e27dbb1afa c1ad5441 .config console log report ci2-linux-4-14
2019/09/29 05:55 linux-4.14.y f6e27dbb1afa eb6b9855 .config console log report ci2-linux-4-14
2019/09/29 02:16 linux-4.14.y f6e27dbb1afa eb6b9855 .config console log report ci2-linux-4-14
2019/09/29 02:10 linux-4.14.y f6e27dbb1afa eb6b9855 .config console log report ci2-linux-4-14
2019/09/29 02:05 linux-4.14.y f6e27dbb1afa eb6b9855 .config console log report ci2-linux-4-14
2019/09/29 01:45 linux-4.14.y f6e27dbb1afa eb6b9855 .config console log report ci2-linux-4-14
2019/09/28 04:05 linux-4.14.y f6e27dbb1afa d8074e0b .config console log report ci2-linux-4-14
2019/09/23 17:19 linux-4.14.y f6e27dbb1afa c68252d2 .config console log report ci2-linux-4-14
2019/09/23 12:44 linux-4.14.y f6e27dbb1afa d96e88f3 .config console log report ci2-linux-4-14
2019/09/23 11:36 linux-4.14.y f6e27dbb1afa d96e88f3 .config console log report ci2-linux-4-14
2019/09/23 07:21 linux-4.14.y f6e27dbb1afa d96e88f3 .config console log report ci2-linux-4-14
2019/09/23 07:10 linux-4.14.y f6e27dbb1afa d96e88f3 .config console log report ci2-linux-4-14
2019/09/23 07:09 linux-4.14.y f6e27dbb1afa d96e88f3 .config console log report ci2-linux-4-14
2019/09/23 07:05 linux-4.14.y f6e27dbb1afa d96e88f3 .config console log report ci2-linux-4-14
2019/09/23 07:03 linux-4.14.y f6e27dbb1afa d96e88f3 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.