================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:112 [inline] BUG: KASAN: slab-use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:400 [inline] BUG: KASAN: slab-use-after-free in __refcount_sub_and_test include/linux/refcount.h:389 [inline] BUG: KASAN: slab-use-after-free in __refcount_dec_and_test include/linux/refcount.h:432 [inline] BUG: KASAN: slab-use-after-free in refcount_dec_and_test include/linux/refcount.h:450 [inline] BUG: KASAN: slab-use-after-free in put_dev+0x2c/0xf8 drivers/usb/gadget/legacy/inode.c:165 Write of size 4 at addr ffff0000c9429840 by task syz.4.254/5684 CPU: 1 UID: 0 PID: 5684 Comm: syz.4.254 Tainted: G L syzkaller #0 PREEMPT Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/23/2026 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xb0/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0x8c/0xc4 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x17c/0x1ac mm/kasan/generic.c:200 __kasan_check_write+0x20/0x30 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:112 [inline] atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:400 [inline] __refcount_sub_and_test include/linux/refcount.h:389 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] put_dev+0x2c/0xf8 drivers/usb/gadget/legacy/inode.c:165 gadgetfs_kill_sb+0x48/0x80 drivers/usb/gadget/legacy/inode.c:2114 deactivate_locked_super+0xcc/0x128 fs/super.c:586 deactivate_super+0xd4/0xf4 fs/super.c:614 cleanup_mnt+0x190/0x220 fs/namespace.c:1392 __cleanup_mnt+0x20/0x30 fs/namespace.c:1399 task_work_run+0x1cc/0x25c kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x58c/0x1a74 kernel/exit.c:986 do_group_exit+0x198/0x238 kernel/exit.c:1129 get_signal+0xfb0/0x1094 kernel/signal.c:3112 arch_do_signal_or_restart+0x288/0x444c arch/arm64/kernel/signal.c:1671 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop+0x70/0x17c kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] arm64_syscall_exit_to_user_mode arch/arm64/kernel/entry-common.c:146 [inline] el0_svc+0x12c/0x1d8 arch/arm64/kernel/entry-common.c:797 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:815 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 Allocated by task 5586: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:78 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:570 poison_kmalloc_redzone mm/kasan/common.c:409 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5414 [inline] __kmalloc_noprof+0x34c/0x6c8 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] ieee802_11_parse_elems_full+0x114/0x2208 net/mac80211/parse.c:1071 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2548 [inline] ieee80211_inform_bss+0x114/0xd70 net/mac80211/scan.c:79 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline] cfg80211_inform_single_bss_data+0xac4/0x17a0 net/wireless/scan.c:2446 cfg80211_inform_bss_data+0x1ec/0x2d04 net/wireless/scan.c:3302 cfg80211_inform_bss_frame_data+0x348/0x714 net/wireless/scan.c:3394 ieee80211_bss_info_update+0x5d0/0x944 net/mac80211/scan.c:230 ieee80211_rx_bss_info net/mac80211/ibss.c:1065 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1546 [inline] ieee80211_ibss_rx_queued_mgmt+0x830/0x242c net/mac80211/ibss.c:1573 ieee80211_iface_process_skb net/mac80211/iface.c:1809 [inline] ieee80211_iface_work+0x600/0xd3c net/mac80211/iface.c:1863 cfg80211_wiphy_work+0x278/0x464 net/wireless/core.c:564 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3479 worker_thread+0x798/0xbd0 kernel/workqueue.c:3560 kthread+0x304/0x3d4 kernel/kthread.c:436 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854 Freed by task 5586: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:78 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:264 [inline] __kasan_slab_free+0x74/0xa4 mm/kasan/common.c:296 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2748 [inline] slab_free mm/slub.c:6509 [inline] kfree+0x188/0x658 mm/slub.c:6802 ieee80211_inform_bss+0x914/0xd70 net/mac80211/scan.c:164 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline] cfg80211_inform_single_bss_data+0xac4/0x17a0 net/wireless/scan.c:2446 cfg80211_inform_bss_data+0x1ec/0x2d04 net/wireless/scan.c:3302 cfg80211_inform_bss_frame_data+0x348/0x714 net/wireless/scan.c:3394 ieee80211_bss_info_update+0x5d0/0x944 net/mac80211/scan.c:230 ieee80211_rx_bss_info net/mac80211/ibss.c:1065 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1546 [inline] ieee80211_ibss_rx_queued_mgmt+0x830/0x242c net/mac80211/ibss.c:1573 ieee80211_iface_process_skb net/mac80211/iface.c:1809 [inline] ieee80211_iface_work+0x600/0xd3c net/mac80211/iface.c:1863 cfg80211_wiphy_work+0x278/0x464 net/wireless/core.c:564 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3479 worker_thread+0x798/0xbd0 kernel/workqueue.c:3560 kthread+0x304/0x3d4 kernel/kthread.c:436 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854 The buggy address belongs to the object at ffff0000c9429800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 64 bytes inside of freed 1024-byte region [ffff0000c9429800, ffff0000c9429c00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109428 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0001dc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0001dc0 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 05ffc00000000003 fffffdffc3250a01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c9429700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c9429780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000c9429800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000c9429880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000c9429900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28, CPU#1: syz.4.254/5684 Modules linked in: CPU: 1 UID: 0 PID: 5684 Comm: syz.4.254 Tainted: G B L syzkaller #0 PREEMPT Tainted: [B]=BAD_PAGE, [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/23/2026 pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 lr : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 sp : ffff80009b5576c0 x29: ffff80009b5576c0 x28: 00007dfe9bf8f864 x27: 0000000000000001 x26: ffff8000897fa960 x25: 1fffe0001950795b x24: 0000000000000003 x23: ffff0000ca83cad8 x22: ffff80008a46f220 x21: 00000000c250de31 x20: ffff0000c9429840 x19: ffff80008ae88000 x18: 1fffe000359eee28 x17: 3d3d3d3d3d3d3d3d x16: 3d3d3d3d3d3d3d3d x15: 3d3d3d3d3d3d3d3d x14: 0000000000000faf x13: 0000000000000001 x12: 0000000000000003 x11: 0000000000000000 x10: 0000000000000002 x9 : 4b90bcb829719a00 x8 : 4b90bcb829719a00 x7 : 0000000000000000 x6 : ffff800080484084 x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000802f4d68 x2 : 0000000100000000 x1 : ffff0000c51f3b00 x0 : 0000000000000000 Call trace: refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 (P) __refcount_sub_and_test include/linux/refcount.h:400 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] put_dev+0xcc/0xf8 drivers/usb/gadget/legacy/inode.c:165 gadgetfs_kill_sb+0x48/0x80 drivers/usb/gadget/legacy/inode.c:2114 deactivate_locked_super+0xcc/0x128 fs/super.c:586 deactivate_super+0xd4/0xf4 fs/super.c:614 cleanup_mnt+0x190/0x220 fs/namespace.c:1392 __cleanup_mnt+0x20/0x30 fs/namespace.c:1399 task_work_run+0x1cc/0x25c kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x58c/0x1a74 kernel/exit.c:986 do_group_exit+0x198/0x238 kernel/exit.c:1129 get_signal+0xfb0/0x1094 kernel/signal.c:3112 arch_do_signal_or_restart+0x288/0x444c arch/arm64/kernel/signal.c:1671 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop+0x70/0x17c kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] arm64_syscall_exit_to_user_mode arch/arm64/kernel/entry-common.c:146 [inline] el0_svc+0x12c/0x1d8 arch/arm64/kernel/entry-common.c:797 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:815 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606 irq event stamp: 2615 hardirqs last enabled at (2615): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:210 [inline] hardirqs last enabled at (2615): [] _raw_spin_unlock_irqrestore+0x38/0x98 kernel/locking/spinlock.c:221 hardirqs last disabled at (2614): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:153 [inline] hardirqs last disabled at (2614): [] _raw_spin_lock_irqsave+0x2c/0x7c kernel/locking/spinlock.c:181 softirqs last enabled at (1078): [] softirq_handle_end kernel/softirq.c:491 [inline] softirqs last enabled at (1078): [] handle_softirqs+0xb2c/0xcbc kernel/softirq.c:673 softirqs last disabled at (679): [] __do_softirq+0x14/0x20 kernel/softirq.c:679 ---[ end trace 0000000000000000 ]--- syz_tun (unregistering): left allmulticast mode syz_tun (unregistering): left promiscuous mode bridge0: port 1(syz_tun) entered disabled state