================================================================== BUG: KASAN: slab-use-after-free in hci_uart_write_work+0x2ca/0x550 drivers/bluetooth/hci_ldisc.c:165 Read of size 8 at addr ffff888051032218 by task kworker/0:4/5309 CPU: 0 UID: 0 PID: 5309 Comm: kworker/0:4 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events hci_uart_write_work Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 hci_uart_write_work+0x2ca/0x550 drivers/bluetooth/hci_ldisc.c:165 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 5302: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:77 unpoison_slab_object mm/kasan/common.c:342 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:368 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4978 [inline] slab_alloc_node mm/slub.c:5288 [inline] kmem_cache_alloc_node_noprof+0x433/0x710 mm/slub.c:5340 __alloc_skb+0x112/0x2d0 net/core/skbuff.c:660 alloc_skb include/linux/skbuff.h:1383 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:510 [inline] hci_cmd_sync_alloc+0x3d/0x380 net/bluetooth/hci_sync.c:58 hci_cmd_sync_add net/bluetooth/hci_sync.c:99 [inline] __hci_cmd_sync_sk+0x1a7/0xbc0 net/bluetooth/hci_sync.c:168 __hci_cmd_sync_status_sk net/bluetooth/hci_sync.c:263 [inline] __hci_cmd_sync_status net/bluetooth/hci_sync.c:287 [inline] hci_read_local_features_sync net/bluetooth/hci_sync.c:3708 [inline] hci_init_stage_sync net/bluetooth/hci_sync.c:3623 [inline] hci_init1_sync net/bluetooth/hci_sync.c:3755 [inline] hci_init_sync net/bluetooth/hci_sync.c:4867 [inline] hci_dev_init_sync net/bluetooth/hci_sync.c:5059 [inline] hci_dev_open_sync+0x14be/0x2b60 net/bluetooth/hci_sync.c:5137 hci_dev_do_open net/bluetooth/hci_core.c:430 [inline] hci_power_on+0x1b4/0x680 net/bluetooth/hci_core.c:959 process_one_work kernel/workqueue.c:3263 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3346 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3427 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888051032140 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 216 bytes inside of freed 240-byte region [ffff888051032140, ffff888051032230) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x51032 ksm flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff8880304cfc80 ffffea00010b9a80 0000000000000003 raw: 0000000000000000 00000000000c000c 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5300, tgid 5300 (syz-executor), ts 72944481945, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1845 prep_new_page mm/page_alloc.c:1853 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3879 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5178 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3059 [inline] allocate_slab+0x96/0x350 mm/slub.c:3232 new_slab mm/slub.c:3286 [inline] ___slab_alloc+0xf56/0x1990 mm/slub.c:4655 __slab_alloc+0x65/0x100 mm/slub.c:4778 __slab_alloc_node mm/slub.c:4854 [inline] slab_alloc_node mm/slub.c:5276 [inline] kmem_cache_alloc_node_noprof+0x4c5/0x710 mm/slub.c:5340 __alloc_skb+0x112/0x2d0 net/core/skbuff.c:660 alloc_skb include/linux/skbuff.h:1383 [inline] alloc_uevent_skb+0x7d/0x230 lib/kobject_uevent.c:289 uevent_net_broadcast_tagged lib/kobject_uevent.c:352 [inline] kobject_uevent_net_broadcast+0x184/0x560 lib/kobject_uevent.c:413 kobject_uevent_env+0x55b/0x8c0 lib/kobject_uevent.c:608 device_add+0x557/0xb50 drivers/base/core.c:3670 netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:2358 register_netdevice+0x126c/0x1ae0 net/core/dev.c:11294 __ip_tunnel_create+0x3e7/0x560 net/ipv4/ip_tunnel.c:268 page_owner free stack trace missing Memory state around the buggy address: ffff888051032100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888051032180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888051032200: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ^ ffff888051032280: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888051032300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ==================================================================