Bluetooth: hci4: Opcode 0x0c1a failed: -4 Bluetooth: hci4: Opcode 0x0406 failed: -4 Bluetooth: hci4: Opcode 0x0406 failed: -4 ================================================================== BUG: KASAN: slab-out-of-bounds in __raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline] BUG: KASAN: slab-out-of-bounds in _raw_spin_lock_bh+0x33/0x40 kernel/locking/spinlock.c:182 Read of size 1 at addr ffff8880003195a0 by task syz.4.2106/13513 CPU: 2 UID: 0 PID: 13513 Comm: syz.4.2106 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:0xf707efec Code: Unable to access opcode bytes at 0xf707efc2. RSP: 002b:00000000f546d50c 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 13119: 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] __kmalloc_cache_noprof+0x2e5/0x6c0 mm/slub.c:5489 _kmalloc_noprof include/linux/slab.h:988 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] batadv_hardif_add_interface net/batman-adv/hard-interface.c:878 [inline] batadv_hard_if_event+0x14bf/0x3870 net/batman-adv/hard-interface.c:1087 notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2250 call_netdevice_notifiers_extack net/core/dev.c:2288 [inline] call_netdevice_notifiers net/core/dev.c:2302 [inline] register_netdevice+0x1998/0x25a0 net/core/dev.c:11484 veth_newlink+0x44a/0xa00 drivers/net/veth.c:1892 rtnl_newlink_create net/core/rtnetlink.c:3913 [inline] __rtnl_newlink net/core/rtnetlink.c:4044 [inline] rtnl_newlink+0x1499/0x2380 net/core/rtnetlink.c:4159 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7076 netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2556 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x585/0x850 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x8b0/0xda0 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec net/socket.c:775 [inline] __sock_sendmsg net/socket.c:790 [inline] __sys_sendto+0x48b/0x4e0 net/socket.c:2252 __do_compat_sys_socketcall net/compat.c:474 [inline] __se_compat_sys_socketcall net/compat.c:422 [inline] __ia32_compat_sys_socketcall+0x59a/0x770 net/compat.c:422 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] do_int80_emulation+0x14b/0x720 arch/x86/entry/syscall_32.c:172 asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:598 The buggy address belongs to the object at ffff888000319000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 400 bytes to the right of allocated 1040-byte region [ffff888000319000, ffff888000319410) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x318 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x7ff00000000040(head|node=0|zone=0|lastcpupid=0x7ff) page_type: f5(slab) raw: 007ff00000000040 ffff88801bc42f00 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800080008 00000000f5000000 0000000000000000 head: 007ff00000000040 ffff88801bc42f00 dead000000000100 dead000000000122 head: 0000000000000000 0000000800080008 00000000f5000000 0000000000000000 head: 007ff00000000003 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 5807, tgid 5807 (kworker/1:3), ts 49145980221, free_ts 17961836057 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] __do_kmalloc_node mm/slub.c:5333 [inline] __kmalloc_node_track_caller_noprof+0x679/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] mld_newpack.isra.0+0x18e/0xa20 net/ipv6/mcast.c:1789 add_grhead+0x299/0x340 net/ipv6/mcast.c:1900 add_grec+0x1389/0x1930 net/ipv6/mcast.c:2039 mld_send_cr net/ipv6/mcast.c:2164 [inline] mld_ifc_work+0x3c5/0xc10 net/ipv6/mcast.c:2710 process_one_work+0xa23/0x1940 kernel/workqueue.c:3322 process_scheduled_works kernel/workqueue.c:3405 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486 kthread+0x370/0x450 kernel/kthread.c:436 page last free pid 5125 tgid 5125 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4584 [inline] slab_alloc_node mm/slub.c:4917 [inline] __do_kmalloc_node mm/slub.c:5333 [inline] __kmalloc_noprof+0x2bf/0x820 mm/slub.c:5359 _kmalloc_noprof include/linux/slab.h:992 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] tomoyo_commit_ok+0x21/0xa0 security/tomoyo/memory.c:76 tomoyo_update_domain+0x5dc/0x850 security/tomoyo/domain.c:139 tomoyo_update_path_acl security/tomoyo/file.c:402 [inline] tomoyo_write_file+0x4fa/0x8e0 security/tomoyo/file.c:1027 tomoyo_write_domain2+0x13a/0x200 security/tomoyo/common.c:1160 tomoyo_add_entry security/tomoyo/common.c:2177 [inline] tomoyo_supervisor+0x9e2/0x1340 security/tomoyo/common.c:2238 tomoyo_audit_path_log security/tomoyo/file.c:169 [inline] tomoyo_execute_permission+0x38e/0x4b0 security/tomoyo/file.c:624 tomoyo_find_next_domain+0x38d/0x2010 security/tomoyo/domain.c:763 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12d/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x87/0x1e0 security/security.c:820 search_binary_handler fs/exec.c:1684 [inline] exec_binprm fs/exec.c:1726 [inline] bprm_execve fs/exec.c:1778 [inline] bprm_execve+0x84b/0x1730 fs/exec.c:1754 do_execveat_common.isra.0+0x4a5/0x580 fs/exec.c:1876 Memory state around the buggy address: ffff888000319480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888000319500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888000319580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888000319600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888000319680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================