================================================================== BUG: KASAN: slab-out-of-bounds in resample_shrink+0x4cd/0x820 sound/core/oss/rate.c:160 Read of size 2 at addr ffff8880a23c1600 by task syz-executor.1/20334 CPU: 1 PID: 20334 Comm: syz-executor.1 Not tainted 5.6.0-rc3-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+0x1fb/0x318 lib/dump_stack.c:118 print_address_description+0x74/0x5c0 mm/kasan/report.c:374 __kasan_report+0x149/0x1c0 mm/kasan/report.c:506 kasan_report+0x26/0x50 mm/kasan/common.c:641 __asan_report_load2_noabort+0x14/0x20 mm/kasan/generic_report.c:133 resample_shrink+0x4cd/0x820 sound/core/oss/rate.c:160 rate_transfer+0x51c/0x620 sound/core/oss/rate.c:279 snd_pcm_plug_read_transfer+0x1cc/0x270 sound/core/oss/pcm_plugin.c:651 snd_pcm_oss_read2 sound/core/oss/pcm_oss.c:1460 [inline] snd_pcm_oss_read1 sound/core/oss/pcm_oss.c:1517 [inline] snd_pcm_oss_read+0x7a6/0xd70 sound/core/oss/pcm_oss.c:2741 do_loop_readv_writev fs/read_write.c:714 [inline] do_iter_read+0x4a2/0x5b0 fs/read_write.c:935 vfs_readv fs/read_write.c:1053 [inline] do_readv+0x18c/0x330 fs/read_write.c:1090 __do_sys_readv fs/read_write.c:1181 [inline] __se_sys_readv fs/read_write.c:1178 [inline] __x64_sys_readv+0x7d/0x90 fs/read_write.c:1178 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c479 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f4da37c0c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 RAX: ffffffffffffffda RBX: 00007f4da37c16d4 RCX: 000000000045c479 RDX: 0000000000000001 RSI: 0000000020395000 RDI: 0000000000000003 RBP: 000000000076bfc0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000887 R14: 00000000004cada6 R15: 000000000076bfcc Allocated by task 20326: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc+0x118/0x1c0 mm/kasan/common.c:515 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node+0x4d/0x60 mm/slab.c:3623 kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x85/0x110 mm/util.c:574 kvmalloc include/linux/mm.h:645 [inline] kvzalloc include/linux/mm.h:653 [inline] snd_pcm_plugin_alloc+0x167/0x760 sound/core/oss/pcm_plugin.c:70 snd_pcm_plug_alloc+0x193/0x2e0 sound/core/oss/pcm_plugin.c:129 snd_pcm_oss_change_params_locked+0x2b34/0x4350 sound/core/oss/pcm_oss.c:1024 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1087 [inline] snd_pcm_oss_get_active_substream+0x22c/0x2a0 sound/core/oss/pcm_oss.c:1104 snd_pcm_oss_get_rate sound/core/oss/pcm_oss.c:1754 [inline] snd_pcm_oss_set_rate sound/core/oss/pcm_oss.c:1746 [inline] snd_pcm_oss_ioctl+0x1d66/0x4600 sound/core/oss/pcm_oss.c:2593 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl fs/ioctl.c:763 [inline] __do_sys_ioctl fs/ioctl.c:772 [inline] __se_sys_ioctl+0x113/0x190 fs/ioctl.c:770 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:770 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4196: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x12e/0x1e0 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10d/0x220 mm/slab.c:3757 kernfs_fop_release+0x21f/0x2c0 fs/kernfs/file.c:782 __fput+0x2e4/0x740 fs/file_table.c:280 ____fput+0x15/0x20 fs/file_table.c:313 task_work_run+0x176/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:164 [inline] prepare_exit_to_usermode+0x480/0x5b0 arch/x86/entry/common.c:195 syscall_return_slowpath+0x113/0x4a0 arch/x86/entry/common.c:278 do_syscall_64+0x11f/0x1c0 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a23c1400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes to the right of 512-byte region [ffff8880a23c1400, ffff8880a23c1600) The buggy address belongs to the page: page:ffffea000288f040 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000289d208 ffffea00027cdb48 ffff8880aa400a80 raw: 0000000000000000 ffff8880a23c1000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a23c1500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a23c1580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a23c1600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a23c1680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a23c1700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================