syzbot


KASAN: slab-out-of-bounds Write in copy_to_urb (2)

Status: upstream: reported C repro on 2026/01/31 10:36
Reported-by: syzbot+edede249fe01e92a19b2@syzkaller.appspotmail.com
First crash: 1d14h, last: 39m
Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: slab-out-of-bounds Write in copy_to_urb origin:lts-only 23 C done 7 64d 68d 3/3 fixed on 2026/01/11 15:32
upstream KASAN: slab-out-of-bounds Write in copy_to_urb (2) usb sound 23 C 5 21d 19d 26/29 upstream: reported C repro on 2026/01/13 01:31
linux-6.6 KASAN: slab-out-of-bounds Write in copy_to_urb origin:lts-only 23 C error 6 1d16h 69d 0/2 upstream: reported C repro on 2025/11/24 08:39
upstream KASAN: slab-out-of-bounds Write in copy_to_urb usb sound 23 C 33 28d 88d 29/29 fixed on 2026/01/07 12:29

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in copy_to_urb+0x21f/0x410 sound/usb/pcm.c:1393
Write of size 264 at addr ffff8880729d6400 by task syz.0.17/4436

CPU: 0 PID: 4436 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 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:0x7fcaac59aeb9
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:00007ffcc59f6fd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fcaac815fa0 RCX: 00007fcaac59aeb9
RDX: 00000000000005ce RSI: 0000200000000640 RDI: 0000000000000004
RBP: 00007fcaac608c1f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fcaac815fac R14: 00007fcaac815fa0 R15: 00007fcaac815fa0
 </TASK>

Allocated by task 4436:
 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

The buggy address belongs to the object at ffff8880729d6400
 which belongs to the cache kmalloc-192 of size 192
The buggy address is located 0 bytes inside of
 192-byte region [ffff8880729d6400, ffff8880729d64c0)

The buggy address belongs to the physical page:
page:ffffea0001ca7580 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x729d6
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888017441a00
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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 24, tgid 24 (kdevtmpfs), ts 85378607699, free_ts 85342998293
 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_pages_node include/linux/gfp.h:237 [inline]
 alloc_slab_page+0x4f/0x160 mm/slub.c:1801
 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_node+0xa0/0x240 mm/slab_common.c:943
 kmalloc_array_node include/linux/slab.h:676 [inline]
 kcalloc_node include/linux/slab.h:681 [inline]
 memcg_alloc_slab_cgroups+0x83/0x120 mm/memcontrol.c:2889
 account_slab mm/slab.h:635 [inline]
 allocate_slab mm/slub.c:1962 [inline]
 new_slab+0xc3/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]
 slab_alloc mm/slub.c:3367 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3374 [inline]
 kmem_cache_alloc_lru+0x1ae/0x2e0 mm/slub.c:3390
 alloc_inode_sb include/linux/fs.h:3245 [inline]
 shmem_alloc_inode+0x24/0x40 mm/shmem.c:3898
 alloc_inode fs/inode.c:261 [inline]
 new_inode_pseudo+0x5f/0x1c0 fs/inode.c:1063
 new_inode+0x25/0x1c0 fs/inode.c:1091
 shmem_get_inode+0x347/0xbf0 mm/shmem.c:2354
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
 free_slab mm/slub.c:2036 [inline]
 discard_slab mm/slub.c:2042 [inline]
 __unfreeze_partials+0x1a5/0x200 mm/slub.c:2591
 put_cpu_partial+0x17c/0x250 mm/slub.c:2667
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 __kmem_cache_alloc_node+0x140/0x260 mm/slub.c:3398
 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026
 kmalloc include/linux/slab.h:563 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 nsim_fib4_rt_create drivers/net/netdevsim/fib.c:280 [inline]
 nsim_fib4_rt_insert drivers/net/netdevsim/fib.c:426 [inline]
 nsim_fib4_event drivers/net/netdevsim/fib.c:464 [inline]
 nsim_fib_event drivers/net/netdevsim/fib.c:884 [inline]
 nsim_fib_event_work+0x891/0x3450 drivers/net/netdevsim/fib.c:1494
 process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292
 process_scheduled_works kernel/workqueue.c:2355 [inline]
 worker_thread+0xd27/0x1270 kernel/workqueue.c:2441
 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:
 ffff8880729d6380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffff8880729d6400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880729d6480: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                         ^
 ffff8880729d6500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8880729d6580: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/02 00:19 linux-6.1.y cd9b81672742 6b8752f2 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in copy_to_urb
2026/01/31 10:36 linux-6.1.y cd9b81672742 c75a2f6e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in copy_to_urb
2026/01/31 10:36 linux-6.1.y cd9b81672742 c75a2f6e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Write in copy_to_urb
* Struck through repros no longer work on HEAD.