syzbot


UBSAN: undefined-behaviour in intel_pmu_refresh

Status: upstream: reported C repro on 2020/09/17 01:38
Reported-by: syzbot+d19d5da4d11d50d2f314@syzkaller.appspotmail.com
First crash: 1346d, last: 1311d
Fix bisection: failed (error log, bisect log)
  

Sample crash report:
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.
================================================================================
UBSAN: Undefined behaviour in arch/x86/kvm/pmu_intel.c:299:45
shift exponent 194 is too large for 64-bit type 'long long unsigned int'
CPU: 1 PID: 6510 Comm: syz-executor342 Not tainted 4.19.149-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+0x22c/0x33e lib/dump_stack.c:118
 ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
 __ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
 intel_pmu_refresh.cold+0x9b/0xa0 arch/x86/kvm/pmu_intel.c:299
 kvm_update_cpuid+0x6d9/0xaf0 arch/x86/kvm/cpuid.c:147
 kvm_vcpu_ioctl_set_cpuid2+0x151/0x1c0 arch/x86/kvm/cpuid.c:255
 kvm_arch_vcpu_ioctl+0xfc0/0x2e10 arch/x86/kvm/x86.c:3931
 kvm_vcpu_ioctl+0x8af/0xe30 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2975
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440369
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 0f 83 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffceed943b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440369
RDX: 0000000020000540 RSI: 000000004008ae90 RDI: 0000000000000005
RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000401b70
R13: 0000000000401c00 R14: 0000000000000000 R15: 0000000000000000
================================================================================
================================================================================
UBSAN: Undefined behaviour in arch/x86/kvm/pmu_intel.c:301:13
shift exponent 248 is too large for 64-bit type 'long long unsigned int'
CPU: 1 PID: 6510 Comm: syz-executor342 Not tainted 4.19.149-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+0x22c/0x33e lib/dump_stack.c:118
 ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
 __ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
 intel_pmu_refresh.cold+0x75/0xa0 arch/x86/kvm/pmu_intel.c:301
 kvm_update_cpuid+0x6d9/0xaf0 arch/x86/kvm/cpuid.c:147
 kvm_vcpu_ioctl_set_cpuid2+0x151/0x1c0 arch/x86/kvm/cpuid.c:255
 kvm_arch_vcpu_ioctl+0xfc0/0x2e10 arch/x86/kvm/x86.c:3931
 kvm_vcpu_ioctl+0x8af/0xe30 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2975
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440369
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 0f 83 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffceed943b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440369
RDX: 0000000020000540 RSI: 000000004008ae90 RDI: 0000000000000005
RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000401b70
R13: 0000000000401c00 R14: 0000000000000000 R15: 0000000000000000
================================================================================
================================================================================
UBSAN: Undefined behaviour in arch/x86/kvm/pmu_intel.c:310:12
shift exponent 164 is too large for 64-bit type 'long long unsigned int'
CPU: 1 PID: 6510 Comm: syz-executor342 Not tainted 4.19.149-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+0x22c/0x33e lib/dump_stack.c:118
 ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
 __ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
 intel_pmu_refresh.cold+0x56/0xa0 arch/x86/kvm/pmu_intel.c:310
 kvm_update_cpuid+0x6d9/0xaf0 arch/x86/kvm/cpuid.c:147
 kvm_vcpu_ioctl_set_cpuid2+0x151/0x1c0 arch/x86/kvm/cpuid.c:255
 kvm_arch_vcpu_ioctl+0xfc0/0x2e10 arch/x86/kvm/x86.c:3931
 kvm_vcpu_ioctl+0x8af/0xe30 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2975
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440369
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 0f 83 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffceed943b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440369
RDX: 0000000020000540 RSI: 000000004008ae90 RDI: 0000000000000005
RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000401b70
R13: 0000000000401c00 R14: 0000000000000000 R15: 0000000000000000
================================================================

Crashes (914):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/04 18:38 linux-4.19.y b09c34517e1a 5ef9c291 .config console log report syz C ci2-linux-4-19
2020/09/20 19:17 linux-4.19.y 015e94d0e37b 9564d2e9 .config console log report syz C ci2-linux-4-19
2020/10/21 20:46 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 19:36 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 14:58 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 13:43 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 13:12 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 09:37 linux-4.19.y ad326970d25c e761439e .config console log report info ci2-linux-4-19
2020/10/21 06:32 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/21 05:18 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 22:01 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 20:45 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 17:32 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 06:20 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 04:20 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 02:53 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 19:40 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 19:20 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 11:51 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 07:47 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/19 02:30 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/19 00:29 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 23:26 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 21:57 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 17:15 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 16:06 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 15:16 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 13:17 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 11:25 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 09:55 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 05:39 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 03:57 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 02:28 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/17 21:38 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/17 18:53 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/17 17:45 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/17 13:30 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/17 12:15 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/17 06:29 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/17 05:12 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/17 04:23 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/17 02:23 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/16 22:44 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/16 14:19 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/16 10:38 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/10/16 09:22 linux-4.19.y a1b977b49b66 6e262c73 .config console log report info ci2-linux-4-19
2020/09/17 01:37 linux-4.19.y a87f96283793 8247808b .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.