refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 4200 at lib/refcount.c:25 refcount_warn_saturate+0x180/0x1c8 lib/refcount.c:25 Modules linked in: CPU: 0 PID: 4200 Comm: syz-executor.1 Not tainted 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x180/0x1c8 lib/refcount.c:25 lr : refcount_warn_saturate+0x180/0x1c8 lib/refcount.c:25 sp : ffff8000134a3ae0 x29: ffff8000134a3ae0 x28: 00000000002e0003 x27: 00000000000008a1 x26: ffff00010ae1c3a8 x25: 0000000000000000 x24: ffff00010ad85140 x23: ffff80000b1ba318 x22: 0000000000000000 x21: ffff00010ad85080 x20: 0000000000000002 x19: ffff80000d8c8000 x18: 00000000000003dc x17: ffff80000bffd6bc x16: ffff80000db49158 x15: ffff0000f861cf80 x14: 0000000000000000 x13: 00000000ffffffff x12: ffff0000f861cf80 x11: ff808000081c0d5c x10: 0000000000000000 x9 : 78ed1571b9599700 x8 : 78ed1571b9599700 x7 : ffff800008161d1c x6 : 0000000000000000 x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000006 x1 : 0000000100000000 x0 : 000000000000002a Call trace: refcount_warn_saturate+0x180/0x1c8 lib/refcount.c:25 __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] sock_hold include/net/sock.h:774 [inline] nr_release+0x218/0x274 net/netrom/af_netrom.c:520 __sock_release net/socket.c:650 [inline] sock_close+0x50/0xf0 net/socket.c:1365 __fput+0x198/0x3dc fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:353 task_work_run+0xc4/0x14c kernel/task_work.c:177 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x26c/0xbe0 kernel/exit.c:795 do_group_exit+0x70/0xe8 kernel/exit.c:925 get_signal+0xb0c/0xb40 kernel/signal.c:2857 do_signal+0x128/0x438 arch/arm64/kernel/signal.c:1071 do_notify_resume+0xc0/0x1f0 arch/arm64/kernel/signal.c:1124 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x9c/0x150 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 irq event stamp: 3272 hardirqs last enabled at (3271): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1367 [inline] hardirqs last enabled at (3271): [] finish_lock_switch+0x94/0xe8 kernel/sched/core.c:4942 hardirqs last disabled at (3272): [] el1_dbg+0x24/0x5c arch/arm64/kernel/entry-common.c:404 softirqs last enabled at (3264): [] _stext+0x2e4/0x37c softirqs last disabled at (3259): [] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:79 ---[ end trace 0000000000000000 ]--- INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. CPU: 1 PID: 4200 Comm: syz-executor.1 Tainted: G W 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022 Call trace: dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:156 show_stack+0x2c/0x54 arch/arm64/kernel/stacktrace.c:163 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x104/0x16c lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 assign_lock_key+0x134/0x140 kernel/locking/lockdep.c:979 register_lock_class+0xc4/0x2f8 kernel/locking/lockdep.c:1292 __lock_acquire+0xa8/0x30a4 kernel/locking/lockdep.c:4932 lock_acquire+0x100/0x1f8 kernel/locking/lockdep.c:5666 __raw_write_lock_bh include/linux/rwlock_api_smp.h:202 [inline] _raw_write_lock_bh+0x54/0x6c kernel/locking/spinlock.c:334 sock_orphan include/net/sock.h:2065 [inline] nr_release+0x70/0x274 net/netrom/af_netrom.c:521 __sock_release net/socket.c:650 [inline] sock_close+0x50/0xf0 net/socket.c:1365 __fput+0x198/0x3dc fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:353 task_work_run+0xc4/0x14c kernel/task_work.c:177 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x26c/0xbe0 kernel/exit.c:795 do_group_exit+0x70/0xe8 kernel/exit.c:925 get_signal+0xb0c/0xb40 kernel/signal.c:2857 do_signal+0x128/0x438 arch/arm64/kernel/signal.c:1071 do_notify_resume+0xc0/0x1f0 arch/arm64/kernel/signal.c:1124 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x9c/0x150 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 Unable to handle kernel paging request at virtual address 7fffffffffffffff Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 [7fffffffffffffff] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 4200 Comm: syz-executor.1 Tainted: G W 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022 pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __list_add_valid+0x28/0xb8 lib/list_debug.c:30 lr : __list_add include/linux/list.h:69 [inline] lr : list_add_tail include/linux/list.h:102 [inline] lr : __add_wait_queue_entry_tail include/linux/wait.h:196 [inline] lr : prepare_to_wait_exclusive+0x78/0xe4 kernel/sched/wait.c:284 sp : ffff8000134a39e0 x29: ffff8000134a39e0 x28: 00000000002e0003 x27: 00000000000008a1 x26: 7fffffffffffffff x25: ffff0000fcbb3920 x24: ffff8000134a3a58 x23: ffff8000134a3a40 x22: 0000000000000000 x21: 0000000000000000 x20: 0000000000000002 x19: ffff0000fcbb38e0 x18: 00000000000000da x17: ffff80000bffd6bc x16: 000000000000b67e x15: 00000000000010cb x14: 0000000002a08201 x13: 000000000000026d x12: 0000000000000001 x11: ff8080000959fabc x10: 0000000000000000 x9 : 0000000000000001 x8 : 7fffffffffffffff x7 : 0000000000000000 x6 : ffff800008187eec x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff0000fcbb3920 x2 : 7fffffffffffffff x1 : 7fffffffffffffff x0 : ffff8000134a3a58 Call trace: __list_add_valid+0x28/0xb8 lib/list_debug.c:27 __list_add include/linux/list.h:69 [inline] list_add_tail include/linux/list.h:102 [inline] __add_wait_queue_entry_tail include/linux/wait.h:196 [inline] prepare_to_wait_exclusive+0x78/0xe4 kernel/sched/wait.c:284 __lock_sock+0x78/0x15c net/core/sock.c:2825 lock_sock_nested+0xa8/0xd8 net/core/sock.c:3398 lock_sock include/net/sock.h:1712 [inline] nr_release+0x98/0x274 net/netrom/af_netrom.c:522 __sock_release net/socket.c:650 [inline] sock_close+0x50/0xf0 net/socket.c:1365 __fput+0x198/0x3dc fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:353 task_work_run+0xc4/0x14c kernel/task_work.c:177 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x26c/0xbe0 kernel/exit.c:795 do_group_exit+0x70/0xe8 kernel/exit.c:925 get_signal+0xb0c/0xb40 kernel/signal.c:2857 do_signal+0x128/0x438 arch/arm64/kernel/signal.c:1071 do_notify_resume+0xc0/0x1f0 arch/arm64/kernel/signal.c:1124 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x9c/0x150 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581 Code: b4000322 f9400462 eb08005f 54000341 (f9400102) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: b4000322 cbz x2, 0x64 4: f9400462 ldr x2, [x3, #8] 8: eb08005f cmp x2, x8 c: 54000341 b.ne 0x74 // b.any * 10: f9400102 ldr x2, [x8] <-- trapping instruction