================================================================== BUG: KASAN: slab-out-of-bounds in copy_to_urb+0x261/0x460 sound/usb/pcm.c:1487 Write of size 192 at addr ffff88803687e900 by task syz.0.0/5321 CPU: 0 UID: 0 PID: 5321 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:200 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 copy_to_urb+0x261/0x460 sound/usb/pcm.c:1487 prepare_playback_urb+0x953/0x13d0 sound/usb/pcm.c:1611 prepare_outbound_urb+0x377/0xc50 sound/usb/endpoint.c:333 snd_usb_endpoint_start+0x4d8/0x14a0 sound/usb/endpoint.c:1591 start_endpoints+0xa1/0x280 sound/usb/pcm.c:291 snd_usb_substream_playback_trigger+0x3e0/0x7a0 sound/usb/pcm.c:1711 snd_pcm_do_start+0xb7/0x180 sound/core/pcm_native.c:1454 snd_pcm_action_single sound/core/pcm_native.c:1310 [inline] snd_pcm_action+0xe7/0x240 sound/core/pcm_native.c:1393 __snd_pcm_lib_xfer+0x1762/0x1ce0 sound/core/pcm_lib.c:2405 snd_pcm_oss_write3+0x1bc/0x320 sound/core/oss/pcm_oss.c:1241 snd_pcm_plug_write_transfer+0x2cb/0x4c0 sound/core/oss/pcm_plugin.c:630 snd_pcm_oss_write2 sound/core/oss/pcm_oss.c:1373 [inline] snd_pcm_oss_write1 sound/core/oss/pcm_oss.c:1439 [inline] snd_pcm_oss_write+0xb9c/0x1190 sound/core/oss/pcm_oss.c:2794 vfs_write+0x27e/0xb30 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f510898f6c9 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:00007f51098d3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f5108be6090 RCX: 00007f510898f6c9 RDX: 00000000000005ce RSI: 0000200000000000 RDI: 0000000000000005 RBP: 00007f5108a11f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5108be6128 R14: 00007f5108be6090 R15: 00007fff9b5e8a68 Allocated by task 5321: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __do_kmalloc_node mm/slub.c:5642 [inline] __kmalloc_noprof+0x411/0x7f0 mm/slub.c:5654 data_ep_set_params sound/usb/endpoint.c:1242 [inline] snd_usb_endpoint_set_params+0x1610/0x29a0 sound/usb/endpoint.c:1374 snd_usb_hw_params+0xb12/0x1280 sound/usb/pcm.c:576 snd_pcm_hw_params+0x89d/0x1d30 sound/core/pcm_native.c:804 snd_pcm_oss_change_params_locked+0x21cb/0x3e40 sound/core/oss/pcm_oss.c:965 snd_pcm_oss_make_ready_locked sound/core/oss/pcm_oss.c:1186 [inline] snd_pcm_oss_write1 sound/core/oss/pcm_oss.c:1404 [inline] snd_pcm_oss_write+0x2fb/0x1190 sound/core/oss/pcm_oss.c:2794 vfs_write+0x27e/0xb30 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803687e900 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes inside of allocated 144-byte region [ffff88803687e900, ffff88803687e990) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3687e anon flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff88801a0413c0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000000f5000000 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 0x52c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 16818658796, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3055 [inline] allocate_slab+0x96/0x350 mm/slub.c:3228 new_slab mm/slub.c:3282 [inline] ___slab_alloc+0xe94/0x18a0 mm/slub.c:4651 __slab_alloc+0x65/0x100 mm/slub.c:4770 __slab_alloc_node mm/slub.c:4846 [inline] slab_alloc_node mm/slub.c:5268 [inline] __do_kmalloc_node mm/slub.c:5641 [inline] __kmalloc_noprof+0x471/0x7f0 mm/slub.c:5654 kmalloc_noprof include/linux/slab.h:961 [inline] usb_alloc_urb+0x46/0x150 drivers/usb/core/urb.c:75 usb_internal_control_msg drivers/usb/core/message.c:96 [inline] usb_control_msg+0x118/0x3e0 drivers/usb/core/message.c:154 usb_get_status+0xe7/0x2a0 drivers/usb/core/message.c:1149 usb_get_std_status include/linux/usb.h:1892 [inline] hub_configure drivers/usb/core/hub.c:1655 [inline] hub_probe+0x1e37/0x37f0 drivers/usb/core/hub.c:2005 usb_probe_interface+0x668/0xc30 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0x9e0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:801 driver_probe_device+0x4f/0x430 drivers/base/dd.c:831 page_owner free stack trace missing Memory state around the buggy address: ffff88803687e880: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803687e900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88803687e980: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88803687ea00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803687ea80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================