BUG: spinlock bad magic on CPU#1, syz.2.629/6128 ================================================================== BUG: KASAN: slab-out-of-bounds in task_pid_nr include/linux/sched.h:1538 [inline] BUG: KASAN: slab-out-of-bounds in spin_dump+0x197/0x1a0 kernel/locking/spinlock_debug.c:67 Read of size 4 at addr ffff88801a7e8fc8 by task syz.2.629/6128 CPU: 1 PID: 6128 Comm: syz.2.629 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 task_pid_nr include/linux/sched.h:1538 [inline] spin_dump+0x197/0x1a0 kernel/locking/spinlock_debug.c:67 spin_bug kernel/locking/spinlock_debug.c:77 [inline] debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] do_raw_spin_lock+0x1de/0x2f0 kernel/locking/spinlock_debug.c:114 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:129 [inline] _raw_spin_lock_irq+0xb7/0xf0 kernel/locking/spinlock.c:170 spin_lock_irq include/linux/spinlock.h:389 [inline] dev_open+0x47/0x1b0 drivers/usb/gadget/legacy/inode.c:1918 do_dentry_open+0x7f7/0xf90 fs/open.c:826 do_open fs/namei.c:3659 [inline] path_openat+0x2718/0x2fb0 fs/namei.c:3793 do_filp_open+0x1df/0x400 fs/namei.c:3820 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7ff059b6cb19 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:00007ff057dc3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007ff059df2fa0 RCX: 00007ff059b6cb19 RDX: 0000000000000002 RSI: 00002000000001c0 RDI: ffffffffffffff9c RBP: 00007ff059c04b70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff059df3038 R14: 00007ff059df2fa0 R15: 00007ffcc9d50b78 Allocated by task 4195: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmemdup+0x22/0x50 mm/util.c:128 neigh_parms_alloc+0x86/0x4b0 net/core/neighbour.c:1630 ipv6_add_dev+0x2f0/0x11a0 net/ipv6/addrconf.c:399 addrconf_notify+0x66f/0xf20 net/ipv6/addrconf.c:3594 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2074 [inline] call_netdevice_notifiers net/core/dev.c:2088 [inline] register_netdevice+0x12a8/0x1720 net/core/dev.c:10455 br_dev_newlink+0x23/0x110 net/bridge/br_netlink.c:1443 __rtnl_newlink net/core/rtnetlink.c:3538 [inline] rtnl_newlink+0x139e/0x1920 net/core/rtnetlink.c:3586 rtnetlink_rcv_msg+0x7f1/0xf10 net/core/rtnetlink.c:5698 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2527 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x804/0x9e0 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] __sys_sendto+0x46d/0x620 net/socket.c:2073 __do_sys_sendto net/socket.c:2085 [inline] __se_sys_sendto net/socket.c:2081 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2081 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88801a7e8f00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 8 bytes to the right of 192-byte region [ffff88801a7e8f00, ffff88801a7e8fc0) The buggy address belongs to the page: page:ffffea000069fa00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801a7e8700 pfn:0x1a7e8 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00008d5340 0000000200000002 ffff888017841a00 raw: ffff88801a7e8700 000000008010000f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 2672563610, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc_trace+0xf9/0x290 mm/slub.c:3250 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] call_usermodehelper_setup+0x8a/0x260 kernel/umh.c:365 kobject_uevent_env+0x658/0x890 lib/kobject_uevent.c:629 kernel_add_sysfs_param+0xfb/0x120 kernel/params.c:813 param_sysfs_builtin+0x183/0x200 kernel/params.c:848 param_sysfs_init+0x66/0x70 kernel/params.c:969 do_one_initcall+0x272/0x730 init/main.c:1276 do_initcall_level+0x13d/0x1f0 init/main.c:1349 do_initcalls+0x4b/0x90 init/main.c:1365 kernel_init_freeable+0x3d5/0x560 init/main.c:1589 kernel_init+0x19/0x1b0 init/main.c:1480 page_owner free stack trace missing Memory state around the buggy address: ffff88801a7e8e80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801a7e8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801a7e8f80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801a7e9000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801a7e9080: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 ==================================================================