Debian GNU/Linux 7 syzkaller ttyS0 2017/09/07 18:33:06 parsed 1 programs 2017/09/07 18:33:06 executed programs: 0 syzkaller login: [ 25.016211] dev_remove_pack: ffff880067e7e840 not found [ 25.032245] ================================================================== [ 25.032841] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 25.033316] Read of size 8 at addr ffff88006c9069e8 by task syz-executor0/3004 [ 25.033878] [ 25.033995] CPU: 2 PID: 3004 Comm: syz-executor0 Not tainted 4.13.0-next-20170907+ #17 [ 25.034566] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 25.035170] Call Trace: [ 25.035358] dump_stack+0x194/0x257 [ 25.035612] ? arch_local_irq_restore+0x53/0x53 [ 25.035943] ? show_regs_print_info+0x65/0x65 [ 25.036259] ? __dev_remove_pack+0x305/0x3b0 [ 25.036564] print_address_description+0x73/0x250 [ 25.036933] ? __dev_remove_pack+0x305/0x3b0 [ 25.037238] kasan_report+0x24e/0x340 [ 25.037502] __asan_report_load8_noabort+0x14/0x20 [ 25.037880] __dev_remove_pack+0x305/0x3b0 [ 25.038258] ? dev_get_by_name_rcu+0x270/0x270 [ 25.038601] ? refcount_sub_and_test+0x115/0x1b0 [ 25.038945] __unregister_prot_hook+0x211/0x280 [ 25.039354] packet_release+0x8bb/0xd70 [ 25.039687] ? packet_set_ring+0x1b70/0x1b70 [ 25.040000] ? lock_downgrade+0x990/0x990 [ 25.040321] ? lockref_put_or_lock+0x19/0x80 [ 25.040630] ? do_raw_spin_trylock+0x190/0x190 [ 25.040957] ? locks_remove_file+0x3fa/0x5a0 [ 25.041348] ? fcntl_setlk+0x10d0/0x10d0 [ 25.041644] ? __fsnotify_parent+0xb4/0x3a0 [ 25.041993] ? fsnotify+0x1af0/0x1af0 [ 25.042308] ? _raw_spin_unlock+0x22/0x30 [ 25.042664] sock_release+0x8d/0x1e0 [ 25.043211] ? sock_release+0x8d/0x1e0 [ 25.043495] ? sock_release+0x1e0/0x1e0 [ 25.043781] sock_close+0x16/0x20 [ 25.044020] __fput+0x333/0x7f0 [ 25.044265] ? fput+0x140/0x140 [ 25.044493] ? check_same_owner+0x320/0x320 [ 25.044801] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.045209] ____fput+0x15/0x20 [ 25.045483] task_work_run+0x199/0x270 [ 25.045756] ? task_work_cancel+0x210/0x210 [ 25.046084] ? _raw_spin_unlock+0x22/0x30 [ 25.046373] ? switch_task_namespaces+0x87/0xc0 [ 25.046700] do_exit+0xa52/0x1b40 [ 25.046940] ? plist_check_list+0xa0/0xa0 [ 25.047342] ? plist_del+0x47b/0x990 [ 25.047723] ? mm_update_next_owner+0x930/0x930 [ 25.048280] ? plist_add+0x760/0x760 [ 25.048684] ? check_same_owner+0x320/0x320 [ 25.049018] ? find_held_lock+0x39/0x1d0 [ 25.049399] ? check_noncircular+0x20/0x20 [ 25.049723] ? lock_downgrade+0x990/0x990 [ 25.050014] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 25.050517] ? find_held_lock+0x39/0x1d0 [ 25.050897] ? lock_downgrade+0x990/0x990 [ 25.051333] ? recalc_sigpending_tsk+0x117/0x150 [ 25.051781] ? recalc_sigpending+0x103/0x160 [ 25.052224] ? recalc_sigpending_tsk+0x150/0x150 [ 25.052684] ? get_signal+0x397/0x17e0 [ 25.053115] do_group_exit+0x149/0x400 [ 25.053552] ? __lock_is_held+0xbc/0x140 [ 25.053951] ? SyS_exit+0x30/0x30 [ 25.054348] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.054803] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.055323] get_signal+0x7e8/0x17e0 [ 25.055687] ? ptrace_notify+0x130/0x130 [ 25.056059] ? __fget+0xbb/0x580 [ 25.056474] ? __lockdep_init_map+0xe4/0x650 [ 25.057015] ? lock_release+0xd70/0xd70 [ 25.057424] ? exit_robust_list+0x240/0x240 [ 25.057778] do_signal+0x94/0x1ee0 [ 25.058033] ? iterate_fd+0x3f0/0x3f0 [ 25.058387] ? setup_sigcontext+0x7d0/0x7d0 [ 25.058787] ? __lock_is_held+0xbc/0x140 [ 25.059145] ? __fget_light+0x29d/0x390 [ 25.059553] ? selinux_tun_dev_create+0xc0/0xc0 [ 25.059893] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 25.060288] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.060689] ? alloc_file+0x284/0x3a0 [ 25.060953] ? exit_to_usermode_loop+0x98/0x300 [ 25.061328] exit_to_usermode_loop+0x224/0x300 [ 25.061678] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 25.062110] syscall_return_slowpath+0x42f/0x500 [ 25.062482] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 25.062871] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 25.063275] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.063654] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.064030] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 25.064352] RIP: 0033:0x447299 [ 25.064894] RSP: 002b:00007fd02ba7fcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 25.065485] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 25.066041] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 25.066566] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 25.067095] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 25.067619] R13: 0000000000000000 R14: 00007fd02ba809c0 R15: 00007fd02ba80700 [ 25.068170] [ 25.068304] Allocated by task 3003: [ 25.068559] save_stack_trace+0x16/0x20 [ 25.068837] save_stack+0x43/0xd0 [ 25.069079] kasan_kmalloc+0xad/0xe0 [ 25.069365] kmem_cache_alloc_trace+0x136/0x750 [ 25.069716] fanout_add+0xa50/0x1190 [ 25.070016] packet_setsockopt+0xfdc/0x1e80 [ 25.070359] SyS_setsockopt+0x189/0x360 [ 25.070718] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 25.071092] [ 25.071259] Freed by task 3004: [ 25.071560] save_stack_trace+0x16/0x20 [ 25.071958] save_stack+0x43/0xd0 [ 25.072325] kasan_slab_free+0x71/0xc0 [ 25.072715] kfree+0xca/0x250 [ 25.072949] packet_release+0xa8f/0xd70 [ 25.073226] sock_release+0x8d/0x1e0 [ 25.073540] sock_close+0x16/0x20 [ 25.073783] __fput+0x333/0x7f0 [ 25.074014] ____fput+0x15/0x20 [ 25.074243] task_work_run+0x199/0x270 [ 25.074513] do_exit+0xa52/0x1b40 [ 25.074786] do_group_exit+0x149/0x400 [ 25.075064] get_signal+0x7e8/0x17e0 [ 25.075325] do_signal+0x94/0x1ee0 [ 25.075574] exit_to_usermode_loop+0x224/0x300 [ 25.075893] syscall_return_slowpath+0x42f/0x500 [ 25.076224] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 25.076553] [ 25.076709] The buggy address belongs to the object at ffff88006c906140 [ 25.076709] which belongs to the cache kmalloc-4096 of size 4096 [ 25.077614] The buggy address is located 2216 bytes inside of [ 25.077614] 4096-byte region [ffff88006c906140, ffff88006c907140) [ 25.078459] The buggy address belongs to the page: [ 25.078798] page:ffffea0001b24180 count:1 mapcount:0 mapping:ffff88006c906140 index:0x0 compound_mapcount: 0 [ 25.079517] flags: 0x500000000008100(slab|head) [ 25.079841] raw: 0500000000008100 ffff88006c906140 0000000000000000 0000000100000001 [ 25.080391] raw: ffffea00019f44a0 ffff88006d800a50 ffff88003e800dc0 0000000000000000 [ 25.080927] page dumped because: kasan: bad access detected [ 25.081318] [ 25.081435] Memory state around the buggy address: [ 25.081776] ffff88006c906880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.082280] ffff88006c906900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.082809] >ffff88006c906980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.083330] ^ [ 25.083891] ffff88006c906a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.084467] ffff88006c906a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.085052] ================================================================== [ 25.086344] Disabling lock debugging due to kernel taint [ 25.086867] Kernel panic - not syncing: panic_on_warn set ... [ 25.086867] [ 25.087548] CPU: 2 PID: 3004 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170907+ #17 [ 25.088216] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 25.088970] Call Trace: [ 25.089216] dump_stack+0x194/0x257 [ 25.089597] ? arch_local_irq_restore+0x53/0x53 [ 25.090071] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.090537] ? __dev_remove_pack+0x2f0/0x3b0 [ 25.090855] panic+0x1e4/0x417 [ 25.091112] ? __warn+0x1d9/0x1d9 [ 25.091468] ? __dev_remove_pack+0x305/0x3b0 [ 25.091815] kasan_end_report+0x50/0x50 [ 25.092167] kasan_report+0x137/0x340 [ 25.092433] __asan_report_load8_noabort+0x14/0x20 [ 25.092802] __dev_remove_pack+0x305/0x3b0 [ 25.093112] ? dev_get_by_name_rcu+0x270/0x270 [ 25.093523] ? refcount_sub_and_test+0x115/0x1b0 [ 25.093915] __unregister_prot_hook+0x211/0x280 [ 25.094269] packet_release+0x8bb/0xd70 [ 25.094566] ? packet_set_ring+0x1b70/0x1b70 [ 25.094902] ? lock_downgrade+0x990/0x990 [ 25.095213] ? lockref_put_or_lock+0x19/0x80 [ 25.095557] ? do_raw_spin_trylock+0x190/0x190 [ 25.095890] ? locks_remove_file+0x3fa/0x5a0 [ 25.096204] ? fcntl_setlk+0x10d0/0x10d0 [ 25.096489] ? __fsnotify_parent+0xb4/0x3a0 [ 25.096794] ? fsnotify+0x1af0/0x1af0 [ 25.097081] ? _raw_spin_unlock+0x22/0x30 [ 25.097385] sock_release+0x8d/0x1e0 [ 25.097657] ? sock_release+0x8d/0x1e0 [ 25.097963] ? sock_release+0x1e0/0x1e0 [ 25.098306] sock_close+0x16/0x20 [ 25.098603] __fput+0x333/0x7f0 [ 25.098857] ? fput+0x140/0x140 [ 25.099169] ? check_same_owner+0x320/0x320 [ 25.099538] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.099900] ____fput+0x15/0x20 [ 25.100171] task_work_run+0x199/0x270 [ 25.100473] ? task_work_cancel+0x210/0x210 [ 25.100792] ? _raw_spin_unlock+0x22/0x30 [ 25.101109] ? switch_task_namespaces+0x87/0xc0 [ 25.101457] do_exit+0xa52/0x1b40 [ 25.101739] ? plist_check_list+0xa0/0xa0 [ 25.102062] ? plist_del+0x47b/0x990 [ 25.102409] ? mm_update_next_owner+0x930/0x930 [ 25.102786] ? plist_add+0x760/0x760 [ 25.103079] ? check_same_owner+0x320/0x320 [ 25.103087] ? find_held_lock+0x39/0x1d0 [ 25.103094] ? check_noncircular+0x20/0x20 [ 25.103097] ? lock_downgrade+0x990/0x990 [ 25.103101] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 25.103111] ? find_held_lock+0x39/0x1d0 [ 25.103118] ? lock_downgrade+0x990/0x990 [ 25.103122] ? recalc_sigpending_tsk+0x117/0x150 [ 25.103125] ? recalc_sigpending+0x103/0x160 [ 25.103128] ? recalc_sigpending_tsk+0x150/0x150 [ 25.103131] ? get_signal+0x397/0x17e0 [ 25.103138] do_group_exit+0x149/0x400 [ 25.103141] ? __lock_is_held+0xbc/0x140 [ 25.103144] ? SyS_exit+0x30/0x30 [ 25.103147] ? _raw_spin_unlock_irq+0x27/0x70 [ 25.103151] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.103155] get_signal+0x7e8/0x17e0 [ 25.103168] ? ptrace_notify+0x130/0x130 [ 25.103171] ? __fget+0xbb/0x580 [ 25.103174] ? __lockdep_init_map+0xe4/0x650 [ 25.103179] ? lock_release+0xd70/0xd70 [ 25.103184] ? exit_robust_list+0x240/0x240 [ 25.103192] do_signal+0x94/0x1ee0 [ 25.103197] ? iterate_fd+0x3f0/0x3f0 [ 25.103201] ? setup_sigcontext+0x7d0/0x7d0 [ 25.103206] ? __lock_is_held+0xbc/0x140 [ 25.103213] ? __fget_light+0x29d/0x390 [ 25.103218] ? selinux_tun_dev_create+0xc0/0xc0 [ 25.103222] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 25.103225] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 25.103227] ? alloc_file+0x284/0x3a0 [ 25.103230] ? exit_to_usermode_loop+0x98/0x300 [ 25.103236] exit_to_usermode_loop+0x224/0x300 [ 25.103240] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 25.103247] syscall_return_slowpath+0x42f/0x500 [ 25.103251] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 25.103254] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 25.103258] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.103262] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.103267] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 25.103270] RIP: 0033:0x447299 [ 25.103272] RSP: 002b:00007fd02ba7fcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 25.103275] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 0000000000447299 [ 25.103277] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 25.103278] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 25.103280] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 25.103281] R13: 0000000000000000 R14: 00007fd02ba809c0 R15: 00007fd02ba80700 [ 25.103437] Dumping ftrace buffer: [ 25.103439] (ftrace buffer empty) [ 25.103441] Kernel Offset: disabled [ 25.120097] Rebooting in 86400 seconds..