================================================================== BUG: KASAN: use-after-free in skb_dst_drop include/net/dst.h:267 [inline] BUG: KASAN: use-after-free in skb_release_head_state+0x35/0x230 net/core/skbuff.c:840 Read of size 8 at addr ffff888073753058 by task syz.3.1572/11743 CPU: 0 PID: 11743 Comm: syz.3.1572 Not tainted 6.1.97-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 skb_dst_drop include/net/dst.h:267 [inline] skb_release_head_state+0x35/0x230 net/core/skbuff.c:840 skb_release_all net/core/skbuff.c:854 [inline] __kfree_skb net/core/skbuff.c:870 [inline] kfree_skb_reason+0x13d/0x390 net/core/skbuff.c:893 kfree_skb include/linux/skbuff.h:1220 [inline] __hci_req_sync+0x626/0x940 net/bluetooth/hci_request.c:184 hci_req_sync+0xa5/0xc0 net/bluetooth/hci_request.c:206 hci_inquiry+0x443/0x860 net/bluetooth/hci_core.c:425 sock_do_ioctl+0x152/0x450 net/socket.c:1204 sock_ioctl+0x47f/0x770 net/socket.c:1321 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f2325d75bd9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2326aef048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f2325f03f60 RCX: 00007f2325d75bd9 RDX: 0000000020000000 RSI: 00000000800448f0 RDI: 0000000000000008 RBP: 00007f2325de4aa1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f2325f03f60 R15: 00007ffff71a42b8 Allocated by task 3545: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422 skb_clone+0x1e5/0x360 net/core/skbuff.c:1660 hci_send_cmd_sync net/bluetooth/hci_core.c:4178 [inline] hci_cmd_work+0x296/0x660 net/bluetooth/hci_core.c:4198 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Freed by task 3553: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x292/0x510 mm/slub.c:3683 kfree_skb include/linux/skbuff.h:1220 [inline] hci_send_cmd_sync net/bluetooth/hci_core.c:4177 [inline] hci_cmd_work+0x26b/0x660 net/bluetooth/hci_core.c:4198 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439 kthread+0x28d/0x320 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff888073753000 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 88 bytes inside of 240-byte region [ffff888073753000, ffff8880737530f0) The buggy address belongs to the physical page: page:ffffea0001cdd4c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x73753 memcg:ffff888020f91481 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000001 ffff888140e49000 raw: 0000000000000000 00000000000c000c 00000001ffffffff ffff888020f91481 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 11, tgid 11 (kworker/u4:1), ts 488157855086, free_ts 486145026747 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2517 prep_new_page mm/page_alloc.c:2524 [inline] get_page_from_freelist+0x322e/0x33b0 mm/page_alloc.c:4283 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5551 alloc_slab_page+0x6a/0x150 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x84/0x2d0 mm/slub.c:1992 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] kmem_cache_alloc_node+0x1cf/0x310 mm/slub.c:3443 __alloc_skb+0xde/0x670 net/core/skbuff.c:505 alloc_skb include/linux/skbuff.h:1271 [inline] __tcp_send_ack+0x9a/0x600 net/ipv4/tcp_output.c:4022 tcp_ack_snd_check net/ipv4/tcp_input.c:5610 [inline] tcp_rcv_established+0xf26/0x1f00 net/ipv4/tcp_input.c:6048 tcp_v4_do_rcv+0x487/0xb00 net/ipv4/tcp_ipv4.c:1683 tcp_v4_rcv+0x29e0/0x3250 net/ipv4/tcp_ipv4.c:2114 ip_protocol_deliver_rcu+0x381/0x740 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x304/0x580 net/ipv4/ip_input.c:233 NF_HOOK+0x39d/0x450 include/linux/netfilter.h:302 dst_input include/net/dst.h:454 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:631 [inline] ip_sublist_rcv+0xaf9/0xe70 net/ipv4/ip_input.c:639 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1444 [inline] free_pcp_prepare mm/page_alloc.c:1494 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3362 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3457 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x156/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] __kmem_cache_alloc_node+0x137/0x260 mm/slub.c:3437 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:692 [inline] kernfs_iop_get_link+0x63/0x5a0 fs/kernfs/symlink.c:135 vfs_readlink+0x16a/0x400 fs/namei.c:5125 do_readlinkat+0x27f/0x3a0 fs/stat.c:480 __do_sys_readlink fs/stat.c:501 [inline] __se_sys_readlink fs/stat.c:498 [inline] __x64_sys_readlink+0x7b/0x90 fs/stat.c:498 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888073752f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888073752f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888073753000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888073753080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff888073753100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================