================================================================== BUG: KASAN: slab-out-of-bounds in copy_to_urb+0x21f/0x410 sound/usb/pcm.c:1393 Write of size 264 at addr ffff888025331f00 by task syz.7.1260/9465 CPU: 1 PID: 9465 Comm: syz.7.1260 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x188/0x24e 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+0x235/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+0x910/0x1440 sound/usb/pcm.c:1521 snd_usb_endpoint_start+0x4a6/0x12e0 sound/usb/endpoint.c:1620 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+0x17ba/0x1c90 sound/core/pcm_lib.c:2310 snd_pcm_oss_write3+0x1b8/0x310 sound/core/oss/pcm_oss.c:1252 snd_pcm_plug_write_transfer+0x2ba/0x4b0 sound/core/oss/pcm_plugin.c:630 snd_pcm_oss_write2+0x1a5/0x410 sound/core/oss/pcm_oss.c:1384 snd_pcm_oss_write1 sound/core/oss/pcm_oss.c:1450 [inline] snd_pcm_oss_write+0x6a7/0xaf0 sound/core/oss/pcm_oss.c:2810 vfs_write+0x2e6/0xa30 fs/read_write.c:582 ksys_write+0x14c/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f3c4739aeb9 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:00007f3c48309028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f3c47615fa0 RCX: 00007f3c4739aeb9 RDX: 00000000000005ce RSI: 0000200000000640 RDI: 0000000000000004 RBP: 00007f3c47408c1f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3c47616038 R14: 00007f3c47615fa0 R15: 00007ffdaa85ce38 Allocated by task 9465: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384 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+0x17f5/0x2f00 sound/usb/endpoint.c:1397 snd_usb_hw_params+0x1239/0x19d0 sound/usb/pcm.c:569 snd_pcm_hw_params+0x8a2/0x1ce0 sound/core/pcm_native.c:779 snd_pcm_oss_change_params_locked+0x206b/0x3c50 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+0x277/0xaf0 sound/core/oss/pcm_oss.c:2810 vfs_write+0x2e6/0xa30 fs/read_write.c:582 ksys_write+0x14c/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3c0 kernel/workqueue.c:1361 __queue_work+0xba3/0xfb0 kernel/workqueue.c:1520 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x802/0x900 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers net/core/dev.c:2053 [inline] __dev_notify_flags+0x194/0x300 net/core/dev.c:8676 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8714 do_setlink+0xba1/0x3e60 net/core/rtnetlink.c:2833 __rtnl_newlink net/core/rtnetlink.c:3608 [inline] rtnl_newlink+0x177c/0x2080 net/core/rtnetlink.c:3655 rtnetlink_rcv_msg+0x87c/0xfc0 net/core/rtnetlink.c:6150 netlink_rcv_skb+0x1fb/0x450 net/netlink/af_netlink.c:2511 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1872 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x497/0x650 net/socket.c:2152 __do_sys_sendto net/socket.c:2164 [inline] __se_sys_sendto net/socket.c:2160 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2160 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 insert_work+0x54/0x3c0 kernel/workqueue.c:1361 __queue_work+0xba3/0xfb0 kernel/workqueue.c:1520 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:512 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x802/0x900 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers net/core/dev.c:2053 [inline] register_netdevice+0x1640/0x1ae0 net/core/dev.c:10237 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:317 [inline] nsim_create+0x35f/0x410 drivers/net/netdevsim/netdev.c:365 __nsim_dev_port_add+0x703/0xb70 drivers/net/netdevsim/dev.c:1396 nsim_dev_port_add_all+0x35/0xe0 drivers/net/netdevsim/dev.c:1454 nsim_dev_reload_create drivers/net/netdevsim/dev.c:1506 [inline] nsim_dev_reload_up+0x45c/0x7c0 drivers/net/netdevsim/dev.c:988 devlink_reload+0x2bf/0x670 net/devlink/leftover.c:4479 devlink_pernet_pre_exit+0x122/0x280 net/devlink/leftover.c:12501 ops_pre_exit_list net/core/net_namespace.c:162 [inline] cleanup_net+0x591/0xba0 net/core/net_namespace.c:620 process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888025331f00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes inside of 192-byte region [ffff888025331f00, ffff888025331fc0) The buggy address belongs to the physical page: page:ffffea000094cc40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x25331 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000074da80 dead000000000003 ffff888017441a00 raw: 0000000000000000 0000000000100010 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 0x12c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY), pid 46, tgid 46 (kworker/u4:3), ts 7263559270, free_ts 7206364519 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+0x1a1e/0x1ab0 mm/page_alloc.c:4328 __alloc_pages+0x1ec/0x4f0 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/0x1240 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 bio_map_kern block/blk-map.c:398 [inline] blk_rq_map_kern+0x1d5/0x810 block/blk-map.c:795 __scsi_execute+0x1db/0x750 drivers/scsi/scsi_lib.c:225 scsi_execute_req include/scsi/scsi_device.h:503 [inline] scsi_probe_lun drivers/scsi/scsi_scan.c:677 [inline] scsi_probe_and_add_lun+0x4a3/0x44b0 drivers/scsi/scsi_scan.c:1194 __scsi_scan_target+0x1d4/0x1050 drivers/scsi/scsi_scan.c:1718 scsi_scan_channel drivers/scsi/scsi_scan.c:1806 [inline] scsi_scan_host_selected+0x36e/0x690 drivers/scsi/scsi_scan.c:1835 do_scsi_scan_host drivers/scsi/scsi_scan.c:1974 [inline] do_scan_async+0x11a/0x750 drivers/scsi/scsi_scan.c:1984 async_run_entry_fn+0x9f/0x3e0 kernel/async.c:127 process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292 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 __vunmap+0x856/0xa00 mm/vmalloc.c:2726 free_work+0x56/0x80 mm/vmalloc.c:97 process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1270 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: ffff888025331e80: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ffff888025331f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888025331f80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888025332000: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888025332080: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ==================================================================