BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic64_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:1515 [inline] BUG: KASAN: use-after-free in atomic_long_try_cmpxchg_acquire include/asm-generic/atomic-long.h:443 [inline] BUG: KASAN: use-after-free in __mutex_trylock_fast kernel/locking/mutex.c:173 [inline] BUG: KASAN: use-after-free in mutex_lock+0x7f/0xe0 kernel/locking/mutex.c:298 Write of size 8 at addr ffff88811c9a9040 by task syz.2.1174/5104 CPU: 1 PID: 5104 Comm: syz.2.1174 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x280/0x290 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic64_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:1515 [inline] atomic_long_try_cmpxchg_acquire include/asm-generic/atomic-long.h:443 [inline] __mutex_trylock_fast kernel/locking/mutex.c:173 [inline] mutex_lock+0x7f/0xe0 kernel/locking/mutex.c:298 steam_input_open+0x91/0x160 drivers/hid/hid-steam.c:297 input_open_device+0x14c/0x2a0 drivers/input/input.c:635 evdev_open_device drivers/input/evdev.c:400 [inline] evdev_open+0x4d2/0x5e0 drivers/input/evdev.c:487 chrdev_open+0x597/0x670 fs/char_dev.c:414 do_dentry_open+0x793/0x1090 fs/open.c:819 vfs_open+0x73/0x80 fs/open.c:942 do_open fs/namei.c:3391 [inline] path_openat+0x27ad/0x3160 fs/namei.c:3509 do_filp_open+0x1b3/0x3e0 fs/namei.c:3536 do_sys_openat2+0x14c/0x6d0 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_openat fs/open.c:1249 [inline] __se_sys_openat fs/open.c:1244 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1244 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc24f3d3510 Code: 48 89 44 24 20 75 93 44 89 54 24 0c e8 49 94 02 00 44 8b 54 24 0c 89 da 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 38 44 89 c7 89 44 24 0c e8 9c 94 02 00 8b 44 RSP: 002b:00007fc24de3cb70 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc24f3d3510 RDX: 0000000000000000 RSI: 00007fc24de3cc10 RDI: 00000000ffffff9c RBP: 00007fc24de3cc10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: cccccccccccccccd R13: 00007fc24f61c038 R14: 00007fc24f61bfa0 R15: 00007ffcf59a2068 Allocated by task 19: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc mm/kasan/common.c:509 [inline] __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] kmem_cache_alloc_trace+0x184/0x2e0 mm/slub.c:2979 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] br_multicast_new_port_group+0x69/0x530 net/bridge/br_multicast.c:1165 __br_multicast_add_group+0x483/0x730 net/bridge/br_multicast.c:1257 br_multicast_add_group net/bridge/br_multicast.c:1287 [inline] br_ip6_multicast_add_group net/bridge/br_multicast.c:1339 [inline] br_ip6_multicast_mld2_report net/bridge/br_multicast.c:2426 [inline] br_multicast_ipv6_rcv net/bridge/br_multicast.c:3124 [inline] br_multicast_rcv+0x2b29/0x4f30 net/bridge/br_multicast.c:3159 br_handle_frame_finish+0x378/0x1180 net/bridge/br_input.c:112 nf_hook_bridge_pre net/bridge/br_input.c:259 [inline] br_handle_frame+0x407/0x8e0 net/bridge/br_input.c:363 __netif_receive_skb_core+0xe95/0x2f90 net/core/dev.c:5296 __netif_receive_skb_one_core net/core/dev.c:5400 [inline] __netif_receive_skb+0x72/0x280 net/core/dev.c:5516 process_backlog+0x368/0x600 net/core/dev.c:6423 napi_poll net/core/dev.c:6874 [inline] net_rx_action+0x432/0xdd0 net/core/dev.c:6944 __do_softirq+0x255/0x563 kernel/softirq.c:309 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 kvfree_call_rcu+0x10c/0x620 kernel/rcu/tree.c:3539 br_multicast_destroy_port_group+0x9f/0xc0 net/bridge/br_multicast.c:582 br_multicast_gc net/bridge/br_multicast.c:681 [inline] br_multicast_gc_work+0x1b6/0x230 net/bridge/br_multicast.c:3206 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301 worker_thread+0xa6a/0x13b0 kernel/workqueue.c:2447 kthread+0x346/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff88811c9a9000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 64 bytes inside of 512-byte region [ffff88811c9a9000, ffff88811c9a9200) The buggy address belongs to the page: page:ffffea0004726a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88811c9ab000 pfn:0x11c9a8 head:ffffea0004726a00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 ffffea0004367708 ffffea0004340708 ffff888100043080 raw: ffff88811c9ab000 0000000000100005 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 134, ts 13128367687, free_ts 0 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5370 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2a6/0x450 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] __kmalloc_track_caller+0x1ef/0x320 mm/slub.c:4541 __kmalloc_reserve net/core/skbuff.c:144 [inline] __alloc_skb+0xdc/0x520 net/core/skbuff.c:212 alloc_skb include/linux/skbuff.h:1126 [inline] alloc_skb_with_frags+0xa2/0x560 net/core/skbuff.c:5993 sock_alloc_send_pskb+0x853/0x980 net/core/sock.c:2388 unix_dgram_sendmsg+0x5f4/0x17d0 net/unix/af_unix.c:1725 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] __sys_sendto+0x41d/0x580 net/socket.c:2006 __do_sys_sendto net/socket.c:2018 [inline] __se_sys_sendto net/socket.c:2014 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2014 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb page_owner free stack trace missing Memory state around the buggy address: ffff88811c9a8f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811c9a8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88811c9a9000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811c9a9080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811c9a9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================================ UBSAN: array-index-out-of-bounds in kernel/locking/osq_lock.c:34:9 index -30592 is out of range for type 'unsigned long[8]' CPU: 0 PID: 5104 Comm: syz.2.1174 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118 dump_stack+0x15/0x1c lib/dump_stack.c:135 ubsan_epilogue+0xe/0x40 lib/ubsan.c:148 __ubsan_handle_out_of_bounds+0xdf/0xf0 lib/ubsan.c:347 decode_cpu kernel/locking/osq_lock.c:34 [inline] osq_lock+0x4c9/0x510 kernel/locking/osq_lock.c:111 mutex_optimistic_spin kernel/locking/mutex.c:672 [inline] __mutex_lock_common kernel/locking/mutex.c:976 [inline] __mutex_lock+0x224/0xc50 kernel/locking/mutex.c:1117 __mutex_lock_slowpath+0xe/0x10 kernel/locking/mutex.c:1379 mutex_lock+0xcf/0xe0 kernel/locking/mutex.c:299 steam_input_open+0x91/0x160 drivers/hid/hid-steam.c:297 input_open_device+0x14c/0x2a0 drivers/input/input.c:635 evdev_open_device drivers/input/evdev.c:400 [inline] evdev_open+0x4d2/0x5e0 drivers/input/evdev.c:487 chrdev_open+0x597/0x670 fs/char_dev.c:414 do_dentry_open+0x793/0x1090 fs/open.c:819 vfs_open+0x73/0x80 fs/open.c:942 do_open fs/namei.c:3391 [inline] path_openat+0x27ad/0x3160 fs/namei.c:3509 do_filp_open+0x1b3/0x3e0 fs/namei.c:3536 do_sys_openat2+0x14c/0x6d0 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_openat fs/open.c:1249 [inline] __se_sys_openat fs/open.c:1244 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1244 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc24f3d3510 Code: 48 89 44 24 20 75 93 44 89 54 24 0c e8 49 94 02 00 44 8b 54 24 0c 89 da 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 38 44 89 c7 89 44 24 0c e8 9c 94 02 00 8b 44 RSP: 002b:00007fc24de3cb70 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc24f3d3510 RDX: 0000000000000000 RSI: 00007fc24de3cc10 RDI: 00000000ffffff9c RBP: 00007fc24de3cc10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: cccccccccccccccd R13: 00007fc24f61c038 R14: 00007fc24f61bfa0 R15: 00007ffcf59a2068 ================================================================================ general protection fault, probably for non-canonical address 0xe68640064664b480: 0000 [#1] PREEMPT SMP KASAN KASAN: maybe wild-memory-access in range [0x343220323325a400-0x343220323325a407] CPU: 0 PID: 5104 Comm: syz.2.1174 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2025 RIP: 0010:osq_lock+0x148/0x510 kernel/locking/osq_lock.c:126 Code: c5 08 4c 89 e8 48 c1 e8 03 4c 03 33 48 89 45 b0 42 80 3c 20 00 74 08 4c 89 ef e8 63 85 52 00 4d 89 75 00 4c 89 f0 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 f7 e8 49 85 52 00 48 8b 45 c0 49 89 06 RSP: 0018:ffffc90000cd7468 EFLAGS: 00010202 RAX: 068644064664b480 RBX: ffffffff85988ac0 RCX: 0000000000080000 RDX: ffffc9000246a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000cd74d0 R08: 0000000000000004 R09: 0000000000000003 R10: fffffbfff0d8ee48 R11: 1ffffffff0d8ee48 R12: dffffc0000000000 R13: ffff8881f7057208 R14: 343220323325a400 R15: ffff8881f7057214 FS: 00007fc24de3d6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc24ddfaf98 CR3: 000000011170e000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: mutex_optimistic_spin kernel/locking/mutex.c:672 [inline] __mutex_lock_common kernel/locking/mutex.c:976 [inline] __mutex_lock+0x224/0xc50 kernel/locking/mutex.c:1117 __mutex_lock_slowpath+0xe/0x10 kernel/locking/mutex.c:1379 mutex_lock+0xcf/0xe0 kernel/locking/mutex.c:299 steam_input_open+0x91/0x160 drivers/hid/hid-steam.c:297 input_open_device+0x14c/0x2a0 drivers/input/input.c:635 evdev_open_device drivers/input/evdev.c:400 [inline] evdev_open+0x4d2/0x5e0 drivers/input/evdev.c:487 chrdev_open+0x597/0x670 fs/char_dev.c:414 do_dentry_open+0x793/0x1090 fs/open.c:819 vfs_open+0x73/0x80 fs/open.c:942 do_open fs/namei.c:3391 [inline] path_openat+0x27ad/0x3160 fs/namei.c:3509 do_filp_open+0x1b3/0x3e0 fs/namei.c:3536 do_sys_openat2+0x14c/0x6d0 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_openat fs/open.c:1249 [inline] __se_sys_openat fs/open.c:1244 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1244 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fc24f3d3510 Code: 48 89 44 24 20 75 93 44 89 54 24 0c e8 49 94 02 00 44 8b 54 24 0c 89 da 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 38 44 89 c7 89 44 24 0c e8 9c 94 02 00 8b 44 RSP: 002b:00007fc24de3cb70 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc24f3d3510 RDX: 0000000000000000 RSI: 00007fc24de3cc10 RDI: 00000000ffffff9c RBP: 00007fc24de3cc10 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: cccccccccccccccd R13: 00007fc24f61c038 R14: 00007fc24f61bfa0 R15: 00007ffcf59a2068 Modules linked in: ---[ end trace 548dc83e21a2c865 ]--- RIP: 0010:osq_lock+0x148/0x510 kernel/locking/osq_lock.c:126 Code: c5 08 4c 89 e8 48 c1 e8 03 4c 03 33 48 89 45 b0 42 80 3c 20 00 74 08 4c 89 ef e8 63 85 52 00 4d 89 75 00 4c 89 f0 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 f7 e8 49 85 52 00 48 8b 45 c0 49 89 06 RSP: 0018:ffffc90000cd7468 EFLAGS: 00010202 RAX: 068644064664b480 RBX: ffffffff85988ac0 RCX: 0000000000080000 RDX: ffffc9000246a000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: ffffc90000cd74d0 R08: 0000000000000004 R09: 0000000000000003 R10: fffffbfff0d8ee48 R11: 1ffffffff0d8ee48 R12: dffffc0000000000 R13: ffff8881f7057208 R14: 343220323325a400 R15: ffff8881f7057214 FS: 00007fc24de3d6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc24ddfaf98 CR3: 000000011170e000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 08 4c 89 e8 or %cl,-0x18(%rcx,%rcx,4) 4: 48 c1 e8 03 shr $0x3,%rax 8: 4c 03 33 add (%rbx),%r14 b: 48 89 45 b0 mov %rax,-0x50(%rbp) f: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) 14: 74 08 je 0x1e 16: 4c 89 ef mov %r13,%rdi 19: e8 63 85 52 00 call 0x528581 1e: 4d 89 75 00 mov %r14,0x0(%r13) 22: 4c 89 f0 mov %r14,%rax 25: 48 c1 e8 03 shr $0x3,%rax * 29: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) <-- trapping instruction 2e: 74 08 je 0x38 30: 4c 89 f7 mov %r14,%rdi 33: e8 49 85 52 00 call 0x528581 38: 48 8b 45 c0 mov -0x40(%rbp),%rax 3c: 49 89 06 mov %rax,(%r14)