================================================================== BUG: KASAN: use-after-free in snd_pcm_timer_resolution+0xa3/0xc0 sound/core/pcm_timer.c:72 Read of size 4 at addr ffff8801abedec90 by task syz-executor0/9411 CPU: 1 PID: 9411 Comm: syz-executor0 Not tainted 4.16.0-rc7+ #370 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x24d lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23c/0x360 mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 snd_pcm_timer_resolution+0xa3/0xc0 sound/core/pcm_timer.c:72 snd_timer_resolution sound/core/timer.c:439 [inline] snd_timer_notify1+0x10f/0x400 sound/core/timer.c:462 snd_timer_start1+0x586/0x8f0 sound/core/timer.c:522 snd_timer_start+0x5d/0xa0 sound/core/timer.c:634 snd_timer_user_start.isra.12+0xde/0x130 sound/core/timer.c:1878 snd_timer_user_continue sound/core/timer.c:1902 [inline] __snd_timer_user_ioctl+0x1771/0x2c10 sound/core/timer.c:1977 snd_timer_user_ioctl+0x5f/0x7d sound/core/timer.c:1992 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4548b9 RSP: 002b:00007f3a99d36c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f3a99d376d4 RCX: 00000000004548b9 RDX: 0000000000000000 RSI: 00000000000054a2 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000002e3 R14: 00000000006f65e8 R15: 0000000000000000 Allocated by task 9407: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 kmem_cache_alloc_trace+0x136/0x740 mm/slab.c:3608 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] snd_pcm_attach_substream+0x3c5/0xb60 sound/core/pcm.c:1006 snd_pcm_open_substream+0x95/0x3b0 sound/core/pcm_native.c:2372 snd_pcm_oss_open_file sound/core/oss/pcm_oss.c:2309 [inline] snd_pcm_oss_open+0x7cf/0x1540 sound/core/oss/pcm_oss.c:2391 soundcore_open+0x321/0x630 sound/sound_core.c:597 chrdev_open+0x257/0x730 fs/char_dev.c:417 do_dentry_open+0x667/0xd40 fs/open.c:752 vfs_open+0x107/0x220 fs/open.c:866 do_last fs/namei.c:3379 [inline] path_openat+0x1151/0x3530 fs/namei.c:3519 do_filp_open+0x25b/0x3b0 fs/namei.c:3554 do_sys_open+0x502/0x6d0 fs/open.c:1059 SYSC_openat fs/open.c:1086 [inline] SyS_openat+0x30/0x40 fs/open.c:1080 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 9407: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3486 [inline] kfree+0xd9/0x260 mm/slab.c:3801 snd_pcm_detach_substream+0x134/0x290 sound/core/pcm.c:1057 snd_pcm_release_substream.part.44+0x23d/0x300 sound/core/pcm_native.c:2361 snd_pcm_release_substream+0x59/0x70 sound/core/pcm_native.c:2362 snd_pcm_oss_release_file.part.18+0x71/0xa0 sound/core/oss/pcm_oss.c:2268 snd_pcm_oss_release_file sound/core/oss/pcm_oss.c:2263 [inline] snd_pcm_oss_release+0x104/0x280 sound/core/oss/pcm_oss.c:2448 __fput+0x327/0x7e0 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x199/0x270 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x275/0x2f0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8801abede980 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 784 bytes inside of 2048-byte region [ffff8801abede980, ffff8801abedf180) The buggy address belongs to the page: page:ffffea0006afb780 count:1 mapcount:0 mapping:ffff8801abede100 index:0xffff8801abedf200 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801abede100 ffff8801abedf200 0000000100000002 raw: ffffea0006fee620 ffffea000731b420 ffff8801dac00c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801abedeb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801abedec00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801abedec80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801abeded00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801abeded80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================