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.15.199' (ECDSA) to the list of known hosts. 2017/09/21 00:38:31 parsed 1 programs 2017/09/21 00:38:31 executed programs: 0 syzkaller login: [ 28.682435] dev_remove_pack: ffff8801c26819c0 not found [ 28.711436] ================================================================== [ 28.718877] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 28.725602] Read of size 8 at addr ffff8801c2f054e8 by task syz-executor5/5323 [ 28.732930] [ 28.734536] CPU: 0 PID: 5323 Comm: syz-executor5 Not tainted 4.13.0-mm1+ #7 [ 28.741606] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.750931] Call Trace: [ 28.753494] dump_stack+0x194/0x257 [ 28.757099] ? arch_local_irq_restore+0x53/0x53 [ 28.761743] ? show_regs_print_info+0x65/0x65 [ 28.766221] ? __dev_remove_pack+0x305/0x3b0 [ 28.770605] print_address_description+0x73/0x250 [ 28.775423] ? __dev_remove_pack+0x305/0x3b0 [ 28.779805] kasan_report+0x24e/0x340 [ 28.783584] __asan_report_load8_noabort+0x14/0x20 [ 28.788487] __dev_remove_pack+0x305/0x3b0 [ 28.792696] ? dev_get_by_name_rcu+0x270/0x270 [ 28.797253] ? refcount_sub_and_test+0x115/0x1b0 [ 28.801984] ? refcount_inc+0x50/0x50 [ 28.805769] __unregister_prot_hook+0x224/0x280 [ 28.810418] packet_release+0x8bb/0xd70 [ 28.814376] ? packet_set_ring+0x1b70/0x1b70 [ 28.818765] ? dentry_free+0xcd/0x130 [ 28.822560] ? rcu_read_lock_sched_held+0x108/0x120 [ 28.827554] ? kmem_cache_free+0x249/0x280 [ 28.831769] ? dentry_free+0xd2/0x130 [ 28.835550] ? locks_remove_file+0x3fa/0x5a0 [ 28.839934] ? fcntl_setlk+0x10d0/0x10d0 [ 28.843971] ? __fsnotify_parent+0xb4/0x3a0 [ 28.848269] ? fsnotify+0x1af0/0x1af0 [ 28.852054] sock_release+0x8d/0x1e0 [ 28.855745] ? sock_release+0x8d/0x1e0 [ 28.859607] ? sock_release+0x1e0/0x1e0 [ 28.863554] sock_close+0x16/0x20 [ 28.866983] __fput+0x333/0x7f0 [ 28.870245] ? fput+0x140/0x140 [ 28.873499] ? check_same_owner+0x320/0x320 [ 28.877794] ? _raw_spin_unlock_irq+0x27/0x70 [ 28.882272] ____fput+0x15/0x20 [ 28.885524] task_work_run+0x199/0x270 [ 28.889391] ? task_work_cancel+0x210/0x210 [ 28.893686] ? _raw_spin_unlock+0x22/0x30 [ 28.897807] ? switch_task_namespaces+0x87/0xc0 [ 28.902457] do_exit+0xa52/0x1b40 [ 28.905901] ? match_held_lock+0x9a1/0x9f0 [ 28.910110] ? mm_update_next_owner+0x930/0x930 [ 28.914769] ? lock_downgrade+0x990/0x990 [ 28.918891] ? lock_downgrade+0x990/0x990 [ 28.923026] ? release_sock+0x74/0x2a0 [ 28.926903] ? do_raw_spin_trylock+0x190/0x190 [ 28.931464] ? check_noncircular+0x20/0x20 [ 28.935672] ? __local_bh_enable_ip+0x9d/0x160 [ 28.940231] ? release_sock+0x1d4/0x2a0 [ 28.944179] ? trace_hardirqs_on+0xd/0x10 [ 28.948303] ? __local_bh_enable_ip+0x9d/0x160 [ 28.952863] ? _raw_spin_unlock_bh+0x30/0x40 [ 28.957246] ? release_sock+0x1d4/0x2a0 [ 28.961194] ? __release_sock+0x360/0x360 [ 28.965321] ? find_held_lock+0x39/0x1d0 [ 28.969369] ? lock_downgrade+0x990/0x990 [ 28.973491] ? recalc_sigpending_tsk+0x117/0x150 [ 28.978222] ? recalc_sigpending+0x103/0x160 [ 28.982604] ? recalc_sigpending_tsk+0x150/0x150 [ 28.987330] ? get_signal+0x397/0x17e0 [ 28.991207] do_group_exit+0x149/0x400 [ 28.995067] ? __lock_is_held+0xbc/0x140 [ 28.999101] ? SyS_exit+0x30/0x30 [ 29.002527] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.006998] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.011997] get_signal+0x7e8/0x17e0 [ 29.015724] ? ptrace_notify+0x130/0x130 [ 29.019762] ? __fget+0xbb/0x580 [ 29.023102] ? __lockdep_init_map+0xe4/0x650 [ 29.027491] ? lock_release+0xd70/0xd70 [ 29.031445] ? __lock_is_held+0xbc/0x140 [ 29.035497] do_signal+0x94/0x1ee0 [ 29.039027] ? iterate_fd+0x3f0/0x3f0 [ 29.042808] ? setup_sigcontext+0x7d0/0x7d0 [ 29.047108] ? __fdget+0x18/0x20 [ 29.050450] ? sockfd_lookup_light+0x104/0x150 [ 29.055021] ? __fget_light+0x29d/0x390 [ 29.058977] ? selinux_tun_dev_create+0xc0/0xc0 [ 29.063622] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 29.069307] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 29.074553] ? alloc_file+0x284/0x3a0 [ 29.078327] ? exit_to_usermode_loop+0x98/0x300 [ 29.082978] exit_to_usermode_loop+0x224/0x300 [ 29.087537] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 29.093062] syscall_return_slowpath+0x42f/0x500 [ 29.097798] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 29.102790] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 29.107694] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.112683] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 29.117423] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 29.122151] RIP: 0033:0x4520a9 [ 29.125314] RSP: 002b:00007f5da7302c08 EFLAGS: 00000216 ORIG_RAX: 0000000000000036 [ 29.132997] RAX: 0000000000000000 RBX: 0000000000718000 RCX: 00000000004520a9 [ 29.140243] RDX: 000000000000000d RSI: 0000000000000107 RDI: 0000000000000007 [ 29.147485] RBP: 0000000000005740 R08: 000000000000001c R09: 0000000000000000 [ 29.154727] R10: 00000000204fbfe4 R11: 0000000000000216 R12: 00000000004bb595 [ 29.161972] R13: 00000000ffffffff R14: 0000000000000007 R15: 0000000000000107 [ 29.169236] [ 29.170839] Allocated by task 5320: [ 29.174441] save_stack_trace+0x16/0x20 [ 29.178390] save_stack+0x43/0xd0 [ 29.181816] kasan_kmalloc+0xad/0xe0 [ 29.185501] kmem_cache_alloc_trace+0x136/0x750 [ 29.190142] fanout_add+0xa50/0x1190 [ 29.193830] packet_setsockopt+0xfdc/0x1e80 [ 29.198146] SyS_setsockopt+0x189/0x360 [ 29.202092] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 29.206817] [ 29.208417] Freed by task 5320: [ 29.211667] save_stack_trace+0x16/0x20 [ 29.215612] save_stack+0x43/0xd0 [ 29.219050] kasan_slab_free+0x71/0xc0 [ 29.222909] kfree+0xca/0x250 [ 29.225987] packet_release+0xa8f/0xd70 [ 29.229933] sock_release+0x8d/0x1e0 [ 29.233617] sock_close+0x16/0x20 [ 29.237043] __fput+0x333/0x7f0 [ 29.240294] ____fput+0x15/0x20 [ 29.243544] task_work_run+0x199/0x270 [ 29.247401] do_exit+0xa52/0x1b40 [ 29.250826] do_group_exit+0x149/0x400 [ 29.254684] get_signal+0x7e8/0x17e0 [ 29.258369] do_signal+0x94/0x1ee0 [ 29.261881] exit_to_usermode_loop+0x224/0x300 [ 29.266433] syscall_return_slowpath+0x42f/0x500 [ 29.271162] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 29.275889] [ 29.277490] The buggy address belongs to the object at ffff8801c2f04c40 [ 29.277490] which belongs to the cache kmalloc-4096 of size 4096 [ 29.290292] The buggy address is located 2216 bytes inside of [ 29.290292] 4096-byte region [ffff8801c2f04c40, ffff8801c2f05c40) [ 29.302307] The buggy address belongs to the page: [ 29.307211] page:ffffea00070bc100 count:1 mapcount:0 mapping:ffff8801c2f04c40 index:0x0 compound_mapcount: 0 [ 29.317160] flags: 0x200000000008100(slab|head) [ 29.321803] raw: 0200000000008100 ffff8801c2f04c40 0000000000000000 0000000100000001 [ 29.329657] raw: ffffea000709d9a0 ffffea00070ac220 ffff8801dac00dc0 0000000000000000 [ 29.337506] page dumped because: kasan: bad access detected [ 29.343185] [ 29.344787] Memory state around the buggy address: [ 29.349692] ffff8801c2f05380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.357031] ffff8801c2f05400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.364361] >ffff8801c2f05480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.371692] ^ [ 29.378415] ffff8801c2f05500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.385747] ffff8801c2f05580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.393075] ================================================================== [ 29.400402] Disabling lock debugging due to kernel taint [ 29.405920] Kernel panic - not syncing: panic_on_warn set ... [ 29.405920] [ 29.413262] CPU: 0 PID: 5323 Comm: syz-executor5 Tainted: G B 4.13.0-mm1+ #7 [ 29.421540] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.430871] Call Trace: [ 29.433431] dump_stack+0x194/0x257 [ 29.437031] ? arch_local_irq_restore+0x53/0x53 [ 29.441669] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 29.446396] ? __dev_remove_pack+0x2f0/0x3b0 [ 29.450773] panic+0x1e4/0x417 [ 29.453932] ? __warn+0x1d9/0x1d9 [ 29.457361] ? __dev_remove_pack+0x305/0x3b0 [ 29.461738] kasan_end_report+0x50/0x50 [ 29.465680] kasan_report+0x137/0x340 [ 29.469450] __asan_report_load8_noabort+0x14/0x20 [ 29.474344] __dev_remove_pack+0x305/0x3b0 [ 29.478546] ? dev_get_by_name_rcu+0x270/0x270 [ 29.483097] ? refcount_sub_and_test+0x115/0x1b0 [ 29.487824] ? refcount_inc+0x50/0x50 [ 29.491598] __unregister_prot_hook+0x224/0x280 [ 29.496240] packet_release+0x8bb/0xd70 [ 29.500189] ? packet_set_ring+0x1b70/0x1b70 [ 29.504565] ? dentry_free+0xcd/0x130 [ 29.508332] ? rcu_read_lock_sched_held+0x108/0x120 [ 29.513315] ? kmem_cache_free+0x249/0x280 [ 29.517521] ? dentry_free+0xd2/0x130 [ 29.521292] ? locks_remove_file+0x3fa/0x5a0 [ 29.525679] ? fcntl_setlk+0x10d0/0x10d0 [ 29.529710] ? __fsnotify_parent+0xb4/0x3a0 [ 29.534015] ? fsnotify+0x1af0/0x1af0 [ 29.537787] sock_release+0x8d/0x1e0 [ 29.541466] ? sock_release+0x8d/0x1e0 [ 29.545319] ? sock_release+0x1e0/0x1e0 [ 29.549259] sock_close+0x16/0x20 [ 29.552679] __fput+0x333/0x7f0 [ 29.555930] ? fput+0x140/0x140 [ 29.559179] ? check_same_owner+0x320/0x320 [ 29.563466] ? _raw_spin_unlock_irq+0x27/0x70 [ 29.567931] ____fput+0x15/0x20 [ 29.571176] task_work_run+0x199/0x270 [ 29.575031] ? task_work_cancel+0x210/0x210 [ 29.579324] ? _raw_spin_unlock+0x22/0x30 [ 29.583440] ? switch_task_namespaces+0x87/0xc0 [ 29.588081] do_exit+0xa52/0x1b40 [ 29.591509] ? match_held_lock+0x9a1/0x9f0 [ 29.595718] ? mm_update_next_owner+0x930/0x930 [ 29.600358] ? lock_downgrade+0x990/0x990 [ 29.604474] ? lock_downgrade+0x990/0x990 [ 29.608592] ? release_sock+0x74/0x2a0 [ 29.612450] ? do_raw_spin_trylock+0x190/0x190 [ 29.617002] ? check_noncircular+0x20/0x20 [ 29.621204] ? __local_bh_enable_ip+0x9d/0x160 [ 29.625765] ? release_sock+0x1d4/0x2a0 [ 29.629705] ? trace_hardirqs_on+0xd/0x10 [ 29.633823] ? __local_bh_enable_ip+0x9d/0x160 [ 29.638371] ? _raw_spin_unlock_bh+0x30/0x40 [ 29.642748] ? release_sock+0x1d4/0x2a0 [ 29.646691] ? __release_sock+0x360/0x360 [ 29.650807] ? find_held_lock+0x39/0x1d0 [ 29.654843] ? lock_downgrade+0x990/0x990 [ 29.658961] ? recalc_sigpending_tsk+0x117/0x150 [ 29.663687] ? recalc_sigpending+0x103/0x160 [ 29.668063] ? recalc_sigpending_tsk+0x150/0x150 [ 29.672784] ? get_signal+0x397/0x17e0 [ 29.676646] do_group_exit+0x149/0x400 [ 29.680499] ? __lock_is_held+0xbc/0x140