Debian GNU/Linux 7 syzkaller ttyS0 2017/09/15 10:21:43 parsed 1 programs 2017/09/15 10:21:43 executed programs: 0 syzkaller login: [ 16.872546] dev_remove_pack: ffff88003cc511c0 not found [ 16.900221] ================================================================== [ 16.900963] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 16.901559] Read of size 8 at addr ffff880067a7cc28 by task syz-executor0/3120 [ 16.902171] [ 16.902314] CPU: 3 PID: 3120 Comm: syz-executor0 Not tainted 4.13.0-next-20170915+ #5 [ 16.902972] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 16.903573] Call Trace: [ 16.903799] dump_stack+0x194/0x257 [ 16.904132] ? arch_local_irq_restore+0x53/0x53 [ 16.904511] ? show_regs_print_info+0x65/0x65 [ 16.904894] ? __dev_remove_pack+0x305/0x3b0 [ 16.905252] print_address_description+0x73/0x250 [ 16.905649] ? __dev_remove_pack+0x305/0x3b0 [ 16.906017] kasan_report+0x24e/0x340 [ 16.906335] __asan_report_load8_noabort+0x14/0x20 [ 16.906736] __dev_remove_pack+0x305/0x3b0 [ 16.907067] ? dev_get_by_name_rcu+0x270/0x270 [ 16.907432] ? refcount_sub_and_test+0x115/0x1b0 [ 16.908429] __unregister_prot_hook+0x211/0x280 [ 16.909624] packet_release+0x8bb/0xd70 [ 16.910066] ? packet_set_ring+0x1b70/0x1b70 [ 16.910602] ? dentry_free+0xcd/0x130 [ 16.910994] ? rcu_read_lock_sched_held+0x108/0x120 [ 16.911801] ? kmem_cache_free+0x249/0x280 [ 16.912251] ? dentry_free+0xd2/0x130 [ 16.912633] ? locks_remove_file+0x3fa/0x5a0 [ 16.913069] ? fcntl_setlk+0x10d0/0x10d0 [ 16.913482] ? __fsnotify_parent+0xb4/0x3a0 [ 16.913842] ? fsnotify+0x1af0/0x1af0 [ 16.914229] sock_release+0x8d/0x1e0 [ 16.914605] ? sock_release+0x8d/0x1e0 [ 16.914995] ? sock_release+0x1e0/0x1e0 [ 16.915392] sock_close+0x16/0x20 [ 16.915738] __fput+0x333/0x7f0 [ 16.916099] ? fput+0x140/0x140 [ 16.916442] ? check_same_owner+0x320/0x320 [ 16.916885] ? _raw_spin_unlock_irq+0x27/0x70 [ 16.917348] ____fput+0x15/0x20 [ 16.917685] task_work_run+0x199/0x270 [ 16.918083] ? task_work_cancel+0x210/0x210 [ 16.918517] ? _raw_spin_unlock+0x22/0x30 [ 16.918936] ? switch_task_namespaces+0x87/0xc0 [ 16.919407] do_exit+0xa52/0x1b40 [ 16.919762] ? plist_check_list+0xa0/0xa0 [ 16.920219] ? plist_del+0x47b/0x990 [ 16.920597] ? mm_update_next_owner+0x930/0x930 [ 16.921073] ? plist_add+0x760/0x760 [ 16.921457] ? check_same_owner+0x320/0x320 [ 16.921898] ? find_held_lock+0x39/0x1d0 [ 16.922317] ? check_noncircular+0x20/0x20 [ 16.922746] ? lock_downgrade+0x990/0x990 [ 16.923160] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 16.923724] ? find_held_lock+0x39/0x1d0 [ 16.924162] ? lock_downgrade+0x990/0x990 [ 16.924586] ? recalc_sigpending_tsk+0x117/0x150 [ 16.925082] ? recalc_sigpending+0x103/0x160 [ 16.925535] ? recalc_sigpending_tsk+0x150/0x150 [ 16.926017] ? get_signal+0x397/0x17e0 [ 16.926424] do_group_exit+0x149/0x400 [ 16.926822] ? __lock_is_held+0xbc/0x140 [ 16.927239] ? SyS_exit+0x30/0x30 [ 16.927599] ? _raw_spin_unlock_irq+0x27/0x70 [ 16.928062] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 16.928482] get_signal+0x7e8/0x17e0 [ 16.928878] ? ptrace_notify+0x130/0x130 [ 16.929294] ? __fget+0xbb/0x580 [ 16.930084] ? lock_release+0xd70/0xd70 [ 16.930455] ? exit_robust_list+0x240/0x240 [ 16.930860] do_signal+0x94/0x1ee0 [ 16.931214] ? iterate_fd+0x3f0/0x3f0 [ 16.931605] ? setup_sigcontext+0x7d0/0x7d0 [ 16.932056] ? userfaultfd_unmap_prep+0x540/0x540 [ 16.932543] ? do_mmap+0x34f/0xd50 [ 16.932911] ? __fget_light+0x29d/0x390 [ 16.933314] ? selinux_tun_dev_create+0xc0/0xc0 [ 16.933789] ? security_mmap_file+0x14e/0x190 [ 16.934248] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 16.934820] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 16.935348] ? exit_to_usermode_loop+0x98/0x300 [ 16.935836] exit_to_usermode_loop+0x224/0x300 [ 16.937233] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 16.937799] syscall_return_slowpath+0x42f/0x500 [ 16.938279] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 16.938786] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 16.939623] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 16.943197] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 16.943873] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 16.944791] RIP: 0033:0x447299 [ 16.945351] RSP: 002b:00007f5c0aa4ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 16.946231] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 16.947065] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 16.947944] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 16.948791] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 16.949640] R13: 0000000000000000 R14: 00007f5c0aa4f9c0 R15: 00007f5c0aa4f700 [ 16.951047] [ 16.951333] Allocated by task 3120: [ 16.951974] save_stack_trace+0x16/0x20 [ 16.952612] save_stack+0x43/0xd0 [ 16.953177] kasan_kmalloc+0xad/0xe0 [ 16.953772] kmem_cache_alloc_trace+0x136/0x750 [ 16.954527] fanout_add+0xa50/0x1190 [ 16.955134] packet_setsockopt+0xfdc/0x1e80 [ 16.955838] SyS_setsockopt+0x189/0x360 [ 16.956495] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 16.957257] [ 16.957520] Freed by task 3120: [ 16.958066] save_stack_trace+0x16/0x20 [ 16.958837] save_stack+0x43/0xd0 [ 16.959314] kasan_slab_free+0x71/0xc0 [ 16.960058] kfree+0xca/0x250 [ 16.960642] packet_release+0xa8f/0xd70 [ 16.961324] sock_release+0x8d/0x1e0 [ 16.961887] sock_close+0x16/0x20 [ 16.962407] __fput+0x333/0x7f0 [ 16.962905] ____fput+0x15/0x20 [ 16.963422] task_work_run+0x199/0x270 [ 16.964021] do_exit+0xa52/0x1b40 [ 16.964561] do_group_exit+0x149/0x400 [ 16.965132] get_signal+0x7e8/0x17e0 [ 16.965680] do_signal+0x94/0x1ee0 [ 16.966112] exit_to_usermode_loop+0x224/0x300 [ 16.966532] syscall_return_slowpath+0x42f/0x500 [ 16.966931] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 16.967307] [ 16.967560] The buggy address belongs to the object at ffff880067a7c380 [ 16.967560] which belongs to the cache kmalloc-4096 of size 4096 [ 16.969241] The buggy address is located 2216 bytes inside of [ 16.969241] 4096-byte region [ffff880067a7c380, ffff880067a7d380) [ 16.971101] The buggy address belongs to the page: [ 16.971922] page:ffffea00019e9f00 count:1 mapcount:0 mapping:ffff880067a7c380 index:0x0 compound_mapcount: 0 [ 16.973998] flags: 0x500000000008100(slab|head) [ 16.974751] raw: 0500000000008100 ffff880067a7c380 0000000000000000 0000000100000001 [ 16.976176] raw: ffffea00019e3e20 ffffea0001ae3420 ffff88003e800dc0 0000000000000000 [ 16.977696] page dumped because: kasan: bad access detected [ 16.978851] [ 16.979178] Memory state around the buggy address: [ 16.980239] ffff880067a7cb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.981679] ffff880067a7cb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.983207] >ffff880067a7cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.984509] ^ [ 16.985525] ffff880067a7cc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.986429] ffff880067a7cd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.987155] ================================================================== [ 16.987915] Disabling lock debugging due to kernel taint [ 16.988512] Kernel panic - not syncing: panic_on_warn set ... [ 16.988512] [ 16.989250] CPU: 3 PID: 3120 Comm: syz-executor0 Tainted: G B 4.13.0-next-20170915+ #5 [ 16.990285] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 16.991133] Call Trace: [ 16.991420] dump_stack+0x194/0x257 [ 16.991779] ? arch_local_irq_restore+0x53/0x53 [ 16.992360] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 16.992997] ? __dev_remove_pack+0x2e0/0x3b0 [ 16.993658] panic+0x1e4/0x417 [ 16.994627] ? __warn+0x1d9/0x1d9 [ 16.994984] ? __dev_remove_pack+0x305/0x3b0 [ 16.995628] kasan_end_report+0x50/0x50 [ 16.996190] kasan_report+0x137/0x340 [ 16.996728] __asan_report_load8_noabort+0x14/0x20 [ 16.997575] __dev_remove_pack+0x305/0x3b0 [ 16.998057] ? dev_get_by_name_rcu+0x270/0x270 [ 16.998546] ? refcount_sub_and_test+0x115/0x1b0 [ 16.999038] __unregister_prot_hook+0x211/0x280 [ 16.999540] packet_release+0x8bb/0xd70 [ 16.999962] ? packet_set_ring+0x1b70/0x1b70 [ 17.000434] ? dentry_free+0xcd/0x130 [ 17.000802] ? rcu_read_lock_sched_held+0x108/0x120 [ 17.001329] ? kmem_cache_free+0x249/0x280 [ 17.001766] ? dentry_free+0xd2/0x130 [ 17.002166] ? locks_remove_file+0x3fa/0x5a0 [ 17.002636] ? fcntl_setlk+0x10d0/0x10d0 [ 17.003204] ? __fsnotify_parent+0xb4/0x3a0 [ 17.003635] ? fsnotify+0x1af0/0x1af0 [ 17.004120] sock_release+0x8d/0x1e0 [ 17.004660] ? sock_release+0x8d/0x1e0 [ 17.005165] ? sock_release+0x1e0/0x1e0 [ 17.005679] sock_close+0x16/0x20 [ 17.006119] __fput+0x333/0x7f0 [ 17.006555] ? fput+0x140/0x140 [ 17.006970] ? check_same_owner+0x320/0x320 [ 17.007467] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.008031] ____fput+0x15/0x20 [ 17.008498] task_work_run+0x199/0x270 [ 17.009021] ? task_work_cancel+0x210/0x210 [ 17.009492] ? _raw_spin_unlock+0x22/0x30 [ 17.009884] ? switch_task_namespaces+0x87/0xc0 [ 17.010337] do_exit+0xa52/0x1b40 [ 17.010654] ? plist_check_list+0xa0/0xa0 [ 17.011045] ? plist_del+0x47b/0x990 [ 17.011386] ? mm_update_next_owner+0x930/0x930 [ 17.011762] ? plist_add+0x760/0x760 [ 17.012128] ? check_same_owner+0x320/0x320 [ 17.012534] ? find_held_lock+0x39/0x1d0 [ 17.012884] ? check_noncircular+0x20/0x20 [ 17.013260] ? lock_downgrade+0x990/0x990 [ 17.013652] ? refill_pi_state_cache.part.6+0x2f0/0x2f0 [ 17.014133] ? find_held_lock+0x39/0x1d0 [ 17.014510] ? lock_downgrade+0x990/0x990 [ 17.014882] ? recalc_sigpending_tsk+0x117/0x150 [ 17.015377] ? recalc_sigpending+0x103/0x160 [ 17.016067] ? recalc_sigpending_tsk+0x150/0x150 [ 17.016521] ? get_signal+0x397/0x17e0 [ 17.016846] do_group_exit+0x149/0x400 [ 17.017212] ? __lock_is_held+0xbc/0x140 [ 17.017567] ? SyS_exit+0x30/0x30 [ 17.017853] ? _raw_spin_unlock_irq+0x27/0x70 [ 17.018249] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 17.018679] get_signal+0x7e8/0x17e0 [ 17.018965] ? ptrace_notify+0x130/0x130 [ 17.019271] ? __fget+0xbb/0x580 [ 17.019596] ? lock_release+0xd70/0xd70 [ 17.019980] ? exit_robust_list+0x240/0x240 [ 17.020421] do_signal+0x94/0x1ee0 [ 17.020788] ? iterate_fd+0x3f0/0x3f0 [ 17.021144] ? setup_sigcontext+0x7d0/0x7d0 [ 17.021568] ? userfaultfd_unmap_prep+0x540/0x540 [ 17.022040] ? do_mmap+0x34f/0xd50 [ 17.022384] ? __fget_light+0x29d/0x390 [ 17.022763] ? selinux_tun_dev_create+0xc0/0xc0 [ 17.023188] ? security_mmap_file+0x14e/0x190 [ 17.023608] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 17.024125] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 17.024638] ? exit_to_usermode_loop+0x98/0x300 [ 17.025152] exit_to_usermode_loop+0x224/0x300 [ 17.025676] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 17.026293] syscall_return_slowpath+0x42f/0x500 [ 17.026813] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 17.027362] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 17.027910] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 17.028413] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 17.028931] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 17.029452] RIP: 0033:0x447299 [ 17.029795] RSP: 002b:00007f5c0aa4ecf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 17.030620] RAX: fffffffffffffe00 RBX: 0000000000708028 RCX: 0000000000447299 [ 17.031386] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000708028 [ 17.032161] RBP: 0000000000708000 R08: 0000000000000000 R09: 0000000000000000 [ 17.032931] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 17.033664] R13: 0000000000000000 R14: 00007f5c0aa4f9c0 R15: 00007f5c0aa4f700 [ 17.034385] Dumping ftrace buffer: [ 17.034727] (ftrace buffer empty) [ 17.035059] Kernel Offset: disabled [ 17.035401] Rebooting in 86400 seconds..