[ OK ] Started Getty on tty2. [ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on ttyS0. [ OK ] Started OpenBSD Secure Shell server. [ OK ] Started getty on tty2-tty6 if dbus and logind are not available. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.44' (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 syzkaller login: [ 69.181175][ T8390] ------------[ cut here ]------------ [ 69.189896][ T8392] ================================================================== [ 69.197967][ T8392] BUG: KASAN: use-after-free in __lock_acquire+0x3e6f/0x54c0 [ 69.205363][ T8392] Read of size 8 at addr ffff888019dd8468 by task syz-executor178/8392 [ 69.213604][ T8392] [ 69.215926][ T8392] CPU: 0 PID: 8392 Comm: syz-executor178 Not tainted 5.12.0-rc6-syzkaller #0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.224695][ T8392] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 69.234747][ T8392] Call Trace: [ 69.238031][ T8392] dump_stack+0x141/0x1d7 [ 69.242390][ T8392] ? __lock_acquire+0x3e6f/0x54c0 [ 69.247428][ T8392] print_address_description.constprop.0.cold+0x5b/0x2f8 [ 69.254468][ T8392] ? __lock_acquire+0x3e6f/0x54c0 [ 69.259507][ T8392] ? __lock_acquire+0x3e6f/0x54c0 [ 69.264543][ T8392] kasan_report.cold+0x7c/0xd8 [ 69.269319][ T8392] ? __lock_acquire+0x16b0/0x54c0 [ 69.274353][ T8392] ? __lock_acquire+0x3e6f/0x54c0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.279391][ T8392] __lock_acquire+0x3e6f/0x54c0 [ 69.284259][ T8392] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 69.290253][ T8392] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 69.296244][ T8392] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 69.302244][ T8392] lock_acquire+0x1ab/0x740 [ 69.306761][ T8392] ? nfc_llcp_sock_unlink+0x1d/0x1c0 [ 69.312061][ T8392] ? lock_release+0x720/0x720 [ 69.316751][ T8392] ? llcp_sock_release+0x1df/0x580 [ 69.321892][ T8392] ? mark_held_locks+0x9f/0xe0 [ 69.326666][ T8392] _raw_write_lock+0x2a/0x40 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.331266][ T8392] ? nfc_llcp_sock_unlink+0x1d/0x1c0 [ 69.336562][ T8392] nfc_llcp_sock_unlink+0x1d/0x1c0 [ 69.341687][ T8392] llcp_sock_release+0x286/0x580 [ 69.346641][ T8392] __sock_release+0xcd/0x280 [ 69.351257][ T8392] sock_close+0x18/0x20 [ 69.355424][ T8392] __fput+0x288/0x920 [ 69.359421][ T8392] ? __sock_release+0x280/0x280 [ 69.364286][ T8392] task_work_run+0xdd/0x1a0 [ 69.368803][ T8392] do_exit+0xbfc/0x2a60 [ 69.372979][ T8392] ? mm_update_next_owner+0x7a0/0x7a0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.378540][ T8392] ? lock_downgrade+0x6e0/0x6e0 [ 69.383411][ T8392] do_group_exit+0x125/0x310 [ 69.388018][ T8392] __x64_sys_exit_group+0x3a/0x50 [ 69.393055][ T8392] do_syscall_64+0x2d/0x70 [ 69.397570][ T8392] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 69.403474][ T8392] RIP: 0033:0x43e989 [ 69.407370][ T8392] Code: Unable to access opcode bytes at RIP 0x43e95f. [ 69.414213][ T8392] RSP: 002b:00007ffe3760e0b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 69.422719][ T8392] RAX: ffffffffffffffda RBX: 00000000004b02f0 RCX: 000000000043e989 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.430705][ T8392] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 [ 69.438683][ T8392] RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000001 [ 69.446677][ T8392] R10: 0000000000080800 R11: 0000000000000246 R12: 00000000004b02f0 [ 69.454658][ T8392] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 [ 69.462645][ T8392] [ 69.464972][ T8392] Allocated by task 1: [ 69.469036][ T8392] kasan_save_stack+0x1b/0x40 [ 69.473725][ T8392] __kasan_kmalloc+0x99/0xc0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.478325][ T8392] nfc_llcp_register_device+0x45/0x9d0 [ 69.483797][ T8392] nfc_register_device+0x6d/0x360 [ 69.488830][ T8392] nfcsim_device_new+0x345/0x5c1 [ 69.493782][ T8392] nfcsim_init+0x71/0x14d [ 69.498117][ T8392] do_one_initcall+0x103/0x650 [ 69.502890][ T8392] kernel_init_freeable+0x63e/0x6c2 [ 69.508100][ T8392] kernel_init+0xd/0x1b8 [ 69.512350][ T8392] ret_from_fork+0x1f/0x30 [ 69.516773][ T8392] [ 69.519098][ T8392] Freed by task 8391: [ 69.523073][ T8392] kasan_save_stack+0x1b/0x40 [ 69.527757][ T8392] kasan_set_track+0x1c/0x30 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.532354][ T8392] kasan_set_free_info+0x20/0x30 [ 69.537302][ T8392] __kasan_slab_free+0xf5/0x130 [ 69.542173][ T8392] slab_free_freelist_hook+0x92/0x210 [ 69.547563][ T8392] kfree+0xe5/0x7f0 [ 69.551376][ T8392] nfc_llcp_local_put+0x194/0x200 [ 69.556409][ T8392] llcp_sock_destruct+0x81/0x150 [ 69.561357][ T8392] __sk_destruct+0x4b/0x900 [ 69.565869][ T8392] sk_destruct+0xbd/0xe0 [ 69.570119][ T8392] __sk_free+0xef/0x3d0 [ 69.574285][ T8392] sk_free+0x78/0xa0 [ 69.578187][ T8392] llcp_sock_release+0x3c9/0x580 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.583141][ T8392] __sock_release+0xcd/0x280 [ 69.587739][ T8392] sock_close+0x18/0x20 [ 69.591903][ T8392] __fput+0x288/0x920 [ 69.595896][ T8392] task_work_run+0xdd/0x1a0 [ 69.600409][ T8392] do_exit+0xbfc/0x2a60 [ 69.604577][ T8392] do_group_exit+0x125/0x310 [ 69.609182][ T8392] __x64_sys_exit_group+0x3a/0x50 [ 69.614222][ T8392] do_syscall_64+0x2d/0x70 [ 69.618657][ T8392] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 69.624565][ T8392] executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.626987][ T8392] The buggy address belongs to the object at ffff888019dd8000 [ 69.626987][ T8392] which belongs to the cache kmalloc-2k of size 2048 [ 69.641038][ T8392] The buggy address is located 1128 bytes inside of [ 69.641038][ T8392] 2048-byte region [ffff888019dd8000, ffff888019dd8800) [ 69.654493][ T8392] The buggy address belongs to the page: [ 69.660118][ T8392] page:ffffea0000677600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x19dd8 [ 69.670273][ T8392] head:ffffea0000677600 order:3 compound_mapcount:0 compound_pincount:0 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.678604][ T8392] flags: 0xfff00000010200(slab|head) [ 69.683903][ T8392] raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010442000 [ 69.692495][ T8392] raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 [ 69.701075][ T8392] page dumped because: kasan: bad access detected [ 69.707485][ T8392] [ 69.709808][ T8392] Memory state around the buggy address: [ 69.715437][ T8392] ffff888019dd8300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.723503][ T8392] ffff888019dd8380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.731566][ T8392] >ffff888019dd8400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.739626][ T8392] ^ [ 69.747086][ T8392] ffff888019dd8480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.755153][ T8392] ffff888019dd8500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 69.763211][ T8392] ================================================================== [ 69.771265][ T8392] Disabling lock debugging due to kernel taint [ 69.777410][ T8392] Kernel panic - not syncing: panic_on_warn set ... executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.783991][ T8392] CPU: 0 PID: 8392 Comm: syz-executor178 Tainted: G B 5.12.0-rc6-syzkaller #0 [ 69.794145][ T8392] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 69.804199][ T8392] Call Trace: [ 69.807481][ T8392] dump_stack+0x141/0x1d7 [ 69.811827][ T8392] panic+0x306/0x73d [ 69.815729][ T8392] ? __warn_printk+0xf3/0xf3 [ 69.817066][ T8390] refcount_t: underflow; use-after-free. [ 69.820327][ T8392] ? __lock_acquire+0x3e6f/0x54c0 executing program executing program executing program executing program [ 69.820357][ T8392] ? __lock_acquire+0x3e6f/0x54c0 [ 69.835980][ T8392] ? __lock_acquire+0x3e6f/0x54c0 [ 69.841015][ T8392] end_report.cold+0x5a/0x5a [ 69.845611][ T8392] kasan_report.cold+0x6a/0xd8 [ 69.845866][ T8390] WARNING: CPU: 1 PID: 8390 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 [ 69.850375][ T8392] ? __lock_acquire+0x16b0/0x54c0 [ 69.850400][ T8392] ? __lock_acquire+0x3e6f/0x54c0 [ 69.869774][ T8392] __lock_acquire+0x3e6f/0x54c0 [ 69.874637][ T8392] ? lockdep_hardirqs_on_prepare+0x400/0x400 executing program executing program [ 69.880631][ T8392] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 69.884164][ T8390] Modules linked in: [ 69.886610][ T8392] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 69.886643][ T8392] lock_acquire+0x1ab/0x740 [ 69.895037][ T8390] [ 69.896484][ T8392] ? nfc_llcp_sock_unlink+0x1d/0x1c0 [ 69.896515][ T8392] ? lock_release+0x720/0x720 [ 69.903921][ T8390] CPU: 1 PID: 8390 Comm: syz-executor178 Tainted: G B 5.12.0-rc6-syzkaller #0 [ 69.908560][ T8392] ? llcp_sock_release+0x1df/0x580 [ 69.908591][ T8392] ? mark_held_locks+0x9f/0xe0 executing program [ 69.919870][ T8390] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 69.923382][ T8392] _raw_write_lock+0x2a/0x40 [ 69.923409][ T8392] ? nfc_llcp_sock_unlink+0x1d/0x1c0 [ 69.929948][ T8390] RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 [ 69.933250][ T8392] nfc_llcp_sock_unlink+0x1d/0x1c0 [ 69.933278][ T8392] llcp_sock_release+0x286/0x580 [ 69.946998][ T8390] Code: e9 db fe ff ff 48 89 df e8 5c e0 ee fd e9 8a fe ff ff e8 92 2f ab fd 48 c7 c7 c0 d8 c1 89 c6 05 9d 26 e8 09 01 e8 9b 86 f9 04 <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55 [ 69.947895][ T8392] __sock_release+0xcd/0x280 [ 69.947925][ T8392] sock_close+0x18/0x20 [ 69.954891][ T8390] RSP: 0018:ffffc9000166fb98 EFLAGS: 00010286 [ 69.959317][ T8392] __fput+0x288/0x920 [ 69.959345][ T8392] ? __sock_release+0x280/0x280 [ 69.965421][ T8390] [ 69.969341][ T8392] task_work_run+0xdd/0x1a0 [ 69.969371][ T8392] do_exit+0xbfc/0x2a60 [ 69.989971][ T8390] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 69.993522][ T8392] ? mm_update_next_owner+0x7a0/0x7a0 [ 69.993553][ T8392] ? lock_downgrade+0x6e0/0x6e0 [ 69.998735][ T8390] RDX: ffff88801bd5b880 RSI: ffffffff815c4d15 RDI: fffff520002cdf65 [ 70.003753][ T8392] do_group_exit+0x125/0x310 [ 70.003783][ T8392] __x64_sys_exit_group+0x3a/0x50 [ 70.008754][ T8390] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 [ 70.012574][ T8392] do_syscall_64+0x2d/0x70 [ 70.012605][ T8392] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 70.015871][ T8390] R10: ffffffff815bdaae R11: 0000000000000000 R12: 0000000000000000 [ 70.019433][ T8392] RIP: 0033:0x43e989 [ 70.019451][ T8392] Code: Unable to access opcode bytes at RIP 0x43e95f. [ 70.019461][ T8392] RSP: 002b:00007ffe3760e0b8 EFLAGS: 00000246 [ 70.024609][ T8390] R13: ffff888019dd8018 R14: ffff888019dd8000 R15: ffff88802fa04468 [ 70.031535][ T8392] ORIG_RAX: 00000000000000e7 [ 70.031546][ T8392] RAX: ffffffffffffffda RBX: 00000000004b02f0 RCX: 000000000043e989 [ 70.031561][ T8392] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 [ 70.031575][ T8392] RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000001 [ 70.038715][ T8390] FS: 0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 [ 70.041748][ T8392] R10: 0000000000080800 R11: 0000000000000246 R12: 00000000004b02f0 [ 70.041765][ T8392] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 [ 70.050365][ T8392] Kernel Offset: disabled [ 70.168196][ T8392] Rebooting in 86400 seconds..