================================================================== BUG: KASAN: use-after-free in snd_timer_check_master sound/core/timer.c:228 [inline] BUG: KASAN: use-after-free in snd_timer_open+0x100a/0x1150 sound/core/timer.c:326 Read of size 8 at addr ffff888096b6da78 by task syz-executor.4/26140 CPU: 1 PID: 26140 Comm: syz-executor.4 Not tainted 5.4.0-rc6-next-20191111 #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/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 snd_timer_check_master sound/core/timer.c:228 [inline] snd_timer_open+0x100a/0x1150 sound/core/timer.c:326 snd_seq_timer_open+0x27f/0x590 sound/core/seq/seq_timer.c:281 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_kernel_client_ctl+0xf8/0x140 sound/core/seq/seq_clientmgr.c:2353 alloc_seq_queue.isra.0+0xdc/0x180 sound/core/seq/oss/seq_oss_init.c:357 snd_seq_oss_open+0x2ff/0x960 sound/core/seq/oss/seq_oss_init.c:215 odev_open+0x70/0x90 sound/core/seq/oss/seq_oss.c:125 soundcore_open+0x453/0x610 sound/sound_core.c:593 chrdev_open+0x245/0x6b0 fs/char_dev.c:414 do_dentry_open+0x4e6/0x1380 fs/open.c:797 vfs_open+0xa0/0xd0 fs/open.c:914 do_last fs/namei.c:3412 [inline] path_openat+0x10e4/0x4710 fs/namei.c:3529 do_filp_open+0x1a1/0x280 fs/namei.c:3559 do_sys_open+0x3fe/0x5d0 fs/open.c:1097 __do_sys_openat fs/open.c:1124 [inline] __se_sys_openat fs/open.c:1118 [inline] __x64_sys_openat+0x9d/0x100 fs/open.c:1118 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a219 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:00007f28ab1dcc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045a219 RDX: 0000000000040100 RSI: 00000000200000c0 RDI: ffffffffffffff9c RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f28ab1dd6d4 R13: 00000000004c735b R14: 00000000004dcfa0 R15: 00000000ffffffff Allocated by task 24605: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:510 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:670 [inline] alloc_fs_context+0x5a/0x780 fs/fs_context.c:261 fs_context_for_mount+0x25/0x30 fs/fs_context.c:307 do_new_mount fs/namespace.c:2807 [inline] do_mount+0x11b2/0x1b50 fs/namespace.c:3142 ksys_mount+0xdb/0x150 fs/namespace.c:3351 __do_sys_mount fs/namespace.c:3365 [inline] __se_sys_mount fs/namespace.c:3362 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3362 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 24605: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 put_fs_context+0x448/0x560 fs/fs_context.c:510 do_new_mount fs/namespace.c:2826 [inline] do_mount+0x6dc/0x1b50 fs/namespace.c:3142 ksys_mount+0xdb/0x150 fs/namespace.c:3351 __do_sys_mount fs/namespace.c:3365 [inline] __se_sys_mount fs/namespace.c:3362 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3362 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888096b6da00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 120 bytes inside of 256-byte region [ffff888096b6da00, ffff888096b6db00) The buggy address belongs to the page: page:ffffea00025adb40 refcount:1 mapcount:0 mapping:ffff8880aa4008c0 index:0xffff888096b6de00 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000250fec8 ffffea0002879148 ffff8880aa4008c0 raw: ffff888096b6de00 ffff888096b6d000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888096b6d900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888096b6d980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888096b6da00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888096b6da80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888096b6db00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================