executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 42.365534] dev_remove_pack: ffff88006ab91940 not found [ 42.438246] ================================================================== [ 42.439059] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 42.439572] Read of size 8 at addr ffff88003e10b4e8 by task syzkaller137604/4196 [ 42.440279] [ 42.440398] CPU: 1 PID: 4196 Comm: syzkaller137604 Not tainted 4.13.0-next-20170907+ #17 [ 42.441020] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 42.441688] Call Trace: [ 42.441873] dump_stack+0x194/0x257 [ 42.442159] ? arch_local_irq_restore+0x53/0x53 [ 42.442584] ? show_regs_print_info+0x65/0x65 [ 42.442991] ? __dev_remove_pack+0x305/0x3b0 [ 42.443319] print_address_description+0x73/0x250 [ 42.443748] ? __dev_remove_pack+0x305/0x3b0 [ 42.444157] kasan_report+0x24e/0x340 [ 42.444554] __asan_report_load8_noabort+0x14/0x20 [ 42.445030] __dev_remove_pack+0x305/0x3b0 [ 42.445474] ? dev_get_by_name_rcu+0x270/0x270 [ 42.445918] ? refcount_sub_and_test+0x115/0x1b0 [ 42.446396] __unregister_prot_hook+0x211/0x280 [ 42.446827] packet_release+0x8bb/0xd70 [ 42.447114] ? packet_set_ring+0x1b70/0x1b70 [ 42.447461] ? dentry_free+0xcd/0x130 [ 42.447772] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.448170] ? kmem_cache_free+0x249/0x280 [ 42.448523] ? dentry_free+0xd2/0x130 [ 42.448795] ? locks_remove_file+0x3fa/0x5a0 [ 42.449152] ? fcntl_setlk+0x10d0/0x10d0 [ 42.449492] ? __fsnotify_parent+0xb4/0x3a0 [ 42.449788] ? fsnotify+0x1af0/0x1af0 [ 42.450097] sock_release+0x8d/0x1e0 [ 42.450384] ? sock_release+0x8d/0x1e0 [ 42.450665] ? sock_release+0x1e0/0x1e0 [ 42.450945] sock_close+0x16/0x20 [ 42.451299] __fput+0x333/0x7f0 [ 42.451655] ? fput+0x140/0x140 [ 42.451891] ? check_same_owner+0x320/0x320 [ 42.452221] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.452542] ____fput+0x15/0x20 [ 42.453271] task_work_run+0x199/0x270 [ 42.453589] ? task_work_cancel+0x210/0x210 [ 42.453894] ? _raw_spin_unlock+0x22/0x30 [ 42.454183] ? switch_task_namespaces+0x87/0xc0 [ 42.454520] do_exit+0xa52/0x1b40 [ 42.454756] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.455095] ? trace_hardirqs_on+0xd/0x10 [ 42.455428] ? hrtimer_try_to_cancel+0x11/0x5c0 [ 42.455754] ? mm_update_next_owner+0x930/0x930 [ 42.456080] ? __hrtimer_get_remaining+0x1c0/0x1c0 [ 42.456439] ? check_same_owner+0x320/0x320 [ 42.456745] ? _do_fork+0x2f5/0xfe0 [ 42.457026] ? __might_sleep+0x95/0x190 [ 42.457345] ? do_nanosleep+0x508/0x6f0 [ 42.457687] ? schedule_timeout_idle+0x90/0x90 [ 42.458066] ? memset+0x31/0x40 [ 42.458302] ? hrtimer_nanosleep+0x2cc/0x860 [ 42.458711] ? nanosleep_copyout+0x100/0x100 [ 42.459016] ? __might_sleep+0x95/0x190 [ 42.459295] ? kasan_check_write+0x14/0x20 [ 42.459627] ? _copy_from_user+0x99/0x110 [ 42.459955] ? __hrtimer_init+0x140/0x140 [ 42.460290] ? syscall_return_slowpath+0x500/0x500 [ 42.460651] do_group_exit+0x149/0x400 [ 42.461010] ? SyS_exit+0x30/0x30 [ 42.461253] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.461630] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.462008] SyS_exit_group+0x1d/0x20 [ 42.462289] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.462673] RIP: 0033:0x43ba49 [ 42.462918] RSP: 002b:00007fffc4c13108 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 [ 42.463571] RAX: ffffffffffffffda RBX: 000000000000000b RCX: 000000000043ba49 [ 42.464145] RDX: 0000000000465a51 RSI: 0000000000000000 RDI: 0000000000000000 [ 42.464681] RBP: 0000000000000082 R08: 00000000006d01e0 R09: 0000000000000000 [ 42.465246] R10: 00000000006d01d8 R11: 0000000000000202 R12: 0000000000000000 [ 42.465765] R13: 0000000000000000 R14: 00007ffa085e69c0 R15: 00007ffa085e6700 [ 42.466332] [ 42.466461] Allocated by task 4217: [ 42.466724] save_stack_trace+0x16/0x20 [ 42.467051] save_stack+0x43/0xd0 [ 42.467286] kasan_kmalloc+0xad/0xe0 [ 42.467546] kmem_cache_alloc_trace+0x136/0x750 [ 42.467874] fanout_add+0xa50/0x1190 [ 42.468143] packet_setsockopt+0xfdc/0x1e80 [ 42.468494] SyS_setsockopt+0x189/0x360 [ 42.468795] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.469138] [ 42.469268] Freed by task 4196: [ 42.469511] save_stack_trace+0x16/0x20 [ 42.469788] save_stack+0x43/0xd0 [ 42.470029] kasan_slab_free+0x71/0xc0 [ 42.470300] kfree+0xca/0x250 [ 42.470546] packet_release+0xa8f/0xd70 [ 42.470822] sock_release+0x8d/0x1e0 [ 42.471133] sock_close+0x16/0x20 [ 42.471402] __fput+0x333/0x7f0 [ 42.471633] ____fput+0x15/0x20 [ 42.471928] task_work_run+0x199/0x270 [ 42.472253] do_exit+0xa52/0x1b40 [ 42.472536] do_group_exit+0x149/0x400 [ 42.472886] SyS_exit_group+0x1d/0x20 [ 42.473197] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.473591] [ 42.473722] The buggy address belongs to the object at ffff88003e10ac40 [ 42.473722] which belongs to the cache kmalloc-4096 of size 4096 [ 42.475323] The buggy address is located 2216 bytes inside of [ 42.475323] 4096-byte region [ffff88003e10ac40, ffff88003e10bc40) [ 42.476407] The buggy address belongs to the page: [ 42.476780] page:ffffea0000f84280 count:1 mapcount:0 mapping:ffff88003e10ac40 index:0x0 compound_mapcount: 0 [ 42.477485] flags: 0x100000000008100(slab|head) [ 42.477810] raw: 0100000000008100 ffff88003e10ac40 0000000000000000 0000000100000001 [ 42.478461] raw: ffffea0000e30320 ffff88003e801a50 ffff88003e800dc0 0000000000000000 [ 42.479027] page dumped because: kasan: bad access detected [ 42.479434] [ 42.479566] Memory state around the buggy address: [ 42.479908] ffff88003e10b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.480416] ffff88003e10b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.480971] >ffff88003e10b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.481516] ^ [ 42.482002] ffff88003e10b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.482555] ffff88003e10b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 42.483116] ================================================================== [ 42.483626] Disabling lock debugging due to kernel taint [ 42.484029] Kernel panic - not syncing: panic_on_warn set ... [ 42.484029] [ 42.484808] CPU: 1 PID: 4196 Comm: syzkaller137604 Tainted: G B 4.13.0-next-20170907+ #17 [ 42.485452] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 42.486010] Call Trace: [ 42.486240] dump_stack+0x194/0x257 [ 42.486494] ? arch_local_irq_restore+0x53/0x53 [ 42.486817] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.487156] ? __dev_remove_pack+0x2f0/0x3b0 [ 42.487468] panic+0x1e4/0x417 [ 42.487692] ? __warn+0x1d9/0x1d9 [ 42.487939] ? __dev_remove_pack+0x305/0x3b0 [ 42.488269] kasan_end_report+0x50/0x50 [ 42.488569] kasan_report+0x137/0x340 [ 42.488872] __asan_report_load8_noabort+0x14/0x20 [ 42.489261] __dev_remove_pack+0x305/0x3b0 [ 42.489581] ? dev_get_by_name_rcu+0x270/0x270 [ 42.489932] ? refcount_sub_and_test+0x115/0x1b0 [ 42.490422] __unregister_prot_hook+0x211/0x280 [ 42.490900] packet_release+0x8bb/0xd70 [ 42.491274] ? packet_set_ring+0x1b70/0x1b70 [ 42.491584] ? dentry_free+0xcd/0x130 [ 42.491897] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.492233] ? kmem_cache_free+0x249/0x280 [ 42.492561] ? dentry_free+0xd2/0x130 [ 42.492891] ? locks_remove_file+0x3fa/0x5a0 [ 42.493228] ? fcntl_setlk+0x10d0/0x10d0 [ 42.493547] ? __fsnotify_parent+0xb4/0x3a0 [ 42.493884] ? fsnotify+0x1af0/0x1af0 [ 42.494149] sock_release+0x8d/0x1e0 [ 42.494406] ? sock_release+0x8d/0x1e0 [ 42.494687] ? sock_release+0x1e0/0x1e0 [ 42.495642] sock_close+0x16/0x20 [ 42.495906] __fput+0x333/0x7f0 [ 42.496162] ? fput+0x140/0x140 [ 42.496428] ? check_same_owner+0x320/0x320 [ 42.496734] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.497134] ____fput+0x15/0x20 [ 42.497387] task_work_run+0x199/0x270 [ 42.497665] ? task_work_cancel+0x210/0x210 [ 42.498002] ? _raw_spin_unlock+0x22/0x30 [ 42.498351] ? switch_task_namespaces+0x87/0xc0 [ 42.498745] do_exit+0xa52/0x1b40 [ 42.499094] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.499513] ? trace_hardirqs_on+0xd/0x10 [ 42.499868] ? hrtimer_try_to_cancel+0x11/0x5c0 [ 42.500191] ? mm_update_next_owner+0x930/0x930 [ 42.500563] ? __hrtimer_get_remaining+0x1c0/0x1c0 [ 42.500973] ? check_same_owner+0x320/0x320 [ 42.501343] ? _do_fork+0x2f5/0xfe0 [ 42.501672] ? __might_sleep+0x95/0x190 [ 42.502028] ? do_nanosleep+0x508/0x6f0 [ 42.502384] ? schedule_timeout_idle+0x90/0x90 [ 42.502796] ? memset+0x31/0x40 [ 42.503093] ? hrtimer_nanosleep+0x2cc/0x860 [ 42.503489] ? nanosleep_copyout+0x100/0x100 [ 42.503879] ? __might_sleep+0x95/0x190 [ 42.504272] ? kasan_check_write+0x14/0x20 [ 42.504689] ? _copy_from_user+0x99/0x110 [ 42.505117] ? __hrtimer_init+0x140/0x140 [ 42.505549] ? syscall_return_slowpath+0x500/0x500 [ 42.506056] do_group_exit+0x149/0x400 [ 42.506370] ? SyS_exit+0x30/0x30 [ 42.506652] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.507040] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.507395] SyS_exit_group+0x1d/0x20 [ 42.507700] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.508064] RIP: 0033:0x43ba49 [ 42.508325] RSP: 002b:00007fffc4c13108 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 [ 42.508938] RAX: ffffffffffffffda RBX: 000000000000000b RCX: 000000000043ba49 [ 42.509481] RDX: 0000000000465a51 RSI: 0000000000000000 RDI: 0000000000000000 [ 42.510004] RBP: 0000000000000082 R08: 00000000006d01e0 R09: 0000000000000000 [ 42.510566] R10: 00000000006d01d8 R11: 0000000000000202 R12: 0000000000000000 [ 42.511067] R13: 0000000000000000 R14: 00007ffa085e69c0 R15: 00007ffa085e6700 [ 42.512044] Dumping ftrace buffer: [ 42.512317] (ftrace buffer empty) [ 42.512550] Kernel Offset: disabled [ 42.512801] Rebooting in 86400 seconds..