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-kasan-gce-6,10.128.0.35' (ECDSA) to the list of known hosts. 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: [ 52.533661] dev_remove_pack: ffff8801d06ecd40 not found executing program executing program [ 52.646214] ================================================================== [ 52.653618] BUG: KASAN: use-after-free in __dev_remove_pack+0x305/0x3b0 [ 52.660345] Read of size 8 at addr ffff8801d000e8a8 by task syzkaller264060/3194 [ 52.667840] [ 52.669439] CPU: 1 PID: 3194 Comm: syzkaller264060 Not tainted 4.13.0-rc7+ #65 [ 52.676773] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 52.686101] Call Trace: [ 52.688657] dump_stack+0x194/0x257 [ 52.692265] ? arch_local_irq_restore+0x53/0x53 [ 52.696899] ? show_regs_print_info+0x65/0x65 [ 52.701368] ? __dev_remove_pack+0x305/0x3b0 [ 52.705751] print_address_description+0x73/0x250 [ 52.710573] ? __dev_remove_pack+0x305/0x3b0 [ 52.714951] kasan_report+0x24e/0x340 [ 52.718727] __asan_report_load8_noabort+0x14/0x20 [ 52.723624] __dev_remove_pack+0x305/0x3b0 [ 52.727826] ? dev_get_by_name_rcu+0x270/0x270 [ 52.732377] ? refcount_sub_and_test+0x115/0x1b0 [ 52.737105] __unregister_prot_hook+0x211/0x280 [ 52.741747] packet_release+0x8bb/0xd70 [ 52.745696] ? packet_set_ring+0x1b70/0x1b70 [ 52.750076] ? rcu_read_lock_sched_held+0x108/0x120 [ 52.755059] ? kmem_cache_free+0x249/0x280 [ 52.759277] ? dentry_free+0xd2/0x130 [ 52.763052] ? locks_remove_file+0x414/0x560 [ 52.767431] ? fcntl_setlk+0x10c0/0x10c0 [ 52.771463] ? __fsnotify_parent+0xb4/0x3a0 [ 52.775766] ? fsnotify+0x1af0/0x1af0 [ 52.779534] ? dput.part.24+0x2a/0x740 [ 52.783396] sock_release+0x8d/0x1e0 [ 52.787078] ? sock_release+0x8d/0x1e0 [ 52.790939] ? sock_release+0x1e0/0x1e0 [ 52.794877] sock_close+0x16/0x20 [ 52.798298] __fput+0x327/0x7e0 [ 52.801552] ? fput+0x140/0x140 [ 52.804805] ? check_same_owner+0x320/0x320 [ 52.809094] ? do_raw_spin_trylock+0x190/0x190 [ 52.813645] ? check_same_owner+0x320/0x320 [ 52.817936] ____fput+0x15/0x20 [ 52.821187] task_work_run+0x18a/0x260 [ 52.825070] ? task_work_cancel+0x210/0x210 [ 52.829363] ? _raw_spin_unlock+0x22/0x30 [ 52.833478] ? switch_task_namespaces+0x87/0xc0 [ 52.838119] do_exit+0xa3a/0x1b10 [ 52.841549] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 52.846532] ? trace_hardirqs_on+0xd/0x10 [ 52.850654] ? hrtimer_try_to_cancel+0x21/0x5c0 [ 52.855293] ? mm_update_next_owner+0x930/0x930 [ 52.859929] ? __hrtimer_get_remaining+0x1c0/0x1c0 [ 52.864835] ? check_same_owner+0x320/0x320 [ 52.869125] ? check_noncircular+0x20/0x20 [ 52.873335] ? __might_sleep+0x95/0x190 [ 52.877284] ? do_nanosleep+0x508/0x6f0 [ 52.881239] ? __handle_mm_fault+0x577/0x3860 [ 52.886004] ? schedule_timeout_idle+0x90/0x90 [ 52.890584] ? memset+0x31/0x40 [ 52.893839] ? hrtimer_nanosleep+0x2cc/0x860 [ 52.898218] ? nanosleep_copyout+0x100/0x100 [ 52.902593] ? __might_sleep+0x95/0x190 [ 52.906540] ? kasan_check_write+0x14/0x20 [ 52.910740] ? _copy_from_user+0x99/0x110 [ 52.914857] ? __hrtimer_init+0x140/0x140 [ 52.918976] ? syscall_return_slowpath+0x450/0x450 [ 52.923876] do_group_exit+0x149/0x400 [ 52.927732] ? SyS_exit+0x30/0x30 [ 52.931151] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 52.936139] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 52.940868] SyS_exit_group+0x1d/0x20 [ 52.944638] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 52.949359] RIP: 0033:0x446499 [ 52.952518] RSP: 002b:00007ffde099e898 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 52.960193] RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 0000000000446499 [ 52.967431] RDX: 0000000000444bf1 RSI: 0000000000000000 RDI: 0000000000000000 [ 52.974667] RBP: 0000000000000086 R08: 00000000006da1c0 R09: 0000000000000000 [ 52.981906] R10: 00000000006da144 R11: 0000000000000206 R12: 0000000000000000 [ 52.989143] R13: 00007ffde099e83f R14: 00007ff23a90c9c0 R15: 0000000000000000 [ 52.996406] [ 52.998004] Allocated by task 3253: [ 53.001601] save_stack_trace+0x16/0x20 [ 53.005544] save_stack+0x43/0xd0 [ 53.008962] kasan_kmalloc+0xad/0xe0 [ 53.012642] kmem_cache_alloc_trace+0x12f/0x740 [ 53.017277] fanout_add+0xa50/0x1190 [ 53.020955] packet_setsockopt+0xfdc/0x1e80 [ 53.025244] SyS_setsockopt+0x189/0x360 [ 53.029182] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 53.033900] [ 53.035532] Freed by task 3194: [ 53.038779] save_stack_trace+0x16/0x20 [ 53.042719] save_stack+0x43/0xd0 [ 53.046151] kasan_slab_free+0x71/0xc0 [ 53.050001] kfree+0xca/0x250 [ 53.053074] packet_release+0xa8f/0xd70 [ 53.057027] sock_release+0x8d/0x1e0 [ 53.060704] sock_close+0x16/0x20 [ 53.064125] __fput+0x327/0x7e0 [ 53.067388] ____fput+0x15/0x20 [ 53.070636] task_work_run+0x18a/0x260 [ 53.074488] do_exit+0xa3a/0x1b10 [ 53.077908] do_group_exit+0x149/0x400 [ 53.081761] SyS_exit_group+0x1d/0x20 [ 53.085529] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 53.090247] [ 53.091841] The buggy address belongs to the object at ffff8801d000e000 [ 53.091841] which belongs to the cache kmalloc-4096 of size 4096 [ 53.104636] The buggy address is located 2216 bytes inside of [ 53.104636] 4096-byte region [ffff8801d000e000, ffff8801d000f000) [ 53.116647] The buggy address belongs to the page: [ 53.121541] page:ffffea0007400380 count:1 mapcount:0 mapping:ffff8801d000e000 index:0x0 compound_mapcount: 0 [ 53.131477] flags: 0x200000000008100(slab|head) [ 53.136128] raw: 0200000000008100 ffff8801d000e000 0000000000000000 0000000100000001 [ 53.144010] raw: ffffea0007400320 ffffea00074158a0 ffff8801dac00dc0 0000000000000000 [ 53.151866] page dumped because: kasan: bad access detected [ 53.157550] [ 53.159142] Memory state around the buggy address: [ 53.164040] ffff8801d000e780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.171363] ffff8801d000e800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.178688] >ffff8801d000e880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.186011] ^ [ 53.190644] ffff8801d000e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.197966] ffff8801d000e980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 53.205288] ================================================================== [ 53.212609] Disabling lock debugging due to kernel taint [ 53.218144] Kernel panic - not syncing: panic_on_warn set ... [ 53.218144] [ 53.225479] CPU: 1 PID: 3194 Comm: syzkaller264060 Tainted: G B 4.13.0-rc7+ #65 [ 53.234017] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 53.243340] Call Trace: [ 53.245894] dump_stack+0x194/0x257 [ 53.249491] ? arch_local_irq_restore+0x53/0x53 [ 53.254125] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 53.258848] ? __dev_remove_pack+0x2c0/0x3b0 [ 53.263219] panic+0x1e4/0x417 [ 53.266376] ? __warn+0x1d9/0x1d9 [ 53.269799] ? __dev_remove_pack+0x305/0x3b0 [ 53.274171] kasan_end_report+0x50/0x50 [ 53.278109] kasan_report+0x137/0x340 [ 53.281875] __asan_report_load8_noabort+0x14/0x20 [ 53.286769] __dev_remove_pack+0x305/0x3b0 [ 53.290969] ? dev_get_by_name_rcu+0x270/0x270 [ 53.295525] ? refcount_sub_and_test+0x115/0x1b0 [ 53.300249] __unregister_prot_hook+0x211/0x280 [ 53.304894] packet_release+0x8bb/0xd70 [ 53.308835] ? packet_set_ring+0x1b70/0x1b70 [ 53.313207] ? rcu_read_lock_sched_held+0x108/0x120 [ 53.318186] ? kmem_cache_free+0x249/0x280 [ 53.322388] ? dentry_free+0xd2/0x130 [ 53.326156] ? locks_remove_file+0x414/0x560 [ 53.330528] ? fcntl_setlk+0x10c0/0x10c0 [ 53.334560] ? __fsnotify_parent+0xb4/0x3a0 [ 53.338861] ? fsnotify+0x1af0/0x1af0 [ 53.342628] ? dput.part.24+0x2a/0x740 [ 53.346481] sock_release+0x8d/0x1e0 [ 53.350158] ? sock_release+0x8d/0x1e0 [ 53.354009] ? sock_release+0x1e0/0x1e0 [ 53.357944] sock_close+0x16/0x20 [ 53.361361] __fput+0x327/0x7e0 [ 53.364608] ? fput+0x140/0x140 [ 53.367872] ? check_same_owner+0x320/0x320 [ 53.372169] ? do_raw_spin_trylock+0x190/0x190 [ 53.376729] ? check_same_owner+0x320/0x320 [ 53.381030] ____fput+0x15/0x20 [ 53.384272] task_work_run+0x18a/0x260 [ 53.388124] ? task_work_cancel+0x210/0x210 [ 53.392411] ? _raw_spin_unlock+0x22/0x30 [ 53.396523] ? switch_task_namespaces+0x87/0xc0 [ 53.401160] do_exit+0xa3a/0x1b10 [ 53.404576] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 53.409557] ? trace_hardirqs_on+0xd/0x10 [ 53.413682] ? hrtimer_try_to_cancel+0x21/0x5c0 [ 53.418319] ? mm_update_next_owner+0x930/0x930 [ 53.422953] ? __hrtimer_get_remaining+0x1c0/0x1c0 [ 53.427861] ? check_same_owner+0x320/0x320 [ 53.432150] ? check_noncircular+0x20/0x20 [ 53.436352] ? __might_sleep+0x95/0x190 [ 53.440294] ? do_nanosleep+0x508/0x6f0 [ 53.444233] ? __handle_mm_fault+0x577/0x3860 [ 53.448693] ? schedule_timeout_idle+0x90/0x90 [ 53.453257] ? memset+0x31/0x40 [ 53.456503] ? hrtimer_nanosleep+0x2cc/0x860 [ 53.460880] ? nanosleep_copyout+0x100/0x100 [ 53.465252] ? __might_sleep+0x95/0x190 [ 53.469192] ? kasan_check_write+0x14/0x20 [ 53.473392] ? _copy_from_user+0x99/0x110 [ 53.477507] ? __hrtimer_init+0x140/0x140 [ 53.481620] ? syscall_return_slowpath+0x450/0x450 [ 53.486514] do_group_exit+0x149/0x400 [ 53.490379] ? SyS_exit+0x30/0x30 [ 53.493798] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 53.498780] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 53.503501] SyS_exit_group+0x1d/0x20 [ 53.507267] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 53.512007] RIP: 0033:0x446499 [ 53.515161] RSP: 002b:00007ffde099e898 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 53.522833] RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 0000000000446499 [ 53.530068] RDX: 0000000000444bf1 RSI: 0000000000000000 RDI: 0000000000000000 [ 53.537303] RBP: 0000000000000086 R08: 00000000006da1c0 R09: 0000000000000000 [ 53.544551] R10: 00000000006da144 R11: 0000000000000206 R12: 0000000000000000 [ 53.551786] R13: 00007ffde099e83f R14: 00007ff23a90c9c0 R15: 0000000000000000 [ 53.559053] Dumping ftrace buffer: [ 53.562559] (ftrace buffer empty) [ 53.566235] Kernel Offset: disabled [ 53.569830] Rebooting in 86400 seconds..