================================================================== BUG: KASAN: slab-out-of-bounds in copy_to_urb+0x21f/0x410 sound/usb/pcm.c:1393 Write of size 264 at addr ffff88807bf8ff00 by task syz.4.1125/8102 CPU: 1 PID: 8102 Comm: syz.4.1125 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 copy_to_urb+0x21f/0x410 sound/usb/pcm.c:1393 prepare_playback_urb+0x912/0x1440 sound/usb/pcm.c:1521 snd_usb_endpoint_start+0x49c/0x1280 sound/usb/endpoint.c:1614 start_endpoints+0xa1/0x270 sound/usb/pcm.c:273 snd_usb_substream_playback_trigger+0x3eb/0x7d0 sound/usb/pcm.c:1625 snd_pcm_action_single sound/core/pcm_native.c:1293 [inline] snd_pcm_action+0xda/0x230 sound/core/pcm_native.c:1376 __snd_pcm_lib_xfer+0x179f/0x1c70 sound/core/pcm_lib.c:2310 snd_pcm_oss_write3+0x1b8/0x310 sound/core/oss/pcm_oss.c:1252 snd_pcm_plug_write_transfer+0x2b4/0x4a0 sound/core/oss/pcm_plugin.c:630 snd_pcm_oss_write2 sound/core/oss/pcm_oss.c:1384 [inline] snd_pcm_oss_write1 sound/core/oss/pcm_oss.c:1450 [inline] snd_pcm_oss_write+0xbae/0x1110 sound/core/oss/pcm_oss.c:2810 vfs_write+0x2c4/0x960 fs/read_write.c:582 ksys_write+0x143/0x240 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f5da7d8f749 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5da8c59038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f5da7fe5fa0 RCX: 00007f5da7d8f749 RDX: 00000000000005ce RSI: 0000200000000640 RDI: 0000000000000004 RBP: 00007f5da7e13f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5da7fe6038 R14: 00007f5da7fe5fa0 R15: 00007ffc947d3ff8 Allocated by task 8102: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xb0/0x240 mm/slab_common.c:949 data_ep_set_params sound/usb/endpoint.c:1259 [inline] snd_usb_endpoint_set_params+0x16bb/0x2a50 sound/usb/endpoint.c:1391 snd_usb_hw_params+0x123a/0x19b0 sound/usb/pcm.c:569 snd_pcm_hw_params+0x829/0x1c50 sound/core/pcm_native.c:779 snd_pcm_oss_change_params_locked+0x222c/0x3ee0 sound/core/oss/pcm_oss.c:976 snd_pcm_oss_make_ready_locked sound/core/oss/pcm_oss.c:1197 [inline] snd_pcm_oss_write1 sound/core/oss/pcm_oss.c:1415 [inline] snd_pcm_oss_write+0x2f8/0x1110 sound/core/oss/pcm_oss.c:2810 vfs_write+0x2c4/0x960 fs/read_write.c:582 ksys_write+0x143/0x240 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405 kernfs_unlink_open_file+0x413/0x4c0 fs/kernfs/file.c:653 kernfs_fop_release+0x12a/0x190 fs/kernfs/file.c:825 __fput+0x22c/0x920 fs/file_table.c:320 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405 kernfs_unlink_open_file+0x413/0x4c0 fs/kernfs/file.c:653 kernfs_fop_release+0x12a/0x190 fs/kernfs/file.c:825 __fput+0x22c/0x920 fs/file_table.c:320 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff88807bf8ff00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes inside of 128-byte region [ffff88807bf8ff00, ffff88807bf8ff80) The buggy address belongs to the physical page: page:ffffea0001efe3c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7bf8f flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000001 ffff8880174418c0 raw: 0000000000000000 0000000080100010 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 6527, tgid 6525 (syz.3.685), ts 300832027919, free_ts 280448344277 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 alloc_slab_page+0x5d/0x160 mm/slub.c:1799 allocate_slab mm/slub.c:1944 [inline] new_slab+0x87/0x2c0 mm/slub.c:1997 ___slab_alloc+0xbc6/0x1230 mm/slub.c:3154 __slab_alloc mm/slub.c:3240 [inline] slab_alloc_node mm/slub.c:3325 [inline] __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc+0xa0/0x240 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:699 [inline] hash_netport6_resize+0xc2d/0x1bb0 net/netfilter/ipset/ip_set_hash_gen.h:712 call_ad+0x43b/0xac0 net/netfilter/ipset/ip_set_core.c:1759 ip_set_ad+0x783/0x930 net/netfilter/ipset/ip_set_core.c:1843 nfnetlink_rcv_msg+0xb45/0x1120 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2511 nfnetlink_rcv+0x26d/0x2170 net/netfilter/nfnetlink.c:659 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1872 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479 kasan_depopulate_vmalloc_pte+0x67/0x80 mm/kasan/shadow.c:375 apply_to_pte_range mm/memory.c:2662 [inline] apply_to_pmd_range mm/memory.c:2706 [inline] apply_to_pud_range mm/memory.c:2742 [inline] apply_to_p4d_range mm/memory.c:2778 [inline] __apply_to_page_range+0x989/0xd10 mm/memory.c:2814 kasan_release_vmalloc+0x93/0xb0 mm/kasan/shadow.c:492 __purge_vmap_area_lazy+0xdb0/0x1900 mm/vmalloc.c:1782 drain_vmap_area_work+0x3c/0xd0 mm/vmalloc.c:1811 process_one_work+0x898/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88807bf8fe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ffff88807bf8fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807bf8ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ^ ffff88807bf8ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807bf90000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================