================================================================== BUG: KASAN: slab-use-after-free in find_endpoint drivers/usb/gadget/udc/dummy_hcd.c:1650 [inline] BUG: KASAN: slab-use-after-free in dummy_timer+0xcee/0x4ce0 drivers/usb/gadget/udc/dummy_hcd.c:1922 Read of size 1 at addr ffff88805568d8e8 by task syz.0.3870/24188 CPU: 1 UID: 0 PID: 24188 Comm: syz.0.3870 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 find_endpoint drivers/usb/gadget/udc/dummy_hcd.c:1650 [inline] dummy_timer+0xcee/0x4ce0 drivers/usb/gadget/udc/dummy_hcd.c:1922 __run_hrtimer kernel/time/hrtimer.c:2109 [inline] __hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2166 hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2183 handle_softirqs+0x265/0x8d0 kernel/softirq.c:669 __do_softirq kernel/softirq.c:703 [inline] invoke_softirq kernel/softirq.c:542 [inline] __irq_exit_rcu+0xce/0x250 kernel/softirq.c:794 irq_exit_rcu+0x9/0x30 kernel/softirq.c:817 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1073 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1073 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:211 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:221 Code: f7 e8 dd b0 88 f5 f7 c3 00 02 00 00 74 05 e8 00 79 b5 f5 9c 58 a9 00 02 00 00 75 29 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 34 97 79 f5 65 48 8b 05 7c 1a ca 08 48 85 c0 74 18 5b 41 5e e9 RSP: 0018:ffffc9000637fad0 EFLAGS: 00000206 RAX: 0000000000000002 RBX: 0000000000000246 RCX: 8000000000000001 RDX: 0000000000000006 RSI: ffffffff8e6ba7e1 RDI: 0000000000000001 RBP: 0000000000000007 R08: ffffffff91bf13bf R09: 1ffffffff237e277 R10: dffffc0000000000 R11: fffffbfff237e278 R12: 1ffff1100569dc95 R13: dffffc0000000000 R14: ffff888027b48000 R15: 0000000000000000 spin_unlock_irqrestore include/linux/spinlock.h:425 [inline] dummy_urb_enqueue+0x5a2/0x7a0 drivers/usb/gadget/udc/dummy_hcd.c:1369 usb_hcd_submit_urb+0x328/0x1b60 drivers/usb/core/hcd.c:1543 usbtmc_generic_read+0x5ca/0x18c0 drivers/usb/class/usbtmc.c:926 usbtmc_ioctl_generic_read+0xf5/0x190 drivers/usb/class/usbtmc.c:1073 usbtmc_ioctl+0x463/0x720 drivers/usb/class/usbtmc.c:2142 vfs_ioctl fs/ioctl.c:52 [inline] __do_sys_ioctl fs/ioctl.c:604 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:590 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x00007f6b94da9559 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:00007f6b95c25028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f6b95025fa0 RCX: 00007f6b94da9559 RDX: 00002000000002c0 RSI: 00000000c0145b0e RDI: 0000000000000004 RBP: 00007f6b94e38136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f6b95026038 R14: 00007f6b95025fa0 R15: 00007ffea61f9cb8 Allocated by task 22879: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3f/0x90 mm/kasan/common.c:79 poison_kmalloc_redzone mm/kasan/common.c:412 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:429 kasan_kmalloc include/linux/kasan.h:267 [inline] __kmalloc_cache_noprof+0x31c/0x610 mm/slub.c:5718 _kmalloc_noprof include/linux/slab.h:984 [inline] batadv_forw_packet_alloc+0x17a/0x380 net/batman-adv/send.c:526 batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:648 [inline] batadv_iv_ogm_queue_add+0x8cb/0xd80 net/batman-adv/bat_iv_ogm.c:767 batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:955 [inline] batadv_iv_ogm_schedule+0x84b/0xfc0 net/batman-adv/bat_iv_ogm.c:1009 batadv_iv_send_outstanding_bat_ogm_packet+0x739/0x8a0 net/batman-adv/bat_iv_ogm.c:1927 process_one_work kernel/workqueue.c:3511 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3594 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3675 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 6956: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3f/0x90 mm/kasan/common.c:79 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:599 poison_slab_object mm/kasan/common.c:267 [inline] __kasan_slab_free+0x70/0x90 mm/kasan/common.c:299 kasan_slab_free include/linux/kasan.h:239 [inline] slab_free_hook mm/slub.c:2807 [inline] slab_free mm/slub.c:6672 [inline] kfree+0x1c7/0x650 mm/slub.c:6982 process_one_work kernel/workqueue.c:3511 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3594 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3675 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 __kasan_record_aux_stack+0xc5/0xe0 mm/kasan/generic.c:561 insert_work+0x3d/0x330 kernel/workqueue.c:2359 __queue_work+0xb17/0x12d0 kernel/workqueue.c:2562 call_timer_fn+0x18d/0x5f0 kernel/time/timer.c:1749 expire_timers kernel/time/timer.c:1795 [inline] __run_timers kernel/time/timer.c:2375 [inline] __run_timer_base+0x67e/0x8b0 kernel/time/timer.c:2387 run_timer_base kernel/time/timer.c:2396 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2406 handle_softirqs+0x265/0x8d0 kernel/softirq.c:669 __do_softirq kernel/softirq.c:703 [inline] invoke_softirq kernel/softirq.c:542 [inline] __irq_exit_rcu+0xce/0x250 kernel/softirq.c:794 irq_exit_rcu+0x9/0x30 kernel/softirq.c:817 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1073 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1073 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 The buggy address belongs to the object at ffff88805568d800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 232 bytes inside of freed 512-byte region [ffff88805568d800, ffff88805568da00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88805568e000 pfn:0x5568c head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801c841c80 ffffea0001996f10 ffffea0001519410 raw: ffff88805568e000 0000000000100006 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801c841c80 ffffea0001996f10 ffffea0001519410 head: ffff88805568e000 0000000000100006 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 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 6015, tgid 6009 (syz.2.31), ts 94073016628 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1872 prep_new_page+0x22/0xb0 mm/page_alloc.c:1880 get_page_from_freelist+0x2487/0x24f0 mm/page_alloc.c:3970 __alloc_frozen_pages_noprof+0x211/0x450 mm/page_alloc.c:5512 alloc_slab_page mm/slub.c:3423 [inline] allocate_slab+0x7d/0x5e0 mm/slub.c:3538 new_slab mm/slub.c:3589 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7578 refill_sheaf mm/slub.c:2953 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4849 alloc_from_pcs mm/slub.c:4925 [inline] slab_alloc_node mm/slub.c:5059 [inline] __kmalloc_cache_noprof+0x39e/0x610 mm/slub.c:5714 _kmalloc_noprof include/linux/slab.h:984 [inline] snd_mixer_oss_build_test+0x7a/0x380 sound/core/oss/mixer_oss.c:895 snd_mixer_oss_build_test_all sound/core/oss/mixer_oss.c:950 [inline] snd_mixer_oss_build_input+0x2a2/0x1370 sound/core/oss/mixer_oss.c:1019 snd_mixer_oss_build sound/core/oss/mixer_oss.c:1279 [inline] snd_mixer_oss_notify_handler+0x953/0x1070 sound/core/oss/mixer_oss.c:1357 snd_mixer_oss_notify sound/core/init.c:93 [inline] snd_card_register+0x594/0x740 sound/core/init.c:936 f_midi2_create_card drivers/usb/gadget/function/f_midi2.c:1640 [inline] f_midi2_bind+0x159a/0x2c90 drivers/usb/gadget/function/f_midi2.c:1972 usb_add_function+0x2e1/0x9f0 drivers/usb/gadget/composite.c:333 configfs_composite_bind+0xde0/0x1410 drivers/usb/gadget/configfs.c:1802 gadget_bind_driver+0x2ca/0x9e0 drivers/usb/gadget/udc/core.c:1663 page last free pid 5994 tgid 5994 ts 92952469148 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1414 [inline] __free_frozen_pages+0xd1a/0xe10 mm/page_alloc.c:2970 __slab_free+0x269/0x2c0 mm/slub.c:5964 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:364 kasan_slab_alloc include/linux/kasan.h:257 [inline] slab_post_alloc_hook mm/slub.c:4757 [inline] slab_alloc_node mm/slub.c:5071 [inline] kmem_cache_alloc_noprof+0x2b4/0x600 mm/slub.c:5085 alloc_filename fs/namei.c:147 [inline] do_getname+0x2e/0x250 fs/namei.c:187 class_filename_flags_constructor include/linux/fs.h:2602 [inline] do_sys_openat2+0xce/0x200 fs/open.c:1495 do_sys_open fs/open.c:1502 [inline] __do_sys_openat fs/open.c:1842 [inline] __se_sys_openat fs/open.c:1837 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1837 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88805568d780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805568d800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88805568d880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805568d900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805568d980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: f7 e8 imul %eax 2: dd b0 88 f5 f7 c3 fnsave -0x3c080a78(%rax) 8: 00 02 add %al,(%rdx) a: 00 00 add %al,(%rax) c: 74 05 je 0x13 e: e8 00 79 b5 f5 call 0xf5b57913 13: 9c pushf 14: 58 pop %rax 15: a9 00 02 00 00 test $0x200,%eax 1a: 75 29 jne 0x45 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 34 97 79 f5 call 0xf5799763 <-- trapping instruction 2f: 65 48 8b 05 7c 1a ca mov %gs:0x8ca1a7c(%rip),%rax # 0x8ca1ab3 36: 08 37: 48 85 c0 test %rax,%rax 3a: 74 18 je 0x54 3c: 5b pop %rbx 3d: 41 5e pop %r14 3f: e9 .byte 0xe9