Debian GNU/Linux 7 syzkaller ttyS0 2017/09/16 15:45:16 parsed 1 programs 2017/09/16 15:45:16 executed programs: 0 syzkaller login: [ 20.415163] dev_remove_pack: ffff88003d27ed00 not found [ 20.444416] ================================================================== [ 20.445224] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 20.445899] Read of size 8 at addr ffff88003bc1eb28 by task syz-executor0/3027 [ 20.446621] [ 20.446805] CPU: 1 PID: 3027 Comm: syz-executor0 Not tainted 4.13.0-next-20170915+ #5 [ 20.447876] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 20.448982] Call Trace: [ 20.449305] dump_stack+0x194/0x257 [ 20.449774] ? arch_local_irq_restore+0x53/0x53 [ 20.450476] ? show_regs_print_info+0x65/0x65 [ 20.451066] ? __dev_remove_pack+0x305/0x3b0 [ 20.451911] print_address_description+0x73/0x250 [ 20.453231] ? __dev_remove_pack+0x305/0x3b0 [ 20.453969] kasan_report+0x24e/0x340 [ 20.454661] __asan_report_load8_noabort+0x14/0x20 [ 20.455485] __dev_remove_pack+0x305/0x3b0 [ 20.456190] ? dev_get_by_name_rcu+0x270/0x270 [ 20.456980] ? refcount_sub_and_test+0x115/0x1b0 [ 20.457783] __unregister_prot_hook+0x211/0x280 [ 20.458592] packet_release+0x8bb/0xd70 [ 20.459316] ? packet_set_ring+0x1b70/0x1b70 [ 20.460247] ? lock_downgrade+0x990/0x990 [ 20.462879] ? locks_remove_file+0x3fa/0x5a0 [ 20.463868] ? fcntl_setlk+0x10d0/0x10d0 [ 20.464743] ? __fsnotify_parent+0xb4/0x3a0 [ 20.465783] ? fsnotify+0x1af0/0x1af0 [ 20.466442] sock_release+0x8d/0x1e0 [ 20.467208] ? sock_release+0x8d/0x1e0 [ 20.468019] ? sock_release+0x1e0/0x1e0 [ 20.468907] sock_close+0x16/0x20 [ 20.469521] __fput+0x333/0x7f0 [ 20.470190] ? fput+0x140/0x140 [ 20.470924] ? check_same_owner+0x320/0x320 [ 20.471916] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.472952] ____fput+0x15/0x20 [ 20.473541] task_work_run+0x199/0x270 [ 20.474214] ? task_work_cancel+0x210/0x210 [ 20.475000] ? _raw_spin_unlock+0x22/0x30 [ 20.475748] ? switch_task_namespaces+0x87/0xc0 [ 20.476635] do_exit+0xa52/0x1b40 [ 20.477142] ? plist_check_list+0xa0/0xa0 [ 20.477763] ? plist_del+0x47b/0x990 [ 20.478141] ? mm_update_next_owner+0x930/0x930 [ 20.478613] ? plist_add+0x760/0x760 [ 20.479185] ? check_same_owner+0x320/0x320 [ 20.479670] ? find_held_lock+0x39/0x1d0 [ 20.480090] ? check_noncircular+0x20/0x20 [ 20.480525] ? lock_downgrade+0x990/0x990 [ 20.480965] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 20.481537] ? find_held_lock+0x39/0x1d0 [ 20.482016] ? lock_downgrade+0x990/0x990 [ 20.484243] ? recalc_sigpending_tsk+0x117/0x150 [ 20.484735] ? recalc_sigpending+0x103/0x160 [ 20.485220] ? recalc_sigpending_tsk+0x150/0x150 [ 20.485691] ? get_signal+0x397/0x17e0 [ 20.486140] do_group_exit+0x149/0x400 [ 20.486571] ? __lock_is_held+0xbc/0x140 [ 20.487067] ? SyS_exit+0x30/0x30 [ 20.487541] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.488033] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.488580] get_signal+0x7e8/0x17e0 [ 20.489006] ? ptrace_notify+0x130/0x130 [ 20.489449] ? __fget+0xbb/0x580 [ 20.489761] ? __lockdep_init_map+0xe4/0x650 [ 20.490118] ? lock_release+0xd70/0xd70 [ 20.490436] ? exit_robust_list+0x240/0x240 [ 20.490786] do_signal+0x94/0x1ee0 [ 20.491102] ? iterate_fd+0x3f0/0x3f0 [ 20.491406] ? setup_sigcontext+0x7d0/0x7d0 [ 20.491739] ? __lock_is_held+0xbc/0x140 [ 20.492069] ? __fget_light+0x29d/0x390 [ 20.492389] ? selinux_tun_dev_create+0xc0/0xc0 [ 20.492740] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 20.493200] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 20.493604] ? alloc_file+0x284/0x3a0 [ 20.493911] ? exit_to_usermode_loop+0x98/0x300 [ 20.494293] exit_to_usermode_loop+0x224/0x300 [ 20.494638] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 20.495178] syscall_return_slowpath+0x42f/0x500 [ 20.495656] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 20.496158] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 20.496660] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.497161] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 20.497646] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 20.498117] RIP: 0033:0x4474f9 [ 20.498485] RSP: 002b:00007fc6c8923cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 20.499249] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 00000000004474f9 [ 20.499930] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 20.500639] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 20.501377] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 20.502100] R13: 0000000000000000 R14: 00007fc6c89249c0 R15: 00007fc6c8924700 [ 20.502862] [ 20.502983] Allocated by task 3026: [ 20.503276] save_stack_trace+0x16/0x20 [ 20.503589] save_stack+0x43/0xd0 [ 20.505685] kasan_kmalloc+0xad/0xe0 [ 20.505926] kmem_cache_alloc_trace+0x136/0x750 [ 20.506240] fanout_add+0xa50/0x1190 [ 20.506490] packet_setsockopt+0xfdc/0x1e80 [ 20.506778] SyS_setsockopt+0x189/0x360 [ 20.507121] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 20.507616] [ 20.507781] Freed by task 3027: [ 20.508179] save_stack_trace+0x16/0x20 [ 20.508588] save_stack+0x43/0xd0 [ 20.508934] kasan_slab_free+0x71/0xc0 [ 20.509256] kfree+0xca/0x250 [ 20.509532] packet_release+0xa8f/0xd70 [ 20.509856] sock_release+0x8d/0x1e0 [ 20.510149] sock_close+0x16/0x20 [ 20.510456] __fput+0x333/0x7f0 [ 20.510732] ____fput+0x15/0x20 [ 20.511046] task_work_run+0x199/0x270 [ 20.511398] do_exit+0xa52/0x1b40 [ 20.511668] do_group_exit+0x149/0x400 [ 20.511986] get_signal+0x7e8/0x17e0 [ 20.512276] do_signal+0x94/0x1ee0 [ 20.512569] exit_to_usermode_loop+0x224/0x300 [ 20.513054] syscall_return_slowpath+0x42f/0x500 [ 20.513539] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 20.514014] [ 20.514183] The buggy address belongs to the object at ffff88003bc1e280 [ 20.514183] which belongs to the cache kmalloc-4096 of size 4096 [ 20.515351] The buggy address is located 2216 bytes inside of [ 20.515351] 4096-byte region [ffff88003bc1e280, ffff88003bc1f280) [ 20.516290] The buggy address belongs to the page: [ 20.516708] page:ffffea0000ef0780 count:1 mapcount:0 mapping:ffff88003bc1e280 index:0x0 compound_mapcount: 0 [ 20.517510] flags: 0x100000000008100(slab|head) [ 20.517871] raw: 0100000000008100 ffff88003bc1e280 0000000000000000 0000000100000001 [ 20.518485] raw: ffffea0000ec6b20 ffff88003e801a50 ffff88003e800dc0 0000000000000000 [ 20.519130] page dumped because: kasan: bad access detected [ 20.519597] [ 20.519726] Memory state around the buggy address: [ 20.520124] ffff88003bc1ea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.520746] ffff88003bc1ea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.521299] >ffff88003bc1eb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.521877] ^ [ 20.522339] ffff88003bc1eb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.523072] ffff88003bc1ec00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.523798] ================================================================== [ 20.524511] Disabling lock debugging due to kernel taint [ 20.527684] Kernel panic - not syncing: panic_on_warn set ... [ 20.527684] [ 20.528300] CPU: 1 PID: 3027 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170915+ #5 [ 20.529032] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 20.529682] Call Trace: [ 20.529903] dump_stack+0x194/0x257 [ 20.530212] ? arch_local_irq_restore+0x53/0x53 [ 20.530575] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 20.530968] ? __dev_remove_pack+0x2e0/0x3b0 [ 20.531379] panic+0x1e4/0x417 [ 20.531628] ? __warn+0x1d9/0x1d9 [ 20.531906] ? __dev_remove_pack+0x305/0x3b0 [ 20.532256] kasan_end_report+0x50/0x50 [ 20.532576] kasan_report+0x137/0x340 [ 20.532881] __asan_report_load8_noabort+0x14/0x20 [ 20.533269] __dev_remove_pack+0x305/0x3b0 [ 20.533601] ? dev_get_by_name_rcu+0x270/0x270 [ 20.533945] ? refcount_sub_and_test+0x115/0x1b0 [ 20.534307] __unregister_prot_hook+0x211/0x280 [ 20.534670] packet_release+0x8bb/0xd70 [ 20.534989] ? packet_set_ring+0x1b70/0x1b70 [ 20.535312] ? lock_downgrade+0x990/0x990 [ 20.535629] ? locks_remove_file+0x3fa/0x5a0 [ 20.535952] ? fcntl_setlk+0x10d0/0x10d0 [ 20.536247] ? __fsnotify_parent+0xb4/0x3a0 [ 20.536578] ? fsnotify+0x1af0/0x1af0 [ 20.536859] sock_release+0x8d/0x1e0 [ 20.537127] ? sock_release+0x8d/0x1e0 [ 20.537410] ? sock_release+0x1e0/0x1e0 [ 20.537712] sock_close+0x16/0x20 [ 20.537965] __fput+0x333/0x7f0 [ 20.538204] ? fput+0x140/0x140 [ 20.538451] ? check_same_owner+0x320/0x320 [ 20.538859] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.539250] ____fput+0x15/0x20 [ 20.539541] task_work_run+0x199/0x270 [ 20.539898] ? task_work_cancel+0x210/0x210 [ 20.540279] ? _raw_spin_unlock+0x22/0x30 [ 20.540648] ? switch_task_namespaces+0x87/0xc0 [ 20.541253] do_exit+0xa52/0x1b40 [ 20.541788] ? plist_check_list+0xa0/0xa0 [ 20.542421] ? plist_del+0x47b/0x990 [ 20.542961] ? mm_update_next_owner+0x930/0x930 [ 20.543377] ? plist_add+0x760/0x760 [ 20.543876] ? check_same_owner+0x320/0x320 [ 20.544523] ? find_held_lock+0x39/0x1d0 [ 20.545131] ? check_noncircular+0x20/0x20 [ 20.545773] ? lock_downgrade+0x990/0x990 [ 20.547020] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 20.548540] ? find_held_lock+0x39/0x1d0 [ 20.549291] ? lock_downgrade+0x990/0x990 [ 20.550121] ? recalc_sigpending_tsk+0x117/0x150 [ 20.551108] ? recalc_sigpending+0x103/0x160 [ 20.551618] ? recalc_sigpending_tsk+0x150/0x150 [ 20.552244] ? get_signal+0x397/0x17e0 [ 20.552699] do_group_exit+0x149/0x400 [ 20.553303] ? __lock_is_held+0xbc/0x140 [ 20.553783] ? SyS_exit+0x30/0x30 [ 20.554406] ? _raw_spin_unlock_irq+0x27/0x70 [ 20.555310] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.556342] get_signal+0x7e8/0x17e0 [ 20.557121] ? ptrace_notify+0x130/0x130 [ 20.557708] ? __fget+0xbb/0x580 [ 20.558062] ? __lockdep_init_map+0xe4/0x650 [ 20.558858] ? lock_release+0xd70/0xd70 [ 20.559522] ? exit_robust_list+0x240/0x240 [ 20.560303] do_signal+0x94/0x1ee0 [ 20.560899] ? iterate_fd+0x3f0/0x3f0 [ 20.561514] ? setup_sigcontext+0x7d0/0x7d0 [ 20.562202] ? __lock_is_held+0xbc/0x140 [ 20.562593] ? __fget_light+0x29d/0x390 [ 20.562998] ? selinux_tun_dev_create+0xc0/0xc0 [ 20.563446] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 20.563993] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 20.564476] ? alloc_file+0x284/0x3a0 [ 20.564834] ? exit_to_usermode_loop+0x98/0x300 [ 20.565260] exit_to_usermode_loop+0x224/0x300 [ 20.565690] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 20.566299] syscall_return_slowpath+0x42f/0x500 [ 20.566777] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 20.579134] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 20.579706] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 20.580230] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 20.580789] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 20.581675] RIP: 0033:0x4474f9 [ 20.582058] RSP: 002b:00007fc6c8923cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 20.582863] RAX: fffffffffffffe00 RBX: 00000000007080d8 RCX: 00000000004474f9 [ 20.583700] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080d8 [ 20.584564] RBP: 00000000007080b0 R08: 0000000000000000 R09: 0000000000000000 [ 20.585421] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 20.586276] R13: 0000000000000000 R14: 00007fc6c89249c0 R15: 00007fc6c8924700 [ 20.587147] Dumping ftrace buffer: [ 20.587597] (ftrace buffer empty) [ 20.588024] Kernel Offset: disabled [ 20.588495] Rebooting in 86400 seconds..