Bluetooth: hci1: Opcode 0x0406 failed: -4 Bluetooth: hci2: Opcode 0x0c1a failed: -4 Bluetooth: hci2: Opcode 0x0406 failed: -4 ================================================================== BUG: KASAN: slab-out-of-bounds in __list_del_entry_valid_or_report+0x1a6/0x1c0 lib/list_debug.c:62 Read of size 8 at addr ffff8880262e6550 by task syz.3.1667/12884 CPU: 1 UID: 0 PID: 12884 Comm: syz.3.1667 Not tainted 6.13.0-syzkaller-00603-g3d3a9c8b89d4 #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:378 [inline] print_report+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 __list_del_entry_valid_or_report+0x1a6/0x1c0 lib/list_debug.c:62 __list_del_entry_valid include/linux/list.h:124 [inline] __list_del_entry include/linux/list.h:215 [inline] list_del_init include/linux/list.h:287 [inline] bt_accept_unlink+0x34/0x2e0 net/bluetooth/af_bluetooth.c:256 l2cap_sock_teardown_cb+0x1a3/0x3c0 net/bluetooth/l2cap_sock.c:1601 l2cap_chan_del+0xba/0x8f0 net/bluetooth/l2cap_core.c:658 l2cap_conn_del+0x37c/0x730 net/bluetooth/l2cap_core.c:1785 l2cap_connect_cfm+0x7aa/0xf10 net/bluetooth/l2cap_core.c:7235 hci_connect_cfm include/net/bluetooth/hci_core.h:2057 [inline] hci_conn_failed+0x225/0x3e0 net/bluetooth/hci_conn.c:1266 hci_abort_conn_sync+0x968/0x1030 net/bluetooth/hci_sync.c:5604 hci_disconnect_all_sync.constprop.0+0x104/0x3c0 net/bluetooth/hci_sync.c:5627 hci_suspend_sync+0x772/0xab0 net/bluetooth/hci_sync.c:6104 hci_suspend_dev+0x27d/0x5e0 net/bluetooth/hci_core.c:2831 hci_suspend_notifier+0x28d/0x2f0 net/bluetooth/hci_core.c:2411 notifier_call_chain+0xb7/0x410 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+0xc9/0x170 kernel/notifier.c:333 pm_notifier_call_chain_robust+0x27/0x60 kernel/power/main.c:102 snapshot_open+0x189/0x2b0 kernel/power/user.c:77 misc_open+0x35a/0x420 drivers/char/misc.c:165 chrdev_open+0x237/0x6a0 fs/char_dev.c:414 do_dentry_open+0xf59/0x1ea0 fs/open.c:938 vfs_open+0x82/0x3f0 fs/open.c:1068 do_open fs/namei.c:3828 [inline] path_openat+0x1e81/0x2d70 fs/namei.c:3987 do_filp_open+0x20c/0x470 fs/namei.c:4014 do_sys_openat2+0x17a/0x1e0 fs/open.c:1395 do_sys_open fs/open.c:1410 [inline] __do_compat_sys_openat fs/open.c:1472 [inline] __se_compat_sys_openat fs/open.c:1470 [inline] __ia32_compat_sys_openat+0x16e/0x210 fs/open.c:1470 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:0xf713e579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f510f55c EFLAGS: 00000296 ORIG_RAX: 0000000000000127 RAX: ffffffffffffffda RBX: 00000000ffffff9c RCX: 00000000200002c0 RDX: 0000000000040000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 12734: 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] add_one_compat_dev+0x281/0x720 drivers/infiniband/core/device.c:960 add_compat_devs drivers/infiniband/core/device.c:1034 [inline] enable_device_and_get+0x338/0x3f0 drivers/infiniband/core/device.c:1345 ib_register_device drivers/infiniband/core/device.c:1450 [inline] ib_register_device+0x829/0xd50 drivers/infiniband/core/device.c:1396 siw_device_register drivers/infiniband/sw/siw/siw_main.c:72 [inline] siw_newlink drivers/infiniband/sw/siw/siw_main.c:439 [inline] siw_newlink+0xb35/0xe50 drivers/infiniband/sw/siw/siw_main.c:421 nldev_newlink+0x36f/0x5e0 drivers/infiniband/core/nldev.c:1795 rdma_nl_rcv_msg+0x388/0x6e0 drivers/infiniband/core/netlink.c:195 rdma_nl_rcv_skb.constprop.0.isra.0+0x2e6/0x450 drivers/infiniband/core/netlink.c:239 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg net/socket.c:726 [inline] ____sys_sendmsg+0x9ae/0xb40 net/socket.c:2583 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2637 __sys_sendmsg+0x16e/0x220 net/socket.c:2669 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 ffff8880262e6000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 192 bytes to the right of allocated 1168-byte region [ffff8880262e6000, ffff8880262e6490) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880262e1000 pfn:0x262e0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b042f00 ffff88801b040948 ffffea0000888e10 raw: ffff8880262e1000 0000000000080007 00000001f5000000 0000000000000000 head: 00fff00000000240 ffff88801b042f00 ffff88801b040948 ffffea0000888e10 head: ffff8880262e1000 0000000000080007 00000001f5000000 0000000000000000 head: 00fff00000000003 ffffea000098b801 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 25, tgid 25 (kworker/2:0), ts 197891319958, free_ts 196485705072 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3476 __alloc_pages_noprof+0x221/0x2470 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x2c8/0x620 mm/mempolicy.c:2269 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab mm/slub.c:2589 [inline] new_slab+0x2c9/0x410 mm/slub.c:2642 ___slab_alloc+0xcda/0x1660 mm/slub.c:3830 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] __do_kmalloc_node mm/slub.c:4297 [inline] __kmalloc_node_track_caller_noprof+0x2ee/0x520 mm/slub.c:4317 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:609 __alloc_skb+0x164/0x380 net/core/skbuff.c:678 alloc_skb include/linux/skbuff.h:1323 [inline] alloc_skb_with_frags+0xe4/0x850 net/core/skbuff.c:6612 sock_alloc_send_pskb+0x7f1/0x980 net/core/sock.c:2884 sock_alloc_send_skb include/net/sock.h:1803 [inline] mld_newpack.isra.0+0x1d4/0x820 net/ipv6/mcast.c:1747 add_grhead+0x299/0x340 net/ipv6/mcast.c:1850 add_grec+0x111e/0x1670 net/ipv6/mcast.c:1988 mld_send_cr net/ipv6/mcast.c:2114 [inline] mld_ifc_work+0x41f/0xca0 net/ipv6/mcast.c:2651 page last free pid 10199 tgid 10199 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x661/0x1080 mm/page_alloc.c:2659 __put_partials+0x14c/0x170 mm/slub.c:3157 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:4119 [inline] slab_alloc_node mm/slub.c:4168 [inline] kmem_cache_alloc_noprof+0x1c8/0x3b0 mm/slub.c:4175 new_handle fs/jbd2/transaction.c:461 [inline] jbd2__journal_start+0x193/0x6a0 fs/jbd2/transaction.c:488 __ext4_journal_start_sb+0x19f/0x660 fs/ext4/ext4_jbd2.c:112 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0xa1/0x130 fs/ext4/inode.c:6039 __mark_inode_dirty+0x1ec/0xe50 fs/fs-writeback.c:2515 generic_update_time+0xcf/0xf0 fs/inode.c:2112 inode_update_time fs/inode.c:2125 [inline] __file_update_time fs/inode.c:2353 [inline] file_update_time+0x17d/0x1c0 fs/inode.c:2383 ext4_page_mkwrite+0x368/0x1760 fs/ext4/inode.c:6160 do_page_mkwrite+0x177/0x380 mm/memory.c:3176 do_shared_fault mm/memory.c:5398 [inline] do_fault mm/memory.c:5460 [inline] do_pte_missing+0x29e/0x3e00 mm/memory.c:3979 handle_pte_fault mm/memory.c:5801 [inline] __handle_mm_fault+0x103c/0x2a40 mm/memory.c:5944 Memory state around the buggy address: ffff8880262e6400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880262e6480: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880262e6500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880262e6580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880262e6600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi