Bluetooth: hci3: Opcode 0x0c1a failed: -4 Bluetooth: hci1: Opcode 0x0c1a failed: -4 Bluetooth: hci1: Opcode 0x0406 failed: -4 ================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x1b1/0x1d0 lib/list_debug.c:62 Read of size 8 at addr ffff88802fd52578 by task syz.0.1180/10024 CPU: 3 UID: 0 PID: 10024 Comm: syz.0.1180 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+0x156/0x4c9 mm/kasan/report.c:482 kasan_report+0xdf/0x1e0 mm/kasan/report.c:595 __list_del_entry_valid_or_report+0x1b1/0x1d0 lib/list_debug.c:62 __list_del_entry_valid include/linux/list.h:132 [inline] __list_del_entry include/linux/list.h:223 [inline] list_del_init include/linux/list.h:295 [inline] bt_accept_unlink+0x34/0x2f0 net/bluetooth/af_bluetooth.c:259 l2cap_sock_teardown_cb+0x1a3/0x3f0 net/bluetooth/l2cap_sock.c:1640 l2cap_chan_del+0xbd/0x930 net/bluetooth/l2cap_core.c:656 l2cap_conn_del+0x38c/0x770 net/bluetooth/l2cap_core.c:1782 l2cap_connect_cfm+0x9bb/0x1050 net/bluetooth/l2cap_core.c:7323 hci_connect_cfm include/net/bluetooth/hci_core.h:2139 [inline] hci_conn_failed+0x188/0x360 net/bluetooth/hci_conn.c:1342 hci_abort_conn_sync+0x7d9/0xb20 net/bluetooth/hci_sync.c:5753 hci_disconnect_all_sync.constprop.0.isra.0+0x155/0x430 net/bluetooth/hci_sync.c:5776 hci_suspend_sync+0x8b7/0xa70 net/bluetooth/hci_sync.c:6252 hci_suspend_dev+0x31d/0x540 net/bluetooth/hci_core.c:2850 hci_suspend_notifier+0x21e/0x330 net/bluetooth/hci_core.c:2421 notifier_call_chain+0x99/0x420 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/0x2a0 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+0x6d8/0x1660 fs/open.c:949 vfs_open+0x82/0x3f0 fs/open.c:1081 do_open fs/namei.c:4671 [inline] path_openat+0x208c/0x31a0 fs/namei.c:4830 do_file_open+0x20e/0x430 fs/namei.c:4859 do_sys_openat2+0x10d/0x1e0 fs/open.c:1366 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1383 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f41aaf9c799 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f41abe9c028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f41ab215fa0 RCX: 00007f41aaf9c799 RDX: 0000000000000000 RSI: 0000200000000580 RDI: ffffffffffffff9c RBP: 00007f41ab032bd9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f41ab216038 R14: 00007f41ab215fa0 R15: 00007ffc8652a3e8 Allocated by task 9844: 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:5238 [inline] __kmalloc_node_track_caller_noprof+0x304/0x850 mm/slub.c:5346 kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:635 __alloc_skb+0x185/0x710 net/core/skbuff.c:713 alloc_skb include/linux/skbuff.h:1383 [inline] nlmsg_new include/net/netlink.h:1055 [inline] audit_buffer_alloc kernel/audit.c:1839 [inline] audit_log_start+0x350/0x930 kernel/audit.c:1958 audit_seccomp+0x61/0x1f0 kernel/auditsc.c:2948 seccomp_log kernel/seccomp.c:1048 [inline] __seccomp_filter+0x850/0x1140 kernel/seccomp.c:1376 __secure_computing+0x221/0x2e0 kernel/seccomp.c:1404 syscall_trace_enter include/linux/entry-common.h:112 [inline] syscall_enter_from_user_mode_work include/linux/entry-common.h:156 [inline] syscall_enter_from_user_mode include/linux/entry-common.h:187 [inline] do_syscall_64+0x568/0xf80 arch/x86/entry/syscall_64.c:90 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 40: 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:2692 [inline] slab_free mm/slub.c:6143 [inline] kfree+0x1f6/0x6b0 mm/slub.c:6461 skb_kfree_head net/core/skbuff.c:1089 [inline] skb_free_head+0x119/0x220 net/core/skbuff.c:1101 skb_release_data+0x79b/0x9d0 net/core/skbuff.c:1128 skb_release_all net/core/skbuff.c:1203 [inline] __kfree_skb net/core/skbuff.c:1217 [inline] sk_skb_reason_drop+0x102/0x1b0 net/core/skbuff.c:1255 kfree_skb_reason include/linux/skbuff.h:1322 [inline] kfree_skb include/linux/skbuff.h:1331 [inline] kauditd_hold_skb+0x144/0x210 kernel/audit.c:652 kauditd_send_queue+0x232/0x2e0 kernel/audit.c:807 kauditd_thread+0x645/0xb30 kernel/audit.c:931 kthread+0x370/0x450 kernel/kthread.c:467 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88802fd52000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1400 bytes inside of freed 2048-byte region [ffff88802fd52000, ffff88802fd52800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2fd50 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 ffff88801b842f00 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800080008 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b842f00 dead000000000100 dead000000000122 head: 0000000000000000 0000000800080008 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0000bf5401 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 5928, tgid 5928 (syz-executor), ts 53074433148, free_ts 52987597036 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x111d/0x3140 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x27c/0x2ba0 mm/page_alloc.c:5250 alloc_slab_page mm/slub.c:3269 [inline] allocate_slab mm/slub.c:3458 [inline] new_slab+0xa6/0x6d0 mm/slub.c:3516 refill_objects+0x26b/0x400 mm/slub.c:7153 refill_sheaf mm/slub.c:2818 [inline] alloc_full_sheaf mm/slub.c:2839 [inline] __pcs_replace_empty_main+0x19f/0x600 mm/slub.c:4602 alloc_from_pcs mm/slub.c:4695 [inline] slab_alloc_node mm/slub.c:4829 [inline] __kmalloc_cache_noprof+0x493/0x6f0 mm/slub.c:5353 kmalloc_noprof include/linux/slab.h:950 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] nexthop_net_init+0x73/0x140 net/ipv4/nexthop.c:4111 ops_init+0x1e2/0x5f0 net/core/net_namespace.c:137 setup_net+0x118/0x3a0 net/core/net_namespace.c:446 copy_net_ns+0x46f/0x7c0 net/core/net_namespace.c:581 create_new_namespaces+0x3ea/0xac0 kernel/nsproxy.c:130 unshare_nsproxy_namespaces+0xc3/0x1f0 kernel/nsproxy.c:226 ksys_unshare+0x473/0xad0 kernel/fork.c:3174 __do_sys_unshare kernel/fork.c:3245 [inline] __se_sys_unshare kernel/fork.c:3243 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3243 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 page last free pid 5933 tgid 5933 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0x7e1/0x10d0 mm/page_alloc.c:2978 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xe0 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:4515 [inline] slab_alloc_node mm/slub.c:4844 [inline] __do_kmalloc_node mm/slub.c:5237 [inline] __kvmalloc_node_noprof+0x316/0xa00 mm/slub.c:6730 seq_buf_alloc fs/seq_file.c:39 [inline] seq_read_iter+0x819/0x1270 fs/seq_file.c:211 kernfs_fop_read_iter+0x46c/0x610 fs/kernfs/file.c:297 new_sync_read fs/read_write.c:493 [inline] vfs_read+0x825/0xb30 fs/read_write.c:574 ksys_read+0x12a/0x250 fs/read_write.c:717 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88802fd52400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802fd52480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802fd52500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802fd52580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802fd52600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================