================================================================== BUG: KASAN: slab-out-of-bounds in sco_conn_free net/bluetooth/sco.c:87 [inline] BUG: KASAN: slab-out-of-bounds in kref_put include/linux/kref.h:65 [inline] BUG: KASAN: slab-out-of-bounds in sco_conn_put+0x471/0x4c0 net/bluetooth/sco.c:107 Write of size 8 at addr ffff88804d2d45a0 by task syz-executor/9306 CPU: 2 UID: 0 PID: 9306 Comm: syz-executor Not tainted 6.14.0-rc4-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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+0xd9/0x110 mm/kasan/report.c:634 sco_conn_free net/bluetooth/sco.c:87 [inline] kref_put include/linux/kref.h:65 [inline] sco_conn_put+0x471/0x4c0 net/bluetooth/sco.c:107 sco_conn_del+0x26f/0x2e0 net/bluetooth/sco.c:263 hci_disconn_cfm include/net/bluetooth/hci_core.h:2069 [inline] hci_conn_hash_flush+0x44a/0x790 net/bluetooth/hci_conn.c:2698 hci_dev_close_sync+0x603/0x11a0 net/bluetooth/hci_sync.c:5197 hci_dev_do_close+0x2e/0x90 net/bluetooth/hci_core.c:482 hci_unregister_dev+0x213/0x620 net/bluetooth/hci_core.c:2677 vhci_release+0x79/0xf0 drivers/bluetooth/hci_vhci.c:664 __fput+0x3ff/0xb70 fs/file_table.c:464 task_work_run+0x14e/0x250 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xad8/0x2d70 kernel/exit.c:938 do_group_exit+0xd3/0x2a0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __ia32_sys_exit_group+0x3e/0x50 kernel/exit.c:1096 ia32_sys_call+0x1b1c/0x1c20 arch/x86/include/generated/asm/syscalls_32.h:253 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7f01579 Code: Unable to access opcode bytes at 0xf7f0154f. RSP: 002b:00000000ff9d826c EFLAGS: 00000282 ORIG_RAX: 00000000000000fc RAX: ffffffffffffffda RBX: 0000000000000043 RCX: 00000000ff9d82b8 RDX: 0000000000000000 RSI: 00000000f721538b RDI: 00000000f71614b6 RBP: 00000000f738cff4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 9306: 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 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] device_create_groups_vargs+0x8a/0x270 drivers/base/core.c:4329 device_create+0xe9/0x130 drivers/base/core.c:4386 mac80211_hwsim_new_radio+0x36b/0x54e0 drivers/net/wireless/virtual/mac80211_hwsim.c:5204 hwsim_new_radio_nl+0xb42/0x12b0 drivers/net/wireless/virtual/mac80211_hwsim.c:6242 genl_family_rcv_msg_doit+0x202/0x2f0 net/netlink/genetlink.c:1115 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x565/0x800 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2543 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] __sys_sendto+0x488/0x4f0 net/socket.c:2187 __do_compat_sys_socketcall+0x5e2/0x700 net/compat.c:475 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff88804d2d4000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 312 bytes to the right of allocated 1128-byte region [ffff88804d2d4000, ffff88804d2d4468) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88804d2d6000 pfn:0x4d2d0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x4fff00000000240(workingset|head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000240 ffff88801b042f00 ffffea0001a3d410 ffffea0001a3b810 raw: ffff88804d2d6000 0000000000080005 00000000f5000000 0000000000000000 head: 04fff00000000240 ffff88801b042f00 ffffea0001a3d410 ffffea0001a3b810 head: ffff88804d2d6000 0000000000080005 00000000f5000000 0000000000000000 head: 04fff00000000003 ffffea000134b401 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5657, tgid 5657 (dhcpcd), ts 24046541088, free_ts 23823410078 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 alloc_pages_mpol+0x1fc/0x540 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab mm/slub.c:2587 [inline] new_slab+0x23d/0x330 mm/slub.c:2640 ___slab_alloc+0xc5d/0x1720 mm/slub.c:3826 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __do_kmalloc_node mm/slub.c:4293 [inline] __kmalloc_node_track_caller_noprof+0x2f1/0x510 mm/slub.c:4313 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:537 __alloc_skb+0x164/0x380 net/core/skbuff.c:606 __netdev_alloc_skb+0x213/0x920 net/core/skbuff.c:670 __netdev_alloc_skb_ip_align include/linux/skbuff.h:3430 [inline] e1000_alloc_rx_buffers+0x3b5/0x7b0 drivers/net/ethernet/intel/e1000e/netdev.c:668 e1000_configure+0x1935/0x4a50 drivers/net/ethernet/intel/e1000e/netdev.c:3755 e1000e_open+0x446/0x1a20 drivers/net/ethernet/intel/e1000e/netdev.c:4653 __dev_open+0x2d4/0x540 net/core/dev.c:1635 __dev_change_flags+0x561/0x720 net/core/dev.c:9260 page last free pid 5728 tgid 5728 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 __put_partials+0x14c/0x170 mm/slub.c:3153 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4115 [inline] slab_alloc_node mm/slub.c:4164 [inline] kmem_cache_alloc_noprof+0x226/0x3d0 mm/slub.c:4171 getname_flags.part.0+0x4c/0x550 fs/namei.c:139 getname_flags include/linux/audit.h:322 [inline] getname+0x8d/0xe0 fs/namei.c:223 do_sys_openat2+0x104/0x1e0 fs/open.c:1422 do_sys_open fs/open.c:1443 [inline] __do_sys_openat fs/open.c:1459 [inline] __se_sys_openat fs/open.c:1454 [inline] __x64_sys_openat+0x175/0x210 fs/open.c:1454 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88804d2d4480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804d2d4500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88804d2d4580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88804d2d4600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804d2d4680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================