executing program syzkaller login: [ 16.808194] ================================================================== [ 16.808707] BUG: KASAN: use-after-free in tipc_group_self+0x1a2/0x1b0 [ 16.809303] Read of size 4 at addr ffff88006bd6556c by task syzkaller079720/2975 [ 16.809826] [ 16.809966] CPU: 2 PID: 2975 Comm: syzkaller079720 Not tainted 4.14.0-rc5-next-20171018+ #8 [ 16.810493] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 16.810981] Call Trace: [ 16.811157] dump_stack+0x194/0x257 [ 16.811407] ? arch_local_irq_restore+0x53/0x53 [ 16.811687] ? show_regs_print_info+0x65/0x65 [ 16.811961] ? tipc_group_self+0x1a2/0x1b0 [ 16.812230] print_address_description+0x73/0x250 [ 16.812521] ? tipc_group_self+0x1a2/0x1b0 [ 16.812780] kasan_report+0x25b/0x340 [ 16.813243] __asan_report_load4_noabort+0x14/0x20 [ 16.813602] tipc_group_self+0x1a2/0x1b0 [ 16.813875] tipc_sk_leave+0xfc/0x200 [ 16.814165] ? tipc_sk_withdraw+0x6b0/0x6b0 [ 16.814455] ? __local_bh_enable_ip+0x9d/0x160 [ 16.814758] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 16.815088] ? lock_sock_nested+0x91/0x110 [ 16.815372] ? trace_hardirqs_on+0xd/0x10 [ 16.815633] ? __local_bh_enable_ip+0x9d/0x160 [ 16.815910] tipc_release+0x154/0xfe0 [ 16.816198] ? mntput_no_expire+0x130/0xa90 [ 16.816512] ? tipc_sk_backlog_rcv+0x370/0x370 [ 16.816848] ? lock_release+0xa40/0xa40 [ 16.817121] ? dentry_free+0xcd/0x130 [ 16.817351] ? rcu_read_lock_sched_held+0x108/0x120 [ 16.817664] ? kmem_cache_free+0x249/0x280 [ 16.817980] ? dentry_free+0xd2/0x130 [ 16.818242] ? locks_remove_file+0x3fa/0x5a0 [ 16.818531] ? fcntl_setlk+0x10c0/0x10c0 [ 16.818797] ? __fsnotify_parent+0xb4/0x3a0 [ 16.819111] ? fsnotify+0x1af0/0x1af0 [ 16.819383] ? rcu_note_context_switch+0x710/0x710 [ 16.819722] sock_release+0x8d/0x1e0 [ 16.819947] ? sock_release+0x1e0/0x1e0 [ 16.820196] sock_close+0x16/0x20 [ 16.820434] __fput+0x327/0x7e0 [ 16.820667] ? fput+0x140/0x140 [ 16.820906] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 16.821326] ? _raw_spin_unlock_irq+0x27/0x70 [ 16.821641] ____fput+0x15/0x20 [ 16.821873] task_work_run+0x199/0x270 [ 16.822159] ? task_work_cancel+0x210/0x210 [ 16.822467] ? _raw_spin_unlock+0x22/0x30 [ 16.822761] ? switch_task_namespaces+0x87/0xc0 [ 16.823101] do_exit+0x9b5/0x1ad0 [ 16.823353] ? mm_update_next_owner+0x930/0x930 [ 16.823683] ? reacquire_held_locks+0x1fd/0x3d0 [ 16.824314] ? find_held_lock+0x35/0x1d0 [ 16.824629] ? release_sock+0x1d4/0x2a0 [ 16.824929] ? lock_downgrade+0x990/0x990 [ 16.825234] ? lock_downgrade+0x990/0x990 [ 16.825527] ? do_raw_spin_trylock+0x190/0x190 [ 16.825863] ? tipc_group_delete+0x2c0/0x3c0 [ 16.826185] ? __local_bh_enable_ip+0x9d/0x160 [ 16.826500] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 16.826865] ? trace_hardirqs_on+0xd/0x10 [ 16.827166] ? __local_bh_enable_ip+0x9d/0x160 [ 16.827498] ? release_sock+0x1d4/0x2a0 [ 16.827773] ? tipc_nametbl_build_group+0x27a/0x370 [ 16.828088] ? tipc_setsockopt+0x703/0xc00 [ 16.828343] ? tipc_sk_leave+0x200/0x200 [ 16.828596] ? security_socket_setsockopt+0x89/0xb0 [ 16.828967] ? SyS_setsockopt+0x215/0x360 [ 16.829233] do_group_exit+0x149/0x400 [ 16.829463] ? SyS_recv+0x40/0x40 [ 16.829671] ? SyS_exit+0x30/0x30 [ 16.829882] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 16.830197] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 16.830484] SyS_exit_group+0x1d/0x20 [ 16.830715] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 16.830998] RIP: 0033:0x433a29 [ 16.831198] RSP: 002b:00007ffe5b5a1af8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 16.831658] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000433a29 [ 16.832099] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 16.832532] RBP: 0000000000000082 R08: 000000000000003c R09: 00000000000000e7 [ 16.833084] R10: ffffffffffffffc0 R11: 0000000000000246 R12: 00007ffe5b5a1c18 [ 16.833633] R13: 00007ffe5b5a1c28 R14: 0000000000000002 R15: 0000000000000000 [ 16.834088] [ 16.834189] Allocated by task 2975: [ 16.834414] save_stack+0x43/0xd0 [ 16.834623] kasan_kmalloc+0xad/0xe0 [ 16.834853] kmem_cache_alloc_trace+0x136/0x750 [ 16.835154] tipc_group_create+0x116/0x9c0 [ 16.835421] tipc_setsockopt+0x25e/0xc00 [ 16.835673] SyS_setsockopt+0x189/0x360 [ 16.835916] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 16.836211] [ 16.836312] Freed by task 2975: [ 16.836509] save_stack+0x43/0xd0 [ 16.836723] kasan_slab_free+0x71/0xc0 [ 16.837100] kfree+0xca/0x250 [ 16.837392] tipc_group_delete+0x2c0/0x3c0 [ 16.837792] tipc_setsockopt+0xb33/0xc00 [ 16.838171] SyS_setsockopt+0x189/0x360 [ 16.838549] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 16.838997] [ 16.839143] The buggy address belongs to the object at ffff88006bd65500 [ 16.839143] which belongs to the cache kmalloc-192 of size 192 [ 16.840313] The buggy address is located 108 bytes inside of [ 16.840313] 192-byte region [ffff88006bd65500, ffff88006bd655c0) [ 16.841449] The buggy address belongs to the page: [ 16.841922] page:ffffea0001af5940 count:1 mapcount:0 mapping:ffff88006bd65000 index:0x0 [ 16.842668] flags: 0x500000000000100(slab) [ 16.843062] raw: 0500000000000100 ffff88006bd65000 0000000000000000 0000000100000010 [ 16.843788] raw: ffffea0001af7420 ffffea0001af9620 ffff88003e800040 0000000000000000 [ 16.844506] page dumped because: kasan: bad access detected [ 16.845039] [ 16.845191] Memory state around the buggy address: [ 16.845936] ffff88006bd65400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 16.846611] ffff88006bd65480: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc [ 16.847301] >ffff88006bd65500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.847974] ^ [ 16.848596] ffff88006bd65580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 16.849316] ffff88006bd65600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 16.849973] ================================================================== [ 16.850646] Disabling lock debugging due to kernel taint [ 16.851169] Kernel panic - not syncing: panic_on_warn set ... [ 16.851169] [ 16.851847] CPU: 2 PID: 2975 Comm: syzkaller079720 Tainted: G B 4.14.0-rc5-next-20171018+ #8 [ 16.852574] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 16.853195] Call Trace: [ 16.853426] dump_stack+0x194/0x257 [ 16.853764] ? arch_local_irq_restore+0x53/0x53 [ 16.854194] ? kasan_end_report+0x32/0x50 [ 16.854584] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 16.854962] ? vsnprintf+0x1ed/0x1900 [ 16.855304] ? tipc_group_self+0xb0/0x1b0 [ 16.855684] panic+0x1e4/0x41c [ 16.855978] ? refcount_error_report+0x214/0x214 [ 16.856414] ? add_taint+0x1c/0x50 [ 16.856738] ? add_taint+0x1c/0x50 [ 16.857066] ? tipc_group_self+0x1a2/0x1b0 [ 16.857450] kasan_end_report+0x50/0x50 [ 16.857812] kasan_report+0x144/0x340 [ 16.858180] __asan_report_load4_noabort+0x14/0x20 [ 16.858627] tipc_group_self+0x1a2/0x1b0 [ 16.859006] tipc_sk_leave+0xfc/0x200 [ 16.859372] ? tipc_sk_withdraw+0x6b0/0x6b0 [ 16.859764] ? __local_bh_enable_ip+0x9d/0x160 [ 16.860181] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 16.860638] ? lock_sock_nested+0x91/0x110 [ 16.861027] ? trace_hardirqs_on+0xd/0x10 [ 16.861411] ? __local_bh_enable_ip+0x9d/0x160 [ 16.861830] tipc_release+0x154/0xfe0 [ 16.862179] ? mntput_no_expire+0x130/0xa90 [ 16.862573] ? tipc_sk_backlog_rcv+0x370/0x370 [ 16.862988] ? lock_release+0xa40/0xa40 [ 16.863350] ? dentry_free+0xcd/0x130 [ 16.863696] ? rcu_read_lock_sched_held+0x108/0x120 [ 16.864152] ? kmem_cache_free+0x249/0x280 [ 16.864541] ? dentry_free+0xd2/0x130 [ 16.864898] ? locks_remove_file+0x3fa/0x5a0 [ 16.865301] ? fcntl_setlk+0x10c0/0x10c0 [ 16.865673] ? __fsnotify_parent+0xb4/0x3a0 [ 16.866068] ? fsnotify+0x1af0/0x1af0 [ 16.866416] ? rcu_note_context_switch+0x710/0x710 [ 16.866867] sock_release+0x8d/0x1e0 [ 16.867204] ? sock_release+0x1e0/0x1e0 [ 16.867564] sock_close+0x16/0x20 [ 16.867878] __fput+0x327/0x7e0 [ 16.868183] ? fput+0x140/0x140 [ 16.868485] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 16.869025] ? _raw_spin_unlock_irq+0x27/0x70 [ 16.869438] ____fput+0x15/0x20 [ 16.870025] task_work_run+0x199/0x270 [ 16.870383] ? task_work_cancel+0x210/0x210 [ 16.870858] ? _raw_spin_unlock+0x22/0x30 [ 16.871237] ? switch_task_namespaces+0x87/0xc0 [ 16.871662] do_exit+0x9b5/0x1ad0 [ 16.871979] ? mm_update_next_owner+0x930/0x930 [ 16.872409] ? reacquire_held_locks+0x1fd/0x3d0 [ 16.872858] ? find_held_lock+0x35/0x1d0 [ 16.873247] ? release_sock+0x1d4/0x2a0 [ 16.873609] ? lock_downgrade+0x990/0x990 [ 16.873985] ? lock_downgrade+0x990/0x990 [ 16.874356] ? do_raw_spin_trylock+0x190/0x190 [ 16.874773] ? tipc_group_delete+0x2c0/0x3c0 [ 16.875176] ? __local_bh_enable_ip+0x9d/0x160 [ 16.875592] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 16.876048] ? trace_hardirqs_on+0xd/0x10 [ 16.876431] ? __local_bh_enable_ip+0x9d/0x160 [ 16.876855] ? release_sock+0x1d4/0x2a0 [ 16.877221] ? tipc_nametbl_build_group+0x27a/0x370 [ 16.877678] ? tipc_setsockopt+0x703/0xc00 [ 16.878062] ? tipc_sk_leave+0x200/0x200 [ 16.878436] ? security_socket_setsockopt+0x89/0xb0 [ 16.878894] ? SyS_setsockopt+0x215/0x360 [ 16.879274] do_group_exit+0x149/0x400 [ 16.879627] ? SyS_recv+0x40/0x40 [ 16.879941] ? SyS_exit+0x30/0x30 [ 16.880258] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 16.880718] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 16.881158] SyS_exit_group+0x1d/0x20 [ 16.881504] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 16.881934] RIP: 0033:0x433a29 [ 16.882223] RSP: 002b:00007ffe5b5a1af8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 16.882948] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000433a29 [ 16.883629] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 16.884289] RBP: 0000000000000082 R08: 000000000000003c R09: 00000000000000e7 [ 16.884954] R10: ffffffffffffffc0 R11: 0000000000000246 R12: 00007ffe5b5a1c18 [ 16.885616] R13: 00007ffe5b5a1c28 R14: 0000000000000002 R15: 0000000000000000 [ 16.888857] Dumping ftrace buffer: [ 16.889210] (ftrace buffer empty) [ 16.889927] Kernel Offset: disabled [ 16.890248] Rebooting in 86400 seconds..