================================================================== BUG: KASAN: slab-out-of-bounds in resample_shrink+0x5eb/0x6f0 sound/core/oss/rate.c:160 Read of size 2 at addr ffff888092bef200 by task syz-executor994/9558 CPU: 0 PID: 9558 Comm: syz-executor994 Not tainted 5.6.0-rc3-next-20200228-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:374 __kasan_report.cold+0x1a/0x32 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:618 resample_shrink+0x5eb/0x6f0 sound/core/oss/rate.c:160 rate_transfer sound/core/oss/rate.c:279 [inline] rate_transfer+0x21a/0x2c0 sound/core/oss/rate.c:249 snd_pcm_plug_read_transfer+0x180/0x2a0 sound/core/oss/pcm_plugin.c:651 snd_pcm_oss_read2+0x1d0/0x3e0 sound/core/oss/pcm_oss.c:1461 snd_pcm_oss_read1 sound/core/oss/pcm_oss.c:1518 [inline] snd_pcm_oss_read+0x52b/0x6f0 sound/core/oss/pcm_oss.c:2742 do_loop_readv_writev fs/read_write.c:714 [inline] do_loop_readv_writev fs/read_write.c:701 [inline] do_iter_read+0x47f/0x650 fs/read_write.c:935 vfs_readv+0xf0/0x160 fs/read_write.c:1053 do_readv+0x133/0x2f0 fs/read_write.c:1090 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x44a4e9 Code: e8 ac 15 03 00 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 5b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f998a10dce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 RAX: ffffffffffffffda RBX: 00000000006e69e8 RCX: 000000000044a4e9 RDX: 0000000000000001 RSI: 0000000020395000 RDI: 0000000000000003 RBP: 00000000006e69e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006e69ec R13: 00007ffdfe6153cf R14: 00007f998a10e9c0 R15: 20c49ba5e353f7cf Allocated by task 9558: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:492 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:465 kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:574 kvmalloc include/linux/mm.h:650 [inline] kvzalloc include/linux/mm.h:658 [inline] snd_pcm_plugin_alloc+0x56c/0x770 sound/core/oss/pcm_plugin.c:70 snd_pcm_plug_alloc+0x145/0x330 sound/core/oss/pcm_plugin.c:129 snd_pcm_oss_change_params_locked+0x1c05/0x34b0 sound/core/oss/pcm_oss.c:1021 snd_pcm_oss_change_params+0x76/0xd0 sound/core/oss/pcm_oss.c:1084 snd_pcm_oss_get_active_substream+0x129/0x180 sound/core/oss/pcm_oss.c:1101 snd_pcm_oss_get_rate sound/core/oss/pcm_oss.c:1755 [inline] snd_pcm_oss_set_rate sound/core/oss/pcm_oss.c:1747 [inline] snd_pcm_oss_ioctl+0xebe/0x31c0 sound/core/oss/pcm_oss.c:2594 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0x11a/0x180 fs/ioctl.c:763 __do_sys_ioctl fs/ioctl.c:772 [inline] __se_sys_ioctl fs/ioctl.c:770 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:770 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888092bef000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes to the right of 512-byte region [ffff888092bef000, ffff888092bef200) The buggy address belongs to the page: page:ffffea00024afbc0 refcount:1 mapcount:0 mapping:000000002b175393 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002a4f148 ffffea0002619b48 ffff8880aa000a80 raw: 0000000000000000 ffff888092bef000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888092bef100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888092bef180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888092bef200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888092bef280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888092bef300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================