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-7,10.128.0.43' (ECDSA) to the list of known hosts. 2017/09/16 15:53:14 parsed 1 programs 2017/09/16 15:53:14 executed programs: 0 syzkaller login: [ 50.300817] dev_remove_pack: ffff8801ccab5d00 not found [ 50.316386] ================================================================== [ 50.323779] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 50.330503] Read of size 8 at addr ffff8801ccb60b28 by task syz-executor0/3108 [ 50.337828] [ 50.339432] CPU: 1 PID: 3108 Comm: syz-executor0 Not tainted 4.13.0+ #87 [ 50.346238] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 50.355565] Call Trace: [ 50.358124] dump_stack+0x194/0x257 [ 50.361726] ? arch_local_irq_restore+0x53/0x53 [ 50.366367] ? show_regs_print_info+0x65/0x65 [ 50.370839] ? __dev_remove_pack+0x305/0x3b0 [ 50.375221] print_address_description+0x73/0x250 [ 50.380035] ? __dev_remove_pack+0x305/0x3b0 [ 50.384420] kasan_report+0x24e/0x340 [ 50.388197] __asan_report_load8_noabort+0x14/0x20 [ 50.393111] __dev_remove_pack+0x305/0x3b0 [ 50.397321] ? dev_get_by_name_rcu+0x270/0x270 [ 50.401878] ? refcount_sub_and_test+0x115/0x1b0 [ 50.406613] __unregister_prot_hook+0x211/0x280 [ 50.411272] packet_release+0x8bb/0xd70 [ 50.415227] ? packet_set_ring+0x1b70/0x1b70 [ 50.419608] ? lock_downgrade+0x990/0x990 [ 50.423752] ? locks_remove_file+0x3fa/0x5a0 [ 50.428136] ? fcntl_setlk+0x10d0/0x10d0 [ 50.432172] ? __fsnotify_parent+0xb4/0x3a0 [ 50.436469] ? fsnotify+0x1af0/0x1af0 [ 50.440253] sock_release+0x8d/0x1e0 [ 50.443938] ? sock_release+0x8d/0x1e0 [ 50.447797] ? sock_release+0x1e0/0x1e0 [ 50.451743] sock_close+0x16/0x20 [ 50.455166] __fput+0x333/0x7f0 [ 50.458422] ? fput+0x140/0x140 [ 50.461674] ? check_same_owner+0x320/0x320 [ 50.465965] ? _raw_spin_unlock_irq+0x27/0x70 [ 50.470437] ____fput+0x15/0x20 [ 50.473688] task_work_run+0x199/0x270 [ 50.477551] ? task_work_cancel+0x210/0x210 [ 50.481844] ? _raw_spin_unlock+0x22/0x30 [ 50.485964] ? switch_task_namespaces+0x87/0xc0 [ 50.490612] do_exit+0xa52/0x1b40 [ 50.494035] ? plist_check_list+0xa0/0xa0 [ 50.498167] ? plist_del+0x47b/0x990 [ 50.501855] ? mm_update_next_owner+0x930/0x930 [ 50.506505] ? plist_add+0x760/0x760 [ 50.510203] ? check_same_owner+0x320/0x320 [ 50.514505] ? find_held_lock+0x39/0x1d0 [ 50.518547] ? check_noncircular+0x20/0x20 [ 50.522754] ? lock_downgrade+0x990/0x990 [ 50.526876] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 50.532229] ? find_held_lock+0x39/0x1d0 [ 50.536275] ? lock_downgrade+0x990/0x990 [ 50.540484] ? recalc_sigpending_tsk+0x117/0x150 [ 50.545215] ? recalc_sigpending+0x103/0x160 [ 50.549604] ? recalc_sigpending_tsk+0x150/0x150 [ 50.554328] ? get_signal+0x397/0x17e0 [ 50.558199] do_group_exit+0x149/0x400 [ 50.562059] ? __lock_is_held+0xbc/0x140 [ 50.566092] ? SyS_exit+0x30/0x30 [ 50.569515] ? _raw_spin_unlock_irq+0x27/0x70 [ 50.573984] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 50.578974] get_signal+0x7e8/0x17e0 [ 50.582686] ? ptrace_notify+0x130/0x130 [ 50.586718] ? __fget+0xbb/0x580 [ 50.590061] ? lock_downgrade+0x990/0x990 [ 50.594184] ? lock_release+0xd70/0xd70 [ 50.598140] ? exit_robust_list+0x240/0x240 [ 50.602451] do_signal+0x94/0x1ee0 [ 50.605977] ? iterate_fd+0x3f0/0x3f0 [ 50.609752] ? setup_sigcontext+0x7d0/0x7d0 [ 50.614058] ? do_page_fault+0xee/0x720 [ 50.618008] ? __do_page_fault+0xb60/0xb60 [ 50.622218] ? __fget_light+0x29d/0x390 [ 50.626167] ? selinux_tun_dev_create+0xc0/0xc0 [ 50.630816] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 50.636500] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 50.641750] ? exit_to_usermode_loop+0x98/0x300 [ 50.646410] exit_to_usermode_loop+0x224/0x300 [ 50.650977] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 50.656508] syscall_return_slowpath+0x42f/0x500 [ 50.661242] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 50.666238] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 50.671150] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 50.676141] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 50.680892] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 50.685621] RIP: 0033:0x451e59 [ 50.688785] RSP: 002b:00007f6fe4bf2cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 50.696467] RAX: fffffffffffffe00 RBX: 0000000000718028 RCX: 0000000000451e59 [ 50.703719] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000718028 [ 50.710965] RBP: 0000000000718000 R08: 0000000000000000 R09: 0000000000000000 [ 50.718211] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 50.725462] R13: 00007ffc9d15e83f R14: 00007f6fe4bf39c0 R15: 0000000000000000 [ 50.732723] [ 50.734338] Allocated by task 3108: [ 50.737958] save_stack_trace+0x16/0x20 [ 50.741906] save_stack+0x43/0xd0 [ 50.745330] kasan_kmalloc+0xad/0xe0 [ 50.749016] kmem_cache_alloc_trace+0x136/0x750 [ 50.753658] fanout_add+0xa50/0x1190 [ 50.757352] packet_setsockopt+0xfdc/0x1e80 [ 50.761648] SyS_setsockopt+0x189/0x360 [ 50.765598] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 50.770322] [ 50.771919] Freed by task 3108: [ 50.775169] save_stack_trace+0x16/0x20 [ 50.779113] save_stack+0x43/0xd0 [ 50.782536] kasan_slab_free+0x71/0xc0 [ 50.786395] kfree+0xca/0x250 [ 50.789473] packet_release+0xa8f/0xd70 [ 50.793417] sock_release+0x8d/0x1e0 [ 50.797099] sock_close+0x16/0x20 [ 50.800523] __fput+0x333/0x7f0 [ 50.803772] ____fput+0x15/0x20 [ 50.807022] task_work_run+0x199/0x270 [ 50.810889] do_exit+0xa52/0x1b40 [ 50.814319] do_group_exit+0x149/0x400 [ 50.818186] get_signal+0x7e8/0x17e0 [ 50.821872] do_signal+0x94/0x1ee0 [ 50.825384] exit_to_usermode_loop+0x224/0x300 [ 50.829938] syscall_return_slowpath+0x42f/0x500 [ 50.834667] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 50.839391] [ 50.840992] The buggy address belongs to the object at ffff8801ccb60280 [ 50.840992] which belongs to the cache kmalloc-4096 of size 4096 [ 50.853790] The buggy address is located 2216 bytes inside of [ 50.853790] 4096-byte region [ffff8801ccb60280, ffff8801ccb61280) [ 50.865807] The buggy address belongs to the page: [ 50.870708] page:ffffea000732d800 count:1 mapcount:0 mapping:ffff8801ccb60280 index:0x0 compound_mapcount: 0 [ 50.880655] flags: 0x200000000008100(slab|head) [ 50.885302] raw: 0200000000008100 ffff8801ccb60280 0000000000000000 0000000100000001 [ 50.893163] raw: ffffea000732d7a0 ffffea000732da20 ffff8801dac00dc0 0000000000000000 [ 50.901022] page dumped because: kasan: bad access detected [ 50.906698] [ 50.908311] Memory state around the buggy address: [ 50.913303] ffff8801ccb60a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.920631] ffff8801ccb60a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.927964] >ffff8801ccb60b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.935295] ^ [ 50.939953] ffff8801ccb60b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.947284] ffff8801ccb60c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 50.954610] ================================================================== [ 50.961936] Disabling lock debugging due to kernel taint [ 50.967425] Kernel panic - not syncing: panic_on_warn set ... [ 50.967425] [ 50.974760] CPU: 1 PID: 3108 Comm: syz-executor0 Tainted: G B 4.13.0+ #87 [ 50.982776] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 50.992095] Call Trace: [ 50.994650] dump_stack+0x194/0x257 [ 50.998244] ? arch_local_irq_restore+0x53/0x53 [ 51.002879] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 51.007602] ? __dev_remove_pack+0x2f0/0x3b0 [ 51.011975] panic+0x1e4/0x417 [ 51.015132] ? __warn+0x1d9/0x1d9 [ 51.018558] ? __dev_remove_pack+0x305/0x3b0 [ 51.022929] kasan_end_report+0x50/0x50 [ 51.026876] kasan_report+0x137/0x340 [ 51.030643] __asan_report_load8_noabort+0x14/0x20 [ 51.035535] __dev_remove_pack+0x305/0x3b0 [ 51.039732] ? dev_get_by_name_rcu+0x270/0x270 [ 51.044278] ? refcount_sub_and_test+0x115/0x1b0 [ 51.049012] __unregister_prot_hook+0x211/0x280 [ 51.053652] packet_release+0x8bb/0xd70 [ 51.057594] ? packet_set_ring+0x1b70/0x1b70 [ 51.061966] ? lock_downgrade+0x990/0x990 [ 51.066085] ? locks_remove_file+0x3fa/0x5a0 [ 51.070465] ? fcntl_setlk+0x10d0/0x10d0 [ 51.074492] ? __fsnotify_parent+0xb4/0x3a0 [ 51.078776] ? fsnotify+0x1af0/0x1af0 [ 51.082551] sock_release+0x8d/0x1e0 [ 51.086229] ? sock_release+0x8d/0x1e0 [ 51.090080] ? sock_release+0x1e0/0x1e0 [ 51.094017] sock_close+0x16/0x20 [ 51.097432] __fput+0x333/0x7f0 [ 51.100678] ? fput+0x140/0x140 [ 51.103930] ? check_same_owner+0x320/0x320 [ 51.108214] ? _raw_spin_unlock_irq+0x27/0x70 [ 51.112685] ____fput+0x15/0x20 [ 51.115933] task_work_run+0x199/0x270 [ 51.119785] ? task_work_cancel+0x210/0x210 [ 51.124075] ? _raw_spin_unlock+0x22/0x30 [ 51.128200] ? switch_task_namespaces+0x87/0xc0 [ 51.132839] do_exit+0xa52/0x1b40 [ 51.136258] ? plist_check_list+0xa0/0xa0 [ 51.140374] ? plist_del+0x47b/0x990 [ 51.144054] ? mm_update_next_owner+0x930/0x930 [ 51.148687] ? plist_add+0x760/0x760 [ 51.152369] ? check_same_owner+0x320/0x320 [ 51.156657] ? find_held_lock+0x39/0x1d0 [ 51.160691] ? check_noncircular+0x20/0x20 [ 51.164888] ? lock_downgrade+0x990/0x990 [ 51.169004] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 51.174339] ? find_held_lock+0x39/0x1d0 [ 51.178371] ? lock_downgrade+0x990/0x990 [ 51.182482] ? recalc_sigpending_tsk+0x117/0x150 [ 51.187204] ? recalc_sigpending+0x103/0x160 [ 51.191579] ? recalc_sigpending_tsk+0x150/0x150 [ 51.196300] ? get_signal+0x397/0x17e0 [ 51.200165] do_group_exit+0x149/0x400 [ 51.204024] ? __lock_is_held+0xbc/0x140 [ 51.208051] ? SyS_exit+0x30/0x30 [ 51.211469] ? _raw_spin_unlock_irq+0x27/0x70 [ 51.215932] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 51.220916] get_signal+0x7e8/0x17e0 [ 51.224608] ? ptrace_notify+0x130/0x130 [ 51.228632] ? __fget+0xbb/0x580 [ 51.231964] ? lock_downgrade+0x990/0x990 [ 51.236078] ? lock_release+0xd70/0xd70 [ 51.240019] ? exit_robust_list+0x240/0x240 [ 51.244315] do_signal+0x94/0x1ee0 [ 51.247825] ? iterate_fd+0x3f0/0x3f0 [ 51.251598] ? setup_sigcontext+0x7d0/0x7d0 [ 51.255887] ? do_page_fault+0xee/0x720 [ 51.259826] ? __do_page_fault+0xb60/0xb60 [ 51.264043] ? __fget_light+0x29d/0x390 [ 51.267984] ? selinux_tun_dev_create+0xc0/0xc0 [ 51.272617] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 51.278290] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 51.283530] ? exit_to_usermode_loop+0x98/0x300 [ 51.288165] exit_to_usermode_loop+0x224/0x300 [ 51.292717] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 51.298222] syscall_return_slowpath+0x42f/0x500