program: syz_emit_vhci(&(0x7f0000000540)=ANY=[@ANYBLOB="043e1f0a"], 0x22) syz_emit_vhci(&(0x7f0000000040)=ANY=[@ANYBLOB="0200300c000800"], 0x11) ioctl$FS_IOC_SET_ENCRYPTION_POLICY(0xffffffffffffffff, 0x40086602, 0x0) r0 = socket$inet6(0xa, 0x3, 0x1) setsockopt$IP6T_SO_SET_REPLACE(r0, 0x29, 0x40, &(0x7f0000000580)=@raw={'raw\x00', 0x8, 0x3, 0x560, 0x0, 0xffffffff, 0xffffffff, 0xf0, 0xffffffff, 0x490, 0xffffffff, 0xffffffff, 0x490, 0xffffffff, 0x3, 0x0, {[{{@ipv6={@private0, @mcast2, [], [], 'veth0_macvtap\x00', 'dvmrp1\x00'}, 0x0, 0xa8, 0xf0}, @common=@inet=@TEE={0x48, 'TEE\x00', 0x1, {@ipv6=@mcast2, 'vxcan1\x00', {0x8}}}}, {{@ipv6={@empty, @ipv4={'\x00', '\xff\xff', @dev={0xac, 0x14, 0x14, 0xfd}}, [], [0x0, 0xffffffff], 'pim6reg\x00', 'gre0\x00', {}, {}, 0x62}, 0x0, 0x358, 0x3a0, 0x0, {}, [@common=@inet=@hashlimit3={{0x158}, {'veth0_virt_wifi\x00', {0x4, 0x8, 0x20, 0x5e1b2d47, 0xf91, 0x5, 0x4, 0x9f7, 0x18}, {0x8}}}, @common=@inet=@hashlimit3={{0x158}, {'wg1\x00', {0x3, 0x0, 0x41, 0x0, 0x0, 0x1000, 0x6, 0x5}}}]}, @common=@inet=@TEE={0x48, 'TEE\x00', 0x1, {@ipv6=@mcast2, 'bridge_slave_0\x00', {0x53}}}}], {{'\x00', 0x0, 0xa8, 0xd0}, {0x28, '\x00', 0x7}}}}, 0x5c0) ioctl$TUNSETCARRIER(0xffffffffffffffff, 0x400454e2, 0x0) ioctl$TUNSETIFF(0xffffffffffffffff, 0x400454ca, 0x0) r1 = socket$inet6_sctp(0xa, 0x5, 0x84) syz_usb_connect$cdc_ecm(0x6, 0x4d, 0x0, 0x0) ioctl$ifreq_SIOCGIFINDEX_vcan(r1, 0x8933, &(0x7f0000000540)={'vxcan0\x00', 0x0}) r3 = socket$nl_route(0x10, 0x3, 0x0) sendmsg$nl_route_sched(r3, &(0x7f0000000140)={0x0, 0x0, &(0x7f0000000240)={&(0x7f0000000200)=@newtfilter={0x24, 0x11, 0x1, 0x0, 0x0, {0x0, 0x0, 0x74, r2, {0x10, 0xb}}}, 0x24}, 0x1, 0xf0ffffffffffff}, 0x0) socketpair(0x1, 0x1, 0x0, 0x0) ioctl$PERF_EVENT_IOC_SET_FILTER(0xffffffffffffffff, 0x8914, 0x0) syz_emit_vhci(&(0x7f0000000080)=ANY=[@ANYBLOB="0405"], 0x7) syz_emit_vhci(&(0x7f0000000100)=@HCI_EVENT_PKT={0x4, @hci_ev_role_change={{0x12, 0x8}}}, 0xb) mmap(&(0x7f0000000000/0xb36000)=nil, 0xb36000, 0xb635773f06ebbeee, 0x8031, 0xffffffffffffffff, 0x0) [ 108.000649][ T5301] Bluetooth: hci0: command tx timeout [ 108.260174][ T5321] xt_hashlimit: size too large, truncated to 1048576 [ 108.316624][ T5322] netlink: 4 bytes leftover after parsing attributes in process `syz.0.0'. [ 110.064426][ T5301] Bluetooth: hci0: command tx timeout [ 110.304590][ T4664] ================================================================== [ 110.308813][ T4664] BUG: KASAN: slab-use-after-free in hci_conn_drop+0x34/0x2a0 [ 110.312568][ T4664] Write of size 4 at addr ffff888012638010 by task kworker/u5:1/4664 [ 110.316160][ T4664] [ 110.317388][ T4664] CPU: 0 UID: 0 PID: 4664 Comm: kworker/u5:1 Not tainted syzkaller #0 PREEMPT(full) [ 110.317406][ T4664] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 110.317416][ T4664] Workqueue: hci0 hci_cmd_sync_work [ 110.317443][ T4664] Call Trace: [ 110.317454][ T4664] [ 110.317461][ T4664] dump_stack_lvl+0xe8/0x150 [ 110.317481][ T4664] print_report+0xba/0x230 [ 110.317495][ T4664] ? hci_conn_drop+0x34/0x2a0 [ 110.317507][ T4664] kasan_report+0x117/0x150 [ 110.317521][ T4664] ? hci_conn_drop+0x34/0x2a0 [ 110.317535][ T4664] kasan_check_range+0x264/0x2c0 [ 110.317548][ T4664] hci_conn_drop+0x34/0x2a0 [ 110.317562][ T4664] ? __pfx_le_read_features_complete+0x10/0x10 [ 110.317578][ T4664] hci_cmd_sync_work+0x262/0x400 [ 110.317598][ T4664] ? process_scheduled_works+0xa25/0x1830 [ 110.317615][ T4664] process_scheduled_works+0xb02/0x1830 [ 110.317648][ T4664] ? __pfx_process_scheduled_works+0x10/0x10 [ 110.317667][ T4664] ? assign_work+0x3d5/0x5e0 [ 110.317684][ T4664] worker_thread+0xa50/0xfc0 [ 110.317707][ T4664] kthread+0x388/0x470 [ 110.317718][ T4664] ? __pfx_worker_thread+0x10/0x10 [ 110.317732][ T4664] ? __pfx_kthread+0x10/0x10 [ 110.317744][ T4664] ret_from_fork+0x51e/0xb90 [ 110.317762][ T4664] ? __pfx_ret_from_fork+0x10/0x10 [ 110.317778][ T4664] ? __switch_to+0xc7d/0x1450 [ 110.317794][ T4664] ? __pfx_kthread+0x10/0x10 [ 110.317806][ T4664] ret_from_fork_asm+0x1a/0x30 [ 110.317829][ T4664] [ 110.317834][ T4664] [ 110.390068][ T4664] Allocated by task 4664: [ 110.392673][ T4664] kasan_save_track+0x3e/0x80 [ 110.395201][ T4664] __kasan_kmalloc+0x93/0xb0 [ 110.397465][ T4664] __kmalloc_cache_noprof+0x31c/0x660 [ 110.399950][ T4664] __hci_conn_add+0x3c4/0x1e00 [ 110.402108][ T4664] le_conn_complete_evt+0x706/0x1430 [ 110.404503][ T4664] hci_le_enh_conn_complete_evt+0x189/0x490 [ 110.407983][ T4664] hci_event_packet+0x7af/0x12c0 [ 110.411384][ T4664] hci_rx_work+0x3ee/0x1030 [ 110.413939][ T4664] process_scheduled_works+0xb02/0x1830 [ 110.416476][ T4664] worker_thread+0xa50/0xfc0 [ 110.418567][ T4664] kthread+0x388/0x470 [ 110.420375][ T4664] ret_from_fork+0x51e/0xb90 [ 110.422810][ T4664] ret_from_fork_asm+0x1a/0x30 [ 110.425100][ T4664] [ 110.426448][ T4664] Freed by task 5301: [ 110.428437][ T4664] kasan_save_track+0x3e/0x80 [ 110.430856][ T4664] kasan_save_free_info+0x46/0x50 [ 110.433558][ T4664] __kasan_slab_free+0x5c/0x80 [ 110.436273][ T4664] kfree+0x1c1/0x630 [ 110.438342][ T4664] device_release+0x9e/0x1d0 [ 110.440605][ T4664] kobject_put+0x228/0x560 [ 110.442935][ T4664] hci_conn_del+0xc36/0x1230 [ 110.445174][ T4664] hci_disconn_complete_evt+0x64e/0x950 [ 110.448051][ T4664] hci_event_packet+0x805/0x12c0 [ 110.450716][ T4664] hci_rx_work+0x3ee/0x1030 [ 110.453186][ T4664] process_scheduled_works+0xb02/0x1830 [ 110.455724][ T4664] worker_thread+0xa50/0xfc0 [ 110.457893][ T4664] kthread+0x388/0x470 [ 110.459834][ T4664] ret_from_fork+0x51e/0xb90 [ 110.461913][ T4664] ret_from_fork_asm+0x1a/0x30 [ 110.464239][ T4664] [ 110.465641][ T4664] The buggy address belongs to the object at ffff888012638000 [ 110.465641][ T4664] which belongs to the cache kmalloc-8k of size 8192 [ 110.472948][ T4664] The buggy address is located 16 bytes inside of [ 110.472948][ T4664] freed 8192-byte region [ffff888012638000, ffff88801263a000) [ 110.479174][ T4664] [ 110.480364][ T4664] The buggy address belongs to the physical page: [ 110.483306][ T4664] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12638 [ 110.487881][ T4664] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 110.491518][ T4664] flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) [ 110.495054][ T4664] page_type: f5(slab) [ 110.496934][ T4664] raw: 00fff00000000040 ffff88801ac42280 dead000000000100 dead000000000122 [ 110.501736][ T4664] raw: 0000000000000000 0000000800020002 00000000f5000000 0000000000000000 [ 110.506622][ T4664] head: 00fff00000000040 ffff88801ac42280 dead000000000100 dead000000000122 [ 110.510568][ T4664] head: 0000000000000000 0000000800020002 00000000f5000000 0000000000000000 [ 110.514387][ T4664] head: 00fff00000000003 ffffea0000498e01 00000000ffffffff 00000000ffffffff [ 110.518412][ T4664] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 [ 110.522442][ T4664] page dumped because: kasan: bad access detected [ 110.525612][ T4664] page_owner tracks the page as allocated [ 110.528411][ T4664] page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4690, tgid 4690 (init), ts 31303822478, free_ts 30792522580 [ 110.537038][ T4664] post_alloc_hook+0x231/0x280 [ 110.539156][ T4664] get_page_from_freelist+0x24dc/0x2580 [ 110.542468][ T4664] __alloc_frozen_pages_noprof+0x18d/0x380 [ 110.546514][ T4664] allocate_slab+0x77/0x660 [ 110.548911][ T4664] refill_objects+0x331/0x3c0 [ 110.551096][ T4664] __pcs_replace_empty_main+0x2f9/0x5e0 [ 110.553785][ T4664] __kmalloc_cache_noprof+0x392/0x660 [ 110.556352][ T4664] tomoyo_init_log+0x112e/0x1fb0 [ 110.559192][ T4664] tomoyo_supervisor+0x353/0x1570 [ 110.562706][ T4664] tomoyo_env_perm+0x151/0x1f0 [ 110.565860][ T4664] tomoyo_find_next_domain+0x15cb/0x1aa0 [ 110.568794][ T4664] tomoyo_bprm_check_security+0x11b/0x180 [ 110.571560][ T4664] security_bprm_check+0x85/0x240 [ 110.573915][ T4664] bprm_execve+0x896/0x1460 [ 110.576071][ T4664] do_execveat_common+0x50d/0x690 [ 110.578671][ T4664] __x64_sys_execve+0x97/0xc0 [ 110.581410][ T4664] page last free pid 1 tgid 1 stack trace: [ 110.584677][ T4664] __free_frozen_pages+0xc2b/0xdb0 [ 110.587142][ T4664] free_reserved_page+0xce/0x120 [ 110.589530][ T4664] free_reserved_area+0x90/0x190 [ 110.591806][ T4664] free_kernel_image_pages+0xa2/0x100 [ 110.594341][ T4664] kernel_init+0x31/0x1d0 [ 110.597148][ T4664] ret_from_fork+0x51e/0xb90 [ 110.599448][ T4664] ret_from_fork_asm+0x1a/0x30 [ 110.602360][ T4664] [ 110.603781][ T4664] Memory state around the buggy address: [ 110.606863][ T4664] ffff888012637f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 110.611253][ T4664] ffff888012637f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 110.615256][ T4664] >ffff888012638000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 110.620707][ T4664] ^ [ 110.623012][ T4664] ffff888012638080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 110.626703][ T4664] ffff888012638100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 110.630393][ T4664] ================================================================== [ 110.637934][ T4664] Kernel panic - not syncing: KASAN: panic_on_warn set ... [ 110.643394][ T4664] CPU: 0 UID: 0 PID: 4664 Comm: kworker/u5:1 Not tainted syzkaller #0 PREEMPT(full) [ 110.647574][ T4664] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 110.652054][ T4664] Workqueue: hci0 hci_cmd_sync_work [ 110.654810][ T4664] Call Trace: [ 110.656648][ T4664] [ 110.658282][ T4664] vpanic+0x56c/0xa60 [ 110.660268][ T4664] ? __pfx_vpanic+0x10/0x10 [ 110.662398][ T4664] panic+0xc5/0xd0 [ 110.664217][ T4664] ? __pfx_panic+0x10/0x10 [ 110.666336][ T4664] ? preempt_schedule_thunk+0x16/0x30 [ 110.668581][ T4664] ? preempt_schedule_thunk+0x16/0x30 [ 110.671128][ T4664] ? hci_conn_drop+0x34/0x2a0 [ 110.673948][ T4664] check_panic_on_warn+0x89/0xb0 [ 110.677318][ T4664] ? hci_conn_drop+0x34/0x2a0 [ 110.679769][ T4664] end_report+0x73/0x180 [ 110.681675][ T4664] ? hci_conn_drop+0x34/0x2a0 [ 110.683850][ T4664] kasan_report+0x128/0x150 [ 110.686054][ T4664] ? hci_conn_drop+0x34/0x2a0 [ 110.688472][ T4664] kasan_check_range+0x264/0x2c0 [ 110.691917][ T4664] hci_conn_drop+0x34/0x2a0 [ 110.694865][ T4664] ? __pfx_le_read_features_complete+0x10/0x10 [ 110.698231][ T4664] hci_cmd_sync_work+0x262/0x400 [ 110.700619][ T4664] ? process_scheduled_works+0xa25/0x1830 [ 110.703369][ T4664] process_scheduled_works+0xb02/0x1830 [ 110.706292][ T4664] ? __pfx_process_scheduled_works+0x10/0x10 [ 110.709932][ T4664] ? assign_work+0x3d5/0x5e0 [ 110.712475][ T4664] worker_thread+0xa50/0xfc0 [ 110.714754][ T4664] kthread+0x388/0x470 [ 110.716653][ T4664] ? __pfx_worker_thread+0x10/0x10 [ 110.718939][ T4664] ? __pfx_kthread+0x10/0x10 [ 110.720926][ T4664] ret_from_fork+0x51e/0xb90 [ 110.722955][ T4664] ? __pfx_ret_from_fork+0x10/0x10 [ 110.725588][ T4664] ? __switch_to+0xc7d/0x1450 [ 110.727977][ T4664] ? __pfx_kthread+0x10/0x10 [ 110.730531][ T4664] ret_from_fork_asm+0x1a/0x30 [ 110.733168][ T4664] [ 110.735165][ T4664] Kernel Offset: disabled [ 110.737446][ T4664] Rebooting in 86400 seconds..