Bluetooth: hci3: Opcode 0x0c1a failed: -4 Bluetooth: hci0: Opcode 0x0c1a failed: -4 Bluetooth: hci0: Opcode 0x0406 failed: -4 ================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_bh+0x33/0x40 kernel/locking/spinlock.c:182 Read of size 1 at addr ffff8880134d45a0 by task syz.7.1793/14494 CPU: 3 UID: 0 PID: 14494 Comm: syz.7.1793 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 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 __kasan_check_byte+0x36/0x50 mm/kasan/common.c:574 kasan_check_byte include/linux/kasan.h:402 [inline] lock_acquire kernel/locking/lockdep.c:5842 [inline] lock_acquire+0x132/0x370 kernel/locking/lockdep.c:5825 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline] _raw_spin_lock_bh+0x33/0x40 kernel/locking/spinlock.c:182 spin_lock_bh include/linux/spinlock.h:348 [inline] bt_accept_unlink+0x64/0x370 net/bluetooth/af_bluetooth.c:262 l2cap_sock_teardown_cb+0x1a3/0x3f0 net/bluetooth/l2cap_sock.c:1710 l2cap_chan_del+0xa6/0x920 net/bluetooth/l2cap_core.c:687 l2cap_conn_del+0x34f/0x6b0 net/bluetooth/l2cap_core.c:1825 l2cap_connect_cfm+0x97b/0xf20 net/bluetooth/l2cap_core.c:7537 hci_connect_cfm include/net/bluetooth/hci_core.h:2139 [inline] hci_conn_failed+0x18c/0x370 net/bluetooth/hci_conn.c:1410 hci_abort_conn_sync+0x7d9/0xb20 net/bluetooth/hci_sync.c:5913 hci_disconnect_all_sync.constprop.0.isra.0+0x155/0x430 net/bluetooth/hci_sync.c:5936 hci_suspend_sync+0x8b7/0xa70 net/bluetooth/hci_sync.c:6412 hci_suspend_dev+0x31d/0x540 net/bluetooth/hci_core.c:2812 hci_suspend_notifier+0x21e/0x330 net/bluetooth/hci_core.c:2381 notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85 notifier_call_chain_robust kernel/notifier.c:120 [inline] blocking_notifier_call_chain_robust kernel/notifier.c:345 [inline] blocking_notifier_call_chain_robust+0xc8/0x160 kernel/notifier.c:333 pm_notifier_call_chain_robust+0x27/0x60 kernel/power/main.c:172 snapshot_open+0x189/0x2b0 kernel/power/user.c:77 misc_open+0x26d/0x450 drivers/char/misc.c:163 chrdev_open+0x234/0x6a0 fs/char_dev.c:411 do_dentry_open+0x6ab/0x14d0 fs/open.c:947 vfs_open+0x82/0x3f0 fs/open.c:1052 do_open fs/namei.c:4700 [inline] path_openat+0x2873/0x4280 fs/namei.c:4863 do_file_open+0x20e/0x430 fs/namei.c:4892 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368 do_sys_open fs/open.c:1374 [inline] __do_compat_sys_openat fs/open.c:1436 [inline] __se_compat_sys_openat fs/open.c:1434 [inline] __ia32_compat_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe7/0x970 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf700efec Code: Unable to access opcode bytes at 0xf700efc2. RSP: 002b:00000000f53fd50c EFLAGS: 00000292 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00000000ffffff9c RCX: 0000000080000200 RDX: 0000000000000400 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 14486: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5334 [inline] __kmalloc_node_track_caller_noprof+0x331/0x830 mm/slub.c:5471 kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:637 __alloc_skb+0x185/0x710 net/core/skbuff.c:715 alloc_skb include/linux/skbuff.h:1384 [inline] _sctp_make_chunk+0x51/0x270 net/sctp/sm_make_chunk.c:1435 sctp_make_data net/sctp/sm_make_chunk.c:1467 [inline] sctp_make_datafrag_empty+0x14e/0x230 net/sctp/sm_make_chunk.c:732 sctp_datamsg_from_user+0x5ea/0x1360 net/sctp/chunk.c:263 sctp_sendmsg_to_asoc+0xb1c/0x1c50 net/sctp/socket.c:1858 sctp_sendmsg+0x1144/0x22e0 net/sctp/socket.c:2039 inet_sendmsg+0x11c/0x140 net/ipv4/af_inet.c:865 sock_sendmsg_nosec net/socket.c:775 [inline] __sock_sendmsg net/socket.c:790 [inline] __sys_sendto+0x453/0x4e0 net/socket.c:2252 __do_sys_sendto net/socket.c:2259 [inline] __se_sys_sendto net/socket.c:2255 [inline] __ia32_sys_sendto+0xdd/0x1b0 net/socket.c:2255 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe7/0x970 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 14487: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2677 [inline] slab_free mm/slub.c:6377 [inline] kfree+0x22b/0x6c0 mm/slub.c:6692 skb_kfree_head net/core/skbuff.c:1083 [inline] skb_free_head+0xb9/0x160 net/core/skbuff.c:1095 skb_release_data+0x6c5/0x8e0 net/core/skbuff.c:1122 skb_release_all net/core/skbuff.c:1197 [inline] __kfree_skb net/core/skbuff.c:1211 [inline] consume_skb net/core/skbuff.c:1445 [inline] consume_skb+0xc4/0x110 net/core/skbuff.c:1439 sctp_chunk_destroy net/sctp/sm_make_chunk.c:1495 [inline] sctp_chunk_put+0x1b2/0x2d0 net/sctp/sm_make_chunk.c:1522 sctp_datamsg_destroy net/sctp/chunk.c:111 [inline] sctp_datamsg_put+0x129/0x5f0 net/sctp/chunk.c:128 sctp_chunk_free+0x45/0x60 net/sctp/sm_make_chunk.c:1507 __sctp_outq_teardown+0x70a/0xc40 net/sctp/outqueue.c:257 sctp_association_free+0x210/0x7d0 net/sctp/associola.c:340 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:950 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1336 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1204 [inline] sctp_do_sm+0x1594/0x5be0 net/sctp/sm_sideeffect.c:1175 sctp_primitive_SHUTDOWN+0x9f/0xd0 net/sctp/primitive.c:89 sctp_shutdown+0x137/0x180 net/sctp/socket.c:5223 inet_shutdown+0x1a5/0x410 net/ipv4/af_inet.c:931 __sys_shutdown_sock net/socket.c:2525 [inline] __sys_shutdown_sock net/socket.c:2519 [inline] __sys_shutdown+0x116/0x1b0 net/socket.c:2541 __do_sys_shutdown net/socket.c:2546 [inline] __se_sys_shutdown net/socket.c:2544 [inline] __ia32_sys_shutdown+0x53/0x80 net/socket.c:2544 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe7/0x970 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff8880134d4000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1440 bytes inside of freed 2048-byte region [ffff8880134d4000, ffff8880134d4800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x134d0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801bc42f00 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800080008 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801bc42f00 dead000000000100 dead000000000122 head: 0000000000000000 0000000800080008 00000000f5000000 0000000000000000 head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 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 5145, tgid 5145 (klogd), ts 48990393214, free_ts 48070718031 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3266 [inline] allocate_slab mm/slub.c:3380 [inline] new_slab+0xa2/0x640 mm/slub.c:3426 refill_objects+0xe3/0x410 mm/slub.c:7310 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675 alloc_from_pcs mm/slub.c:4773 [inline] slab_alloc_node mm/slub.c:4905 [inline] __kmalloc_cache_noprof+0x479/0x6c0 mm/slub.c:5485 _kmalloc_noprof include/linux/slab.h:988 [inline] syslog_print+0xf8/0x620 kernel/printk/printk.c:1585 do_syslog+0x5bd/0x6d0 kernel/printk/printk.c:1763 __do_sys_syslog kernel/printk/printk.c:1855 [inline] __se_sys_syslog kernel/printk/printk.c:1853 [inline] __x64_sys_syslog+0x74/0xb0 kernel/printk/printk.c:1853 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x840 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 110 tgid 110 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] free_unref_folios+0xa44/0x1710 mm/page_alloc.c:3011 shrink_folio_list+0x473d/0x60a0 mm/vmscan.c:1513 evict_folios+0x31d/0x17b0 mm/vmscan.c:4834 try_to_shrink_lruvec+0x249/0x6b0 mm/vmscan.c:4983 shrink_one+0x307/0x850 mm/vmscan.c:5024 shrink_many mm/vmscan.c:5087 [inline] lru_gen_shrink_node mm/vmscan.c:5165 [inline] shrink_node+0x2721/0x3e90 mm/vmscan.c:6154 kswapd_shrink_node mm/vmscan.c:7008 [inline] balance_pgdat+0xb20/0x1f00 mm/vmscan.c:7186 kswapd+0x556/0xb50 mm/vmscan.c:7462 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff8880134d4480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880134d4500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880134d4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880134d4600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880134d4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================