================================================================== BUG: KASAN: slab-use-after-free in hci_uart_write_work+0x82d/0x960 drivers/bluetooth/hci_ldisc.c:165 Read of size 4 at addr ffff888056edca70 by task kworker/0:5/6022 CPU: 0 UID: 0 PID: 6022 Comm: kworker/0:5 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP 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 lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 hci_uart_write_work+0x82d/0x960 drivers/bluetooth/hci_ldisc.c:165 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Allocated by task 6022: kasan_save_stack+0x33/0x60 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x298/0x800 mm/slub.c:5315 __alloc_skb+0x156/0x410 net/core/skbuff.c:679 alloc_skb include/linux/skbuff.h:1383 [inline] bcsp_prepare_pkt+0xe0/0xae0 drivers/bluetooth/hci_bcsp.c:218 bcsp_dequeue+0x237/0x4b0 drivers/bluetooth/hci_bcsp.c:308 hci_uart_dequeue drivers/bluetooth/hci_ldisc.c:107 [inline] hci_uart_write_work+0x4e3/0x960 drivers/bluetooth/hci_ldisc.c:161 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 The buggy address belongs to the object at ffff888056edca00 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 112 bytes inside of freed 240-byte region [ffff888056edca00, ffff888056edcaf0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x56edc head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 ksm flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff888040ec08c0 ffffea00009f1300 0000000000000003 raw: 0000000000000000 0000000000190019 00000000f5000000 0000000000000000 head: 04fff00000000040 ffff888040ec08c0 ffffea00009f1300 0000000000000003 head: 0000000000000000 0000000000190019 00000000f5000000 0000000000000000 head: 04fff00000000001 ffffea00015bb701 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5861, tgid 5861 (sshd-session), ts 1368668512707, free_ts 1363186801974 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1857 prep_new_page mm/page_alloc.c:1865 [inline] get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab mm/slub.c:3248 [inline] new_slab+0x2c3/0x430 mm/slub.c:3302 ___slab_alloc+0xe18/0x1c90 mm/slub.c:4656 __kmem_cache_alloc_bulk+0x1fb/0x6c0 mm/slub.c:7431 kmem_cache_alloc_bulk_noprof+0x4e1/0x800 mm/slub.c:7497 napi_skb_cache_get+0x6ac/0x900 net/core/skbuff.c:291 __alloc_skb+0x2aa/0x410 net/core/skbuff.c:668 napi_alloc_skb+0x44b/0x820 net/core/skbuff.c:832 e1000_alloc_rx_skb drivers/net/ethernet/intel/e1000/e1000_main.c:4123 [inline] e1000_copybreak drivers/net/ethernet/intel/e1000/e1000_main.c:4339 [inline] e1000_clean_rx_irq+0x2ae/0x1180 drivers/net/ethernet/intel/e1000/e1000_main.c:4391 e1000_clean+0x9cb/0x2670 drivers/net/ethernet/intel/e1000/e1000_main.c:3806 __napi_poll.constprop.0+0xb3/0x540 net/core/dev.c:7668 napi_poll net/core/dev.c:7731 [inline] net_rx_action+0x9f9/0xfa0 net/core/dev.c:7883 handle_softirqs+0x219/0x950 kernel/softirq.c:622 page last free pid 24324 tgid 24322 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943 vfree+0x1fd/0xb50 mm/vmalloc.c:3466 nf_tables_newset+0x2aaa/0x4320 net/netfilter/nf_tables_api.c:5683 nfnetlink_rcv_batch+0x190d/0x2350 net/netfilter/nfnetlink.c:526 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:649 [inline] nfnetlink_rcv+0x3c1/0x430 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8c8/0xdd0 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] ____sys_sendmsg+0xa5d/0xc30 net/socket.c:2592 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2646 __sys_sendmsg+0x16d/0x220 net/socket.c:2678 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe8/0x680 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Memory state around the buggy address: ffff888056edc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888056edc980: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc >ffff888056edca00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888056edca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff888056edcb00: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================