refcount_t: addition on 0; use-after-free. ------------[ cut here ]------------ kernel BUG at lib/refcount.c:34! Oops: invalid opcode: 0000 [#1] SMP KASAN PTI CPU: 0 UID: 0 PID: 9459 Comm: syz.9.582 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 RIP: 0010:refcount_warn_saturate+0xf0/0x110 lib/refcount.c:34 Code: 80 c1 03 38 c1 0f 8c 6a ff ff ff 4c 89 f7 e8 e7 40 51 fd e9 5d ff ff ff e8 0d 28 da fc 48 c7 c7 a0 a6 8c 8c e8 21 d0 38 fc 90 <0f> 0b e8 f9 27 da fc 48 c7 c7 20 a7 8c 8c e8 0d d0 38 fc 90 0f 0b RSP: 0018:ffffc900042bfb78 EFLAGS: 00010246 RAX: 000000000000002a RBX: 0000000000000002 RCX: 181402411ae3a100 RDX: 0000000000000000 RSI: 8000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffc900042bf907 R09: 1ffff92000857f20 R10: dffffc0000000000 R11: fffff52000857f21 R12: dffffc0000000000 R13: 1ffffffff226540e R14: ffff888032e5a128 R15: dffffc0000000000 FS: 00007ff85f4326c0(0000) GS:ffff88812340e000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000562520f65e38 CR3: 0000000057df0000 CR4: 00000000003526f0 Call Trace: __refcount_add include/linux/refcount.h:-1 [inline] __refcount_inc include/linux/refcount.h:366 [inline] refcount_inc include/linux/refcount.h:383 [inline] kref_get include/linux/kref.h:45 [inline] kobject_get+0xfa/0x120 lib/kobject.c:643 sysfs_break_active_protection+0x28/0xa0 fs/sysfs/file.c:471 md_attr_store+0x28f/0x640 drivers/md/md.c:6167 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x612/0xba0 fs/read_write.c:687 ksys_write+0x150/0x270 fs/read_write.c:1036 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff85e59f559 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff85f432028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ff85e826090 RCX: 00007ff85e59f559 RDX: 0000000000000005 RSI: 0000200000000440 RDI: 0000000000000005 RBP: 00007ff85e636b20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff85e826128 R14: 00007ff85e826090 R15: 00007ffe38e23cd8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:refcount_warn_saturate+0xf0/0x110 lib/refcount.c:34 Code: 80 c1 03 38 c1 0f 8c 6a ff ff ff 4c 89 f7 e8 e7 40 51 fd e9 5d ff ff ff e8 0d 28 da fc 48 c7 c7 a0 a6 8c 8c e8 21 d0 38 fc 90 <0f> 0b e8 f9 27 da fc 48 c7 c7 20 a7 8c 8c e8 0d d0 38 fc 90 0f 0b RSP: 0018:ffffc900042bfb78 EFLAGS: 00010246 RAX: 000000000000002a RBX: 0000000000000002 RCX: 181402411ae3a100 RDX: 0000000000000000 RSI: 8000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffc900042bf907 R09: 1ffff92000857f20 R10: dffffc0000000000 R11: fffff52000857f21 R12: dffffc0000000000 R13: 1ffffffff226540e R14: ffff888032e5a128 R15: dffffc0000000000 FS: 00007ff85f4326c0(0000) GS:ffff88812340e000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc8b927468 CR3: 0000000057df0000 CR4: 00000000003526f0