================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x1d4/0x200 lib/list_debug.c:62 Read of size 8 at addr ffff88801efcc550 by task syz.0.2758/18977 CPU: 2 UID: 0 PID: 18977 Comm: syz.0.2758 Not tainted 6.14.0-rc2-syzkaller-00034-gfebbc555cf0f #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+0x1d4/0x200 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 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+0x59e/0x1250 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 get_signal+0x2576/0x2610 kernel/signal.c:3036 arch_do_signal_or_restart+0x90/0x7e0 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x150/0x2a0 kernel/entry/common.c:218 __do_fast_syscall_32+0x80/0x120 arch/x86/entry/common.c:389 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7ff4579 Code: Unable to access opcode bytes at 0xf7ff454f. RSP: 002b:00000000f5116460 EFLAGS: 00000293 ORIG_RAX: 000000000000010b RAX: fffffffffffffdfc RBX: 0000000000000000 RCX: 0000000000000000 RDX: 00000000f5116494 RSI: 00000000f511648c RDI: 00000000f5116494 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 28315: 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 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4294 [inline] __kmalloc_node_noprof+0x21f/0x520 mm/slub.c:4300 kmalloc_node_noprof include/linux/slab.h:928 [inline] crypto_alloc_tfmmem.isra.0+0x38/0x110 crypto/api.c:513 crypto_create_tfm_node+0x83/0x320 crypto/api.c:533 crypto_create_tfm crypto/internal.h:120 [inline] crypto_spawn_tfm2+0x62/0xb0 crypto/algapi.c:795 crypto_spawn_shash include/crypto/internal/hash.h:242 [inline] adiantum_init_tfm+0xaf/0x260 crypto/adiantum.c:448 crypto_skcipher_init_tfm+0x177/0x2d0 crypto/skcipher.c:586 crypto_create_tfm_node+0x100/0x320 crypto/api.c:539 crypto_alloc_tfm_node+0x102/0x260 crypto/api.c:640 alg_bind+0x264/0x510 crypto/af_alg.c:184 __sys_bind_socket net/socket.c:1817 [inline] __sys_bind_socket net/socket.c:1809 [inline] __sys_bind+0x213/0x260 net/socket.c:1848 __do_sys_bind net/socket.c:1853 [inline] __se_sys_bind net/socket.c:1851 [inline] __ia32_sys_bind+0x71/0xb0 net/socket.c:1851 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 Freed by task 28305: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x2c4/0x4d0 mm/slub.c:4757 crypto_destroy_tfm crypto/api.c:683 [inline] crypto_destroy_tfm+0x14d/0x2b0 crypto/api.c:668 crypto_exit_ops crypto/api.c:370 [inline] crypto_destroy_tfm crypto/api.c:681 [inline] crypto_destroy_tfm+0x135/0x2b0 crypto/api.c:668 alg_do_release crypto/af_alg.c:118 [inline] alg_sock_destruct+0x8a/0xe0 crypto/af_alg.c:502 __sk_destruct+0x4d/0x720 net/core/sock.c:2276 sk_destruct+0xc2/0xf0 net/core/sock.c:2324 __sk_free+0xf4/0x3e0 net/core/sock.c:2335 sk_free+0x6a/0x90 net/core/sock.c:2346 sock_put include/net/sock.h:1913 [inline] af_alg_release+0x9c/0x100 crypto/af_alg.c:125 __sock_release+0xb0/0x270 net/socket.c:647 sock_close+0x1c/0x30 net/socket.c:1398 __fput+0x3ff/0xb70 fs/file_table.c:464 task_work_run+0x14e/0x250 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x27b/0x2a0 kernel/entry/common.c:218 __do_fast_syscall_32+0x80/0x120 arch/x86/entry/common.c:389 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 ffff88801efcc000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1360 bytes inside of freed 2048-byte region [ffff88801efcc000, ffff88801efcc800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1efc8 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 ffff88801b042f00 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b042f00 dead000000000100 dead000000000122 head: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea00007bf201 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 1, tgid 1 (swapper/0), ts 2478620264, free_ts 0 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+0xbfa/0x1600 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] __kmalloc_cache_noprof+0xf6/0x420 mm/slub.c:4320 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] acpi_add_single_object+0xbf/0x1b50 drivers/acpi/scan.c:1875 acpi_bus_check_add+0x237/0x900 drivers/acpi/scan.c:2180 acpi_ns_walk_namespace+0x405/0x5b0 drivers/acpi/acpica/nswalk.c:233 acpi_walk_namespace drivers/acpi/acpica/nsxfeval.c:606 [inline] acpi_walk_namespace+0x110/0x130 drivers/acpi/acpica/nsxfeval.c:554 acpi_bus_scan+0x3ea/0x4a0 drivers/acpi/scan.c:2594 acpi_scan_init+0x245/0x760 drivers/acpi/scan.c:2746 acpi_init+0x427/0xb80 drivers/acpi/bus.c:1467 do_one_initcall+0x128/0x630 init/main.c:1257 page_owner free stack trace missing Memory state around the buggy address: ffff88801efcc400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801efcc480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801efcc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801efcc580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801efcc600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================