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-mmots-kasan-gce-2,10.128.0.59' (ECDSA) to the list of known hosts. 2017/09/19 17:44:37 parsed 1 programs 2017/09/19 17:44:37 executed programs: 0 syzkaller login: [ 32.778071] dev_remove_pack: ffff8801cf752bc0 not found [ 32.795306] ================================================================== [ 32.802754] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 32.809484] Read of size 8 at addr ffff8801ce160f68 by task syz-executor0/3006 [ 32.816813] [ 32.818421] CPU: 1 PID: 3006 Comm: syz-executor0 Not tainted 4.13.0-mm1+ #7 [ 32.825489] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.834814] Call Trace: [ 32.837379] dump_stack+0x194/0x257 [ 32.840986] ? arch_local_irq_restore+0x53/0x53 [ 32.845626] ? show_regs_print_info+0x65/0x65 [ 32.850099] ? __dev_remove_pack+0x305/0x3b0 [ 32.854483] print_address_description+0x73/0x250 [ 32.859296] ? __dev_remove_pack+0x305/0x3b0 [ 32.863675] kasan_report+0x24e/0x340 [ 32.867452] __asan_report_load8_noabort+0x14/0x20 [ 32.872351] __dev_remove_pack+0x305/0x3b0 [ 32.876558] ? dev_get_by_name_rcu+0x270/0x270 [ 32.881119] ? refcount_sub_and_test+0x115/0x1b0 [ 32.885857] __unregister_prot_hook+0x211/0x280 [ 32.890503] packet_release+0x8bb/0xd70 [ 32.894456] ? packet_set_ring+0x1b70/0x1b70 [ 32.898837] ? dentry_free+0xcd/0x130 [ 32.902610] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.907601] ? kmem_cache_free+0x249/0x280 [ 32.911810] ? dentry_free+0xd2/0x130 [ 32.915589] ? locks_remove_file+0x3fa/0x5a0 [ 32.919972] ? fcntl_setlk+0x10d0/0x10d0 [ 32.924007] ? __fsnotify_parent+0xb4/0x3a0 [ 32.928301] ? fsnotify+0x1af0/0x1af0 [ 32.932078] sock_release+0x8d/0x1e0 [ 32.935762] ? sock_release+0x8d/0x1e0 [ 32.939620] ? sock_release+0x1e0/0x1e0 [ 32.943565] sock_close+0x16/0x20 [ 32.946994] __fput+0x333/0x7f0 [ 32.950251] ? fput+0x140/0x140 [ 32.953503] ? check_same_owner+0x320/0x320 [ 32.957796] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.962268] ____fput+0x15/0x20 [ 32.965520] task_work_run+0x199/0x270 [ 32.969428] ? task_work_cancel+0x210/0x210 [ 32.973722] ? _raw_spin_unlock+0x22/0x30 [ 32.977845] ? switch_task_namespaces+0x87/0xc0 [ 32.982491] do_exit+0xa52/0x1b40 [ 32.985918] ? plist_check_list+0xa0/0xa0 [ 32.990050] ? plist_del+0x47b/0x990 [ 32.993738] ? mm_update_next_owner+0x930/0x930 [ 32.998379] ? plist_add+0x760/0x760 [ 33.002076] ? check_same_owner+0x320/0x320 [ 33.006375] ? find_held_lock+0x39/0x1d0 [ 33.010416] ? check_noncircular+0x20/0x20 [ 33.014621] ? lock_downgrade+0x990/0x990 [ 33.018838] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 33.024195] ? find_held_lock+0x39/0x1d0 [ 33.028273] ? lock_downgrade+0x990/0x990 [ 33.032394] ? recalc_sigpending_tsk+0x117/0x150 [ 33.037122] ? recalc_sigpending+0x103/0x160 [ 33.041502] ? recalc_sigpending_tsk+0x150/0x150 [ 33.046235] ? get_signal+0x397/0x17e0 [ 33.050106] do_group_exit+0x149/0x400 [ 33.053965] ? __lock_is_held+0xbc/0x140 [ 33.057998] ? SyS_exit+0x30/0x30 [ 33.061423] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.065894] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.071371] get_signal+0x7e8/0x17e0 [ 33.075086] ? ptrace_notify+0x130/0x130 [ 33.079121] ? __fget+0xbb/0x580 [ 33.082463] ? find_held_lock+0x39/0x1d0 [ 33.086499] ? lock_release+0xd70/0xd70 [ 33.090452] ? exit_robust_list+0x240/0x240 [ 33.094767] do_signal+0x94/0x1ee0 [ 33.098284] ? iterate_fd+0x3f0/0x3f0 [ 33.102061] ? setup_sigcontext+0x7d0/0x7d0 [ 33.106371] ? __fget_light+0x29d/0x390 [ 33.110321] ? selinux_tun_dev_create+0xc0/0xc0 [ 33.114974] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 33.120657] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 33.125906] ? exit_to_usermode_loop+0x98/0x300 [ 33.130551] exit_to_usermode_loop+0x224/0x300 [ 33.135107] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 33.140624] syscall_return_slowpath+0x42f/0x500 [ 33.145362] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 33.150355] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 33.155257] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.160251] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.164999] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 33.169724] RIP: 0033:0x4520a9 [ 33.172885] RSP: 002b:00007f79c634dcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 33.180565] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 00000000004520a9 [ 33.187805] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 33.195044] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 33.202283] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 33.209523] R13: 00007ffda4a4c2cf R14: 00007f79c634e9c0 R15: 0000000000000000 [ 33.216782] [ 33.218381] Allocated by task 3006: [ 33.221982] save_stack_trace+0x16/0x20 [ 33.225927] save_stack+0x43/0xd0 [ 33.229348] kasan_kmalloc+0xad/0xe0 [ 33.233030] kmem_cache_alloc_trace+0x136/0x750 [ 33.237670] fanout_add+0xa50/0x1190 [ 33.241359] packet_setsockopt+0xfdc/0x1e80 [ 33.245653] SyS_setsockopt+0x189/0x360 [ 33.249598] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.254320] [ 33.255920] Freed by task 3006: [ 33.259185] save_stack_trace+0x16/0x20 [ 33.263129] save_stack+0x43/0xd0 [ 33.266549] kasan_slab_free+0x71/0xc0 [ 33.270406] kfree+0xca/0x250 [ 33.273481] packet_release+0xa8f/0xd70 [ 33.277424] sock_release+0x8d/0x1e0 [ 33.281105] sock_close+0x16/0x20 [ 33.284529] __fput+0x333/0x7f0 [ 33.287774] ____fput+0x15/0x20 [ 33.291025] task_work_run+0x199/0x270 [ 33.294887] do_exit+0xa52/0x1b40 [ 33.298310] do_group_exit+0x149/0x400 [ 33.302170] get_signal+0x7e8/0x17e0 [ 33.305853] do_signal+0x94/0x1ee0 [ 33.309365] exit_to_usermode_loop+0x224/0x300 [ 33.313916] syscall_return_slowpath+0x42f/0x500 [ 33.318647] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 33.323372] [ 33.324972] The buggy address belongs to the object at ffff8801ce1606c0 [ 33.324972] which belongs to the cache kmalloc-4096 of size 4096 [ 33.337771] The buggy address is located 2216 bytes inside of [ 33.337771] 4096-byte region [ffff8801ce1606c0, ffff8801ce1616c0) [ 33.349787] The buggy address belongs to the page: [ 33.354688] page:ffffea0007385800 count:1 mapcount:0 mapping:ffff8801ce1606c0 index:0x0 compound_mapcount: 0 [ 33.364633] flags: 0x200000000008100(slab|head) [ 33.369273] raw: 0200000000008100 ffff8801ce1606c0 0000000000000000 0000000100000001 [ 33.377136] raw: ffffea00073857a0 ffffea00073858a0 ffff8801dac00dc0 0000000000000000 [ 33.384988] page dumped because: kasan: bad access detected [ 33.390663] [ 33.392260] Memory state around the buggy address: [ 33.397164] ffff8801ce160e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.404495] ffff8801ce160e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.411823] >ffff8801ce160f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.419165] ^ [ 33.425886] ffff8801ce160f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.433229] ffff8801ce161000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.440566] ================================================================== [ 33.447893] Disabling lock debugging due to kernel taint [ 33.453400] Kernel panic - not syncing: panic_on_warn set ... [ 33.453400] [ 33.460737] CPU: 1 PID: 3006 Comm: syz-executor0 Tainted: G B 4.13.0-mm1+ #7 [ 33.469016] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.478343] Call Trace: [ 33.480912] dump_stack+0x194/0x257 [ 33.484510] ? arch_local_irq_restore+0x53/0x53 [ 33.489164] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.493888] ? __dev_remove_pack+0x2f0/0x3b0 [ 33.498263] panic+0x1e4/0x417 [ 33.501424] ? __warn+0x1d9/0x1d9 [ 33.504850] ? __dev_remove_pack+0x305/0x3b0 [ 33.509224] kasan_end_report+0x50/0x50 [ 33.513162] kasan_report+0x137/0x340 [ 33.516940] __asan_report_load8_noabort+0x14/0x20 [ 33.521836] __dev_remove_pack+0x305/0x3b0 [ 33.526039] ? dev_get_by_name_rcu+0x270/0x270 [ 33.530588] ? refcount_sub_and_test+0x115/0x1b0 [ 33.535319] __unregister_prot_hook+0x211/0x280 [ 33.539967] packet_release+0x8bb/0xd70 [ 33.543911] ? packet_set_ring+0x1b70/0x1b70 [ 33.548284] ? dentry_free+0xcd/0x130 [ 33.552050] ? rcu_read_lock_sched_held+0x108/0x120 [ 33.557035] ? kmem_cache_free+0x249/0x280 [ 33.561237] ? dentry_free+0xd2/0x130 [ 33.565008] ? locks_remove_file+0x3fa/0x5a0 [ 33.569382] ? fcntl_setlk+0x10d0/0x10d0 [ 33.573410] ? __fsnotify_parent+0xb4/0x3a0 [ 33.577696] ? fsnotify+0x1af0/0x1af0 [ 33.581464] sock_release+0x8d/0x1e0 [ 33.585157] ? sock_release+0x8d/0x1e0 [ 33.589015] ? sock_release+0x1e0/0x1e0 [ 33.592954] sock_close+0x16/0x20 [ 33.596373] __fput+0x333/0x7f0 [ 33.599621] ? fput+0x140/0x140 [ 33.602867] ? check_same_owner+0x320/0x320 [ 33.607157] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.611619] ____fput+0x15/0x20 [ 33.614866] task_work_run+0x199/0x270 [ 33.618719] ? task_work_cancel+0x210/0x210 [ 33.623005] ? _raw_spin_unlock+0x22/0x30 [ 33.627120] ? switch_task_namespaces+0x87/0xc0 [ 33.631759] do_exit+0xa52/0x1b40 [ 33.635179] ? plist_check_list+0xa0/0xa0 [ 33.639297] ? plist_del+0x47b/0x990 [ 33.642978] ? mm_update_next_owner+0x930/0x930 [ 33.647611] ? plist_add+0x760/0x760 [ 33.651297] ? check_same_owner+0x320/0x320 [ 33.655590] ? find_held_lock+0x39/0x1d0 [ 33.659619] ? check_noncircular+0x20/0x20 [ 33.663820] ? lock_downgrade+0x990/0x990 [ 33.667944] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 33.673283] ? find_held_lock+0x39/0x1d0 [ 33.677313] ? lock_downgrade+0x990/0x990 [ 33.681430] ? recalc_sigpending_tsk+0x117/0x150 [ 33.686156] ? recalc_sigpending+0x103/0x160 [ 33.690554] ? recalc_sigpending_tsk+0x150/0x150 [ 33.695274] ? get_signal+0x397/0x17e0 [ 33.699132] do_group_exit+0x149/0x400 [ 33.702988] ? __lock_is_held+0xbc/0x140 [ 33.707016] ? SyS_exit+0x30/0x30 [ 33.710437] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.714903] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.719887] get_signal+0x7e8/0x17e0 [ 33.723580] ? ptrace_notify+0x130/0x130 [ 33.727608] ? __fget+0xbb/0x580 [ 33.730938] ? find_held_lock+0x39/0x1d0 [ 33.734966] ? lock_release+0xd70/0xd70 [ 33.738912] ? exit_robust_list+0x240/0x240 [ 33.743217] do_signal+0x94/0x1ee0 [ 33.746724] ? iterate_fd+0x3f0/0x3f0 [ 33.750491] ? setup_sigcontext+0x7d0/0x7d0 [ 33.754788] ? __fget_light+0x29d/0x390 [ 33.758732] ? selinux_tun_dev_create+0xc0/0xc0 [ 33.763369] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 33.769058] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 33.774301] ? exit_to_usermode_loop+0x98/0x300