================================================================== BUG: KASAN: slab-out-of-bounds in skb_put_data include/linux/skbuff.h:2752 [inline] BUG: KASAN: slab-out-of-bounds in hci_cmd_sync_alloc+0x300/0x3a0 net/bluetooth/hci_sync.c:67 Read of size 29542 at addr ffff88802941b466 by task kworker/u33:8/5947 CPU: 0 UID: 0 PID: 5947 Comm: kworker/u33:8 Not tainted 6.15.0-rc4-syzkaller-00040-g8bac8898fe39 #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: hci0 hci_cmd_sync_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:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105 skb_put_data include/linux/skbuff.h:2752 [inline] hci_cmd_sync_alloc+0x300/0x3a0 net/bluetooth/hci_sync.c:67 hci_cmd_sync_add net/bluetooth/hci_sync.c:99 [inline] __hci_cmd_sync_sk+0x157/0xc90 net/bluetooth/hci_sync.c:168 __hci_cmd_sync_ev+0x3e/0x50 net/bluetooth/hci_sync.c:250 send_hci_cmd_sync+0x18d/0x3f0 net/bluetooth/mgmt.c:2540 hci_cmd_sync_work+0x1a8/0x430 net/bluetooth/hci_sync.c:332 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 7924: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4341 [inline] __kmalloc_node_track_caller_noprof+0x221/0x510 mm/slub.c:4360 kmemdup_noprof+0x29/0x60 mm/util.c:137 kmemdup_noprof include/linux/fortify-string.h:765 [inline] mgmt_pending_new+0x10b/0x290 net/bluetooth/mgmt_util.c:259 mgmt_hci_cmd_sync net/bluetooth/mgmt.c:2574 [inline] mgmt_hci_cmd_sync+0x58/0x1c0 net/bluetooth/mgmt.c:2562 hci_mgmt_cmd net/bluetooth/hci_sock.c:1712 [inline] hci_sock_sendmsg+0x151f/0x25e0 net/bluetooth/hci_sock.c:1832 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] sock_write_iter+0x4fc/0x5b0 net/socket.c:1131 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x205/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88802941b460 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 6 bytes inside of allocated 7-byte region [ffff88802941b460, ffff88802941b467) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2941b flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b442500 ffffea0000c44780 dead000000000002 raw: 0000000000000000 0000000080800080 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1245, tgid 1245 (kworker/u32:10), ts 48741901136, free_ts 48731755820 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2468 [inline] allocate_slab mm/slub.c:2632 [inline] new_slab+0x244/0x340 mm/slub.c:2686 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3872 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3962 __slab_alloc_node mm/slub.c:4037 [inline] slab_alloc_node mm/slub.c:4198 [inline] __do_kmalloc_node mm/slub.c:4340 [inline] __kmalloc_noprof+0x2f2/0x510 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:909 [inline] kmalloc_array_noprof include/linux/slab.h:948 [inline] nsim_fib6_event_init drivers/net/netdevsim/fib.c:810 [inline] nsim_fib6_prepare_event drivers/net/netdevsim/fib.c:947 [inline] nsim_fib_event_schedule_work drivers/net/netdevsim/fib.c:1003 [inline] nsim_fib_event_nb+0x45e/0x10d0 drivers/net/netdevsim/fib.c:1043 notifier_call_chain+0xb9/0x410 kernel/notifier.c:85 atomic_notifier_call_chain+0x71/0x1c0 kernel/notifier.c:223 call_fib_notifiers+0x33/0x70 net/core/fib_notifier.c:35 call_fib6_entry_notifiers net/ipv6/ip6_fib.c:397 [inline] fib6_add_rt2node net/ipv6/ip6_fib.c:1231 [inline] fib6_add+0x25ef/0x4b60 net/ipv6/ip6_fib.c:1488 __ip6_ins_rt net/ipv6/route.c:1351 [inline] ip6_ins_rt+0xb5/0x110 net/ipv6/route.c:1361 __ipv6_ifa_notify+0xa6b/0xd60 net/ipv6/addrconf.c:6283 ipv6_ifa_notify net/ipv6/addrconf.c:6322 [inline] addrconf_dad_completed+0x19a/0x10d0 net/ipv6/addrconf.c:4321 page last free pid 5985 tgid 5985 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 tlb_batch_list_free mm/mmu_gather.c:159 [inline] tlb_finish_mmu+0x237/0x7b0 mm/mmu_gather.c:499 exit_mmap+0x403/0xb90 mm/mmap.c:1297 __mmput+0x12a/0x410 kernel/fork.c:1379 mmput+0x62/0x70 kernel/fork.c:1401 exit_mm kernel/exit.c:589 [inline] do_exit+0x9d1/0x2c30 kernel/exit.c:940 do_group_exit+0xd3/0x2a0 kernel/exit.c:1102 __do_sys_exit_group kernel/exit.c:1113 [inline] __se_sys_exit_group kernel/exit.c:1111 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1111 x64_sys_call+0x1530/0x1730 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88802941b300: 00 fc fc fc 00 fc fc fc 00 fc fc fc 00 fc fc fc ffff88802941b380: 00 fc fc fc 07 fc fc fc fa fc fc fc fa fc fc fc >ffff88802941b400: 05 fc fc fc fa fc fc fc fa fc fc fc 07 fc fc fc ^ ffff88802941b480: 05 fc fc fc 05 fc fc fc 05 fc fc fc 05 fc fc fc ffff88802941b500: 07 fc fc fc 07 fc fc fc 07 fc fc fc 05 fc fc fc ==================================================================