Bluetooth: hci3: command 0x0419 tx timeout Bluetooth: hci4: command 0x0419 tx timeout Bluetooth: hci1: command 0x0419 tx timeout Bluetooth: hci0: command 0x0419 tx timeout ================================================================== BUG: KASAN: use-after-free in snd_seq_timer_interrupt+0x2c8/0x370 sound/core/seq/seq_timer.c:145 Read of size 8 at addr ffff8800a9d99bd8 by task syz-executor.5/8554 CPU: 0 PID: 8554 Comm: syz-executor.5 Not tainted 4.18.0-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+0x15a/0x20d lib/dump_stack.c:113 print_address_description.cold.6+0x9/0x244 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x305 mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 snd_seq_timer_interrupt+0x2c8/0x370 sound/core/seq/seq_timer.c:145 snd_timer_interrupt sound/core/timer.c:855 [inline] snd_timer_interrupt+0x617/0x1080 sound/core/timer.c:767 snd_timer_s_function+0xa7/0x120 sound/core/timer.c:1089 call_timer_fn+0x14d/0x590 kernel/time/timer.c:1326 expire_timers+0x268/0x3f0 kernel/time/timer.c:1363 __run_timers kernel/time/timer.c:1666 [inline] run_timer_softirq+0x1dc/0x530 kernel/time/timer.c:1692 __do_softirq+0x25c/0x986 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x17b/0x1c0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:527 [inline] smp_apic_timer_interrupt+0x12a/0x5b0 arch/x86/kernel/apic/apic.c:1055 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863 RIP: 0010:__read_once_size include/linux/compiler.h:188 [inline] RIP: 0010:compound_head include/linux/page-flags.h:142 [inline] RIP: 0010:virt_to_head_page include/linux/mm.h:659 [inline] RIP: 0010:check_heap_object mm/usercopy.c:232 [inline] RIP: 0010:__check_object_size mm/usercopy.c:259 [inline] RIP: 0010:__check_object_size+0xad/0x30c mm/usercopy.c:249 Code: fc ff df 48 c1 e8 0c 48 89 c2 48 b8 00 00 00 00 00 ea ff ff 48 c1 e2 06 48 01 c2 48 8d 42 08 48 89 c6 48 c1 ee 03 80 3c 0e 00 <0f> 85 db 01 00 00 48 8b 4a 08 f6 c1 01 0f 85 89 01 00 00 48 b9 00 RSP: 0018:ffff8800afcdfa68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffffea0002cf98c8 RBX: ffff8800b3e63c88 RCX: dffffc0000000000 RDX: ffffea0002cf98c0 RSI: 1ffffd400059f319 RDI: ffffffff8a4db309 RBP: ffff8800afcdfaa0 R08: 0000000000000008 R09: ffffffff8aeddd38 R10: ffff8800b083ebf0 R11: 0000000000000001 R12: 0000000000000004 R13: 0000000000000001 R14: ffff8800b3e63c8c R15: ffff8800b3e63c88 check_object_size include/linux/thread_info.h:119 [inline] check_copy_size include/linux/thread_info.h:150 [inline] copy_to_user include/linux/uaccess.h:154 [inline] xt_data_to_user+0x30/0x70 net/netfilter/x_tables.c:301 xt_target_to_user net/netfilter/x_tables.c:329 [inline] xt_target_to_user+0x142/0x1e0 net/netfilter/x_tables.c:325 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:879 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0x5e7/0x750 net/ipv6/netfilter/ip6_tables.c:1712 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x5f/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt net/ipv6/ipv6_sockglue.c:1382 [inline] ipv6_getsockopt+0x132/0x1c0 net/ipv6/ipv6_sockglue.c:1362 tcp_getsockopt net/ipv4/tcp.c:3550 [inline] tcp_getsockopt+0x6a/0xd0 net/ipv4/tcp.c:3544 sock_common_getsockopt+0x73/0xf0 net/core/sock.c:2999 __sys_getsockopt+0x12e/0x1f0 net/socket.c:1949 __do_sys_getsockopt net/socket.c:1960 [inline] __se_sys_getsockopt net/socket.c:1957 [inline] __x64_sys_getsockopt+0xb9/0x150 net/socket.c:1957 do_syscall_64+0xda/0x540 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x467bea Code: 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffec50492b8 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 0000000000000029 RCX: 0000000000467bea RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007ffec50492e0 R08: 00007ffec50492dc R09: 0079746972756365 R10: 00007ffec5049340 R11: 0000000000000212 R12: 00007ffec5049340 R13: 0000000000000003 R14: 00007ffec50492dc R15: 00000000005438c0 Allocated by task 10352: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 kmem_cache_alloc_trace+0x142/0x350 mm/slub.c:2735 kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:707 [inline] queue_new sound/core/seq/seq_queue.c:113 [inline] snd_seq_queue_alloc+0x52/0x4a0 sound/core/seq/seq_queue.c:195 snd_seq_ioctl_create_queue+0xaa/0x2e0 sound/core/seq/seq_clientmgr.c:1523 snd_seq_ioctl+0x1c6/0x3c0 sound/core/seq/seq_clientmgr.c:2145 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x196/0x1050 fs/ioctl.c:684 ksys_ioctl+0x62/0x90 fs/ioctl.c:701 __do_sys_ioctl fs/ioctl.c:708 [inline] __se_sys_ioctl fs/ioctl.c:706 [inline] __x64_sys_ioctl+0x6e/0xb0 fs/ioctl.c:706 do_syscall_64+0xda/0x540 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10346: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x167/0x240 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 slab_free_hook mm/slub.c:1373 [inline] slab_free_freelist_hook mm/slub.c:1400 [inline] slab_free mm/slub.c:2955 [inline] kfree+0x130/0x3b0 mm/slub.c:3908 queue_delete+0x8b/0xa0 sound/core/seq/seq_queue.c:156 snd_seq_queue_client_leave+0x27/0x110 sound/core/seq/seq_queue.c:594 seq_free_client1.part.8+0xef/0x260 sound/core/seq/seq_clientmgr.c:263 seq_free_client1 sound/core/seq/seq_clientmgr.c:256 [inline] seq_free_client+0x5c/0xd0 sound/core/seq/seq_clientmgr.c:285 snd_seq_release+0x48/0xe0 sound/core/seq/seq_clientmgr.c:367 __fput+0x232/0x780 fs/file_table.c:209 ____fput+0x9/0x10 fs/file_table.c:243 task_work_run+0x111/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:192 [inline] exit_to_usermode_loop+0x180/0x1e0 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x47a/0x540 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8800a9d99b80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 88 bytes inside of 512-byte region [ffff8800a9d99b80, ffff8800a9d99d80) The buggy address belongs to the page: page:ffffea0002a76600 count:1 mapcount:0 mapping:ffff8800b6002c00 index:0xffff8800a9d99180 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002cf5e00 0000000300000003 ffff8800b6002c00 raw: ffff8800a9d99180 00000000800c000a 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page allocated via order 1, migratetype Unmovable, gfp_mask 0x152c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:1906 [inline] prep_new_page mm/page_alloc.c:1914 [inline] get_page_from_freelist+0x2f35/0x46b0 mm/page_alloc.c:3345 __alloc_pages_nodemask+0x39e/0x2780 mm/page_alloc.c:4369 alloc_pages_current+0xd6/0x1b0 mm/mempolicy.c:2093 alloc_pages include/linux/gfp.h:492 [inline] alloc_slab_page mm/slub.c:1440 [inline] allocate_slab mm/slub.c:1585 [inline] new_slab+0x4a9/0x850 mm/slub.c:1656 new_slab_objects mm/slub.c:2419 [inline] ___slab_alloc+0x609/0x940 mm/slub.c:2571 __slab_alloc.isra.22+0x78/0xe0 mm/slub.c:2611 slab_alloc_node mm/slub.c:2674 [inline] slab_alloc mm/slub.c:2716 [inline] kmem_cache_alloc_trace+0x295/0x350 mm/slub.c:2733 kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:707 [inline] kernfs_fop_open+0x21d/0xc00 fs/kernfs/file.c:648 do_dentry_open+0x3da/0xd50 fs/open.c:794 vfs_open+0xfc/0x240 fs/open.c:908 do_last fs/namei.c:3399 [inline] path_openat+0x919/0x2290 fs/namei.c:3540 do_filp_open+0x177/0x250 fs/namei.c:3574 do_sys_open+0x1dc/0x360 fs/open.c:1101 __do_sys_open fs/open.c:1119 [inline] __se_sys_open fs/open.c:1114 [inline] __x64_sys_open+0x79/0xb0 fs/open.c:1114 do_syscall_64+0xda/0x540 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Memory state around the buggy address: ffff8800a9d99a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8800a9d99b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8800a9d99b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8800a9d99c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8800a9d99c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================