serialport: Connected to syzkaller.us-central1-c.ci-upstream-kasan-gce-8 port 1 (session ID: 1de93d4d1d5bf531558d5fbdc25ab115109f8cbbd64ea92001b31279b244f979, active connections: 1). INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added 'ci-upstream-kasan-gce-8,10.128.0.59' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 52.008427] ================================================================== [ 52.009538] BUG: KASAN: use-after-free in irq_bypass_register_consumer+0x4f0/0x500 [ 52.010590] Read of size 8 at addr ffff8801cf1d9178 by task syzkaller948360/3420 [ 52.011649] [ 52.011882] CPU: 1 PID: 3420 Comm: syzkaller948360 Not tainted 4.13.0-rc4+ #23 [ 52.012859] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 52.014120] Call Trace: [ 52.014475] dump_stack+0x194/0x257 [ 52.014965] ? arch_local_irq_restore+0x53/0x53 [ 52.015602] ? show_regs_print_info+0x65/0x65 [ 52.016228] ? irq_bypass_register_consumer+0x4f0/0x500 [ 52.016955] print_address_description+0x7f/0x260 [ 52.017599] ? irq_bypass_register_consumer+0x4f0/0x500 [ 52.018310] kasan_report+0x24e/0x340 [ 52.018822] __asan_report_load8_noabort+0x14/0x20 [ 52.019476] irq_bypass_register_consumer+0x4f0/0x500 [ 52.020176] ? __disconnect+0x1a0/0x1a0 [ 52.020712] ? _raw_spin_unlock_irq+0x56/0x70 [ 52.021313] kvm_irqfd+0x137a/0x1d50 [ 52.021825] ? kvm_eventfd_init+0x2a0/0x2a0 [ 52.022418] ? __lock_acquire+0x6ef/0x3dc0 [ 52.022987] ? find_held_lock+0x35/0x1d0 [ 52.023534] ? __might_fault+0x110/0x1d0 [ 52.024076] ? lock_downgrade+0x990/0x990 [ 52.024643] ? lock_release+0xa40/0xa40 [ 52.025172] ? check_same_owner+0x320/0x320 [ 52.025747] ? check_noncircular+0x20/0x20 [ 52.026317] ? __might_sleep+0x95/0x190 [ 52.026855] ? kasan_check_write+0x14/0x20 [ 52.027420] ? _copy_from_user+0x99/0x110 [ 52.027996] kvm_vm_ioctl+0x1079/0x1c40 [ 52.028534] ? kvm_set_memory_region+0x50/0x50 [ 52.029149] ? __lock_is_held+0xb6/0x140 [ 52.033179] ? check_noncircular+0x20/0x20 [ 52.037378] ? lru_cache_add+0x1c7/0x3a0 [ 52.041401] ? check_noncircular+0x20/0x20 [ 52.045609] ? lru_cache_add_file+0x20/0x20 [ 52.049898] ? __alloc_pages_nodemask+0x9b0/0xc00 executing program [ 52.054711] ? page_add_new_anon_rmap+0x36c/0x750 [ 52.059530] ? find_held_lock+0x35/0x1d0 [ 52.063562] ? __fget+0x333/0x570 [ 52.066980] ? lock_downgrade+0x990/0x990 [ 52.071093] ? lock_release+0xa40/0xa40 [ 52.075047] ? __lock_is_held+0xb6/0x140 [ 52.079086] ? __fget+0x35c/0x570 [ 52.082510] ? iterate_fd+0x3f0/0x3f0 [ 52.086276] ? lock_acquire+0x1d5/0x580 [ 52.090233] ? find_held_lock+0x35/0x1d0 [ 52.094268] ? kvm_set_memory_region+0x50/0x50 [ 52.098816] do_vfs_ioctl+0x1b1/0x1520 [ 52.102669] ? __do_page_fault+0x51b/0xb60 [ 52.106873] ? ioctl_preallocate+0x2b0/0x2b0 [ 52.111250] ? selinux_capable+0x40/0x40 [ 52.115282] ? lookup_pmd_address+0xb6/0x2c0 [ 52.119662] ? downgrade_write+0x150/0x150 [ 52.123864] ? vmacache_find+0x61/0x270 [ 52.127816] ? security_file_ioctl+0x7d/0xb0 [ 52.132195] ? security_file_ioctl+0x89/0xb0 [ 52.136583] SyS_ioctl+0x8f/0xc0 [ 52.139952] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 52.144672] RIP: 0033:0x4460d9 [ 52.147834] RSP: 002b:00007f24ae19adc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 executing program [ 52.155508] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004460d9 [ 52.162745] RDX: 000000002000d000 RSI: 000000004020ae76 RDI: 000000000000002b [ 52.169979] RBP: 0000000000000086 R08: 00007f24ae19b700 R09: 00007f24ae19b700 [ 52.177218] R10: 00007f24ae19b700 R11: 0000000000000202 R12: 0000000000000000 [ 52.184464] R13: 00007ffe1847ef3f R14: 00007f24ae19b9c0 R15: 0000000000000000 [ 52.191719] [ 52.193310] Allocated by task 3420: [ 52.196905] save_stack_trace+0x16/0x20 [ 52.200842] save_stack+0x43/0xd0 [ 52.204258] kasan_kmalloc+0xaa/0xd0 [ 52.207935] kmem_cache_alloc_trace+0x101/0x6f0 [ 52.212574] kvm_irqfd+0x16c/0x1d50 [ 52.216166] kvm_vm_ioctl+0x1079/0x1c40 [ 52.220104] do_vfs_ioctl+0x1b1/0x1520 [ 52.223955] SyS_ioctl+0x8f/0xc0 [ 52.227286] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 52.232519] [ 52.234115] Freed by task 24: [ 52.237189] save_stack_trace+0x16/0x20 [ 52.241136] save_stack+0x43/0xd0 [ 52.244553] kasan_slab_free+0x6e/0xc0 [ 52.248411] kfree+0xd3/0x260 [ 52.251487] irqfd_shutdown+0x13c/0x1a0 executing program [ 52.255450] process_one_work+0xbf3/0x1bc0 [ 52.260368] worker_thread+0x223/0x1860 [ 52.264416] kthread+0x35e/0x430 [ 52.267780] ret_from_fork+0x2a/0x40 [ 52.271554] [ 52.273150] The buggy address belongs to the object at ffff8801cf1d9000 [ 52.273150] which belongs to the cache kmalloc-512 of size 512 [ 52.285833] The buggy address is located 376 bytes inside of [ 52.285833] 512-byte region [ffff8801cf1d9000, ffff8801cf1d9200) [ 52.297679] The buggy address belongs to the page: executing program [ 52.302585] page:ffffea000654e778 count:1 mapcount:0 mapping:ffff8801cf1d9000 index:0x0 [ 52.310697] flags: 0x200000000000100(slab) [ 52.314903] raw: 0200000000000100 ffff8801cf1d9000 0000000000000000 0000000100000006 [ 52.322749] raw: ffffea000654e648 ffffea0006560c48 ffff8801dbc00600 [ 52.329116] page dumped because: kasan: bad access detected [ 52.334788] [ 52.336384] Memory state around the buggy address: [ 52.341295] ffff8801cf1d9000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 52.348623] ffff8801cf1d9080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb executing program executing program executing program executing program executing program [ 52.355948] >ffff8801cf1d9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 52.363271] ^ [ 52.370562] ffff8801cf1d9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 52.377882] ffff8801cf1d9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 52.385213] ================================================================== [ 52.392533] Disabling lock debugging due to kernel taint [ 52.398031] Kernel panic - not syncing: panic_on_warn set ... [ 52.398031] [ 52.405372] CPU: 1 PID: 3420 Comm: syzkaller948360 Tainted: G B 4.13.0-rc4+ #23 [ 52.413911] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 52.423231] Call Trace: [ 52.425786] dump_stack+0x194/0x257 [ 52.429381] ? arch_local_irq_restore+0x53/0x53 [ 52.434017] ? kasan_end_report+0x32/0x50 [ 52.438138] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 52.442865] ? irq_bypass_register_consumer+0x480/0x500 [ 52.448200] panic+0x1e4/0x417 [ 52.451381] ? __warn+0x1d9/0x1d9 [ 52.454810] ? irq_bypass_register_consumer+0x4f0/0x500 [ 52.460144] kasan_end_report+0x50/0x50 [ 52.464085] kasan_report+0x137/0x340 [ 52.467853] __asan_report_load8_noabort+0x14/0x20 [ 52.472748] irq_bypass_register_consumer+0x4f0/0x500 [ 52.477901] ? __disconnect+0x1a0/0x1a0 [ 52.481840] ? _raw_spin_unlock_irq+0x56/0x70 [ 52.486299] kvm_irqfd+0x137a/0x1d50 [ 52.489982] ? kvm_eventfd_init+0x2a0/0x2a0 [ 52.494273] ? __lock_acquire+0x6ef/0x3dc0 [ 52.498471] ? find_held_lock+0x35/0x1d0 [ 52.502499] ? __might_fault+0x110/0x1d0 [ 52.506527] ? lock_downgrade+0x990/0x990 [ 52.510642] ? lock_release+0xa40/0xa40 [ 52.514583] ? check_same_owner+0x320/0x320 [ 52.518875] ? check_noncircular+0x20/0x20 [ 52.523079] ? __might_sleep+0x95/0x190 [ 52.527037] ? kasan_check_write+0x14/0x20 [ 52.531239] ? _copy_from_user+0x99/0x110 [ 52.535356] kvm_vm_ioctl+0x1079/0x1c40 [ 52.539304] ? kvm_set_memory_region+0x50/0x50 [ 52.543859] ? __lock_is_held+0xb6/0x140 [ 52.547903] ? check_noncircular+0x20/0x20 [ 52.552105] ? lru_cache_add+0x1c7/0x3a0 [ 52.556129] ? check_noncircular+0x20/0x20 [ 52.560325] ? lru_cache_add_file+0x20/0x20 [ 52.564613] ? __alloc_pages_nodemask+0x9b0/0xc00 [ 52.569420] ? page_add_new_anon_rmap+0x36c/0x750 [ 52.574232] ? find_held_lock+0x35/0x1d0 [ 52.578257] ? __fget+0x333/0x570 [ 52.581673] ? lock_downgrade+0x990/0x990 [ 52.585786] ? lock_release+0xa40/0xa40 [ 52.589723] ? __lock_is_held+0xb6/0x140 [ 52.593751] ? __fget+0x35c/0x570 [ 52.597169] ? iterate_fd+0x3f0/0x3f0 [ 52.600931] ? lock_acquire+0x1d5/0x580 [ 52.604869] ? find_held_lock+0x35/0x1d0 [ 52.608895] ? kvm_set_memory_region+0x50/0x50 [ 52.613438] do_vfs_ioctl+0x1b1/0x1520 [ 52.617289] ? __do_page_fault+0x51b/0xb60 [ 52.621489] ? ioctl_preallocate+0x2b0/0x2b0 [ 52.625865] ? selinux_capable+0x40/0x40 [ 52.629892] ? lookup_pmd_address+0xb6/0x2c0 [ 52.634264] ? downgrade_write+0x150/0x150 [ 52.638464] ? vmacache_find+0x61/0x270 [ 52.642408] ? security_file_ioctl+0x7d/0xb0 [ 52.646779] ? security_file_ioctl+0x89/0xb0 [ 52.651155] SyS_ioctl+0x8f/0xc0 [ 52.654491] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 52.659211] RIP: 0033:0x4460d9 [ 52.662367] RSP: 002b:00007f24ae19adc8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 52.670039] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004460d9 [ 52.677277] RDX: 000000002000d000 RSI: 000000004020ae76 RDI: 000000000000002b [ 52.684514] RBP: 0000000000000086 R08: 00007f24ae19b700 R09: 00007f24ae19b700 [ 52.691753] R10: 00007f24ae19b700 R11: 0000000000000202 R12: 0000000000000000 [ 52.698987] R13: 00007ffe1847ef3f R14: 00007f24ae19b9c0 R15: 0000000000000000 [ 52.706532] Dumping ftrace buffer: [ 52.710037] (ftrace buffer empty) [ 52.713710] Kernel Offset: disabled [ 52.717303] Rebooting in 86400 seconds..