================================================================== BUG: KASAN: slab-out-of-bounds in resample_shrink+0x5eb/0x6f0 sound/core/oss/rate.c:160 Read of size 2 at addr ffff88808eed1a00 by task syz-executor480/12626 CPU: 0 PID: 12626 Comm: syz-executor480 Not tainted 5.6.0-rc5-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:641 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:1460 snd_pcm_oss_read1 sound/core/oss/pcm_oss.c:1517 [inline] snd_pcm_oss_read+0x52b/0x6f0 sound/core/oss/pcm_oss.c:2741 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/0x7d0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4467e9 Code: e8 0c e8 ff ff 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:00007f9932d7cdb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 00000000004467e9 RDX: 0000000000000001 RSI: 0000000020395000 RDI: 0000000000000003 RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c R13: 00007ffce1e5238f R14: 00007f9932d7d9c0 R15: 000000000000002d Allocated by task 12626: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:488 kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:574 kvmalloc include/linux/mm.h:645 [inline] kvzalloc include/linux/mm.h:653 [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+0x1f8b/0x34d0 sound/core/oss/pcm_oss.c:1024 snd_pcm_oss_change_params+0x76/0xd0 sound/core/oss/pcm_oss.c:1087 snd_pcm_oss_get_active_substream+0x129/0x180 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+0xebe/0x31c0 sound/core/oss/pcm_oss.c:2593 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/0x7d0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10223: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:476 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 tomoyo_supervisor+0x34d/0xee0 security/tomoyo/common.c:2149 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x3e9/0x4d0 security/tomoyo/file.c:734 security_file_ioctl+0x6c/0xb0 security/security.c:1441 ksys_ioctl+0x50/0x180 fs/ioctl.c:757 __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/0x7d0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808eed1800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes to the right of 512-byte region [ffff88808eed1800, ffff88808eed1a00) The buggy address belongs to the page: page:ffffea00023bb440 refcount:1 mapcount:0 mapping:ffff8880aa000a80 index:0xffff88808eed1c00 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000260ae48 ffffea0002a1b888 ffff8880aa000a80 raw: ffff88808eed1c00 ffff88808eed1000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808eed1900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808eed1980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808eed1a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808eed1a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808eed1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================