================================================================== BUG: KASAN: use-after-free in snd_timer_resolution+0xf1/0x110 sound/core/timer.c:487 Read of size 8 at addr ffff88808d432200 by task syz-executor.4/10396 CPU: 1 PID: 10396 Comm: syz-executor.4 Not tainted 5.5.0-rc6-next-20200116-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 snd_timer_resolution+0xf1/0x110 sound/core/timer.c:487 snd_seq_info_timer_read+0x95/0x2f1 sound/core/seq/seq_timer.c:480 snd_info_seq_show+0xcb/0x120 sound/core/info.c:362 seq_read+0x4ca/0x1170 fs/seq_file.c:229 proc_reg_read+0x1f8/0x2b0 fs/proc/inode.c:223 do_loop_readv_writev fs/read_write.c:714 [inline] do_loop_readv_writev fs/read_write.c:701 [inline] do_iter_read+0x4a4/0x660 fs/read_write.c:935 vfs_readv+0xf0/0x160 fs/read_write.c:997 do_preadv+0x1c4/0x280 fs/read_write.c:1089 __do_sys_preadv fs/read_write.c:1139 [inline] __se_sys_preadv fs/read_write.c:1134 [inline] __x64_sys_preadv+0x9a/0xf0 fs/read_write.c:1134 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b349 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:00007fa21db44c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00007fa21db456d4 RCX: 000000000045b349 RDX: 000000000000019e RSI: 00000000200017c0 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000084f R14: 00000000004c9c13 R15: 000000000075bf2c Allocated by task 10392: save_stack+0x23/0x90 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+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] snd_timer_instance_new+0x4a/0x300 sound/core/timer.c:142 snd_seq_timer_open+0x1c0/0x590 sound/core/seq/seq_timer.c:275 queue_use+0xf1/0x270 sound/core/seq/seq_queue.c:489 snd_seq_queue_alloc+0x2c5/0x4d0 sound/core/seq/seq_queue.c:176 snd_seq_ioctl_create_queue+0xb0/0x330 sound/core/seq/seq_clientmgr.c:1548 snd_seq_ioctl+0x21e/0x3e0 sound/core/seq/seq_clientmgr.c:2157 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0x123/0x180 fs/ioctl.c:760 __do_sys_ioctl fs/ioctl.c:769 [inline] __se_sys_ioctl fs/ioctl.c:767 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:767 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10391: save_stack+0x23/0x90 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+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 snd_timer_instance_free sound/core/timer.c:166 [inline] snd_timer_instance_free+0x7c/0xa0 sound/core/timer.c:160 snd_seq_timer_close+0x99/0xe0 sound/core/seq/seq_timer.c:319 queue_delete+0x52/0xb0 sound/core/seq/seq_queue.c:134 snd_seq_queue_client_leave+0x3a/0x1c0 sound/core/seq/seq_queue.c:571 seq_free_client1.part.0+0xec/0x240 sound/core/seq/seq_clientmgr.c:280 seq_free_client1 sound/core/seq/seq_clientmgr.c:273 [inline] seq_free_client+0x80/0xf0 sound/core/seq/seq_clientmgr.c:302 snd_seq_release+0x55/0xf0 sound/core/seq/seq_clientmgr.c:383 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath arch/x86/entry/common.c:278 [inline] do_syscall_64+0x676/0x790 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808d432200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes inside of 256-byte region [ffff88808d432200, ffff88808d432300) The buggy address belongs to the page: page:ffffea0002350c80 refcount:1 mapcount:0 mapping:ffff8880aa4008c0 index:0xffff88808d432a00 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000280bb08 ffffea000256cdc8 ffff8880aa4008c0 raw: ffff88808d432a00 ffff88808d432000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808d432100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808d432180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808d432200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808d432280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808d432300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================