================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x10/0xdc lib/list_debug.c:46 Read at addr f5f00000094853c0 by task kworker/1:2/3197 Pointer tag: [f5], memory tag: [fe] CPU: 1 UID: 0 PID: 3197 Comm: kworker/1:2 Not tainted 6.12.0-rc7-syzkaller-00070-g0a9b9d17f3a7 #0 Hardware name: linux,dummy-virt (DT) Workqueue: events binder_deferred_func Call trace: dump_backtrace+0x94/0xec arch/arm64/kernel/stacktrace.c:319 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:326 __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x78/0x90 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x108/0x618 mm/kasan/report.c:488 kasan_report+0x88/0xac mm/kasan/report.c:601 report_tag_fault arch/arm64/mm/fault.c:332 [inline] do_tag_recovery arch/arm64/mm/fault.c:344 [inline] __do_kernel_fault+0x170/0x1c8 arch/arm64/mm/fault.c:386 do_bad_area arch/arm64/mm/fault.c:486 [inline] do_tag_check_fault+0x78/0x8c arch/arm64/mm/fault.c:803 do_mem_abort+0x44/0x94 arch/arm64/mm/fault.c:879 el1_abort+0x40/0x60 arch/arm64/kernel/entry-common.c:432 el1h_64_sync_handler+0xd8/0xe4 arch/arm64/kernel/entry-common.c:492 el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:593 __list_del_entry_valid_or_report+0x10/0xdc lib/list_debug.c:46 __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] binder_dequeue_work_head_ilocked drivers/android/binder.c:540 [inline] binder_release_work+0x80/0x25c drivers/android/binder.c:5110 binder_deferred_release drivers/android/binder.c:6261 [inline] binder_deferred_func+0x650/0x7dc drivers/android/binder.c:6296 process_one_work+0x15c/0x29c kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x24c/0x354 kernel/workqueue.c:3391 kthread+0x114/0x118 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Allocated by task 4467: kasan_save_stack+0x3c/0x64 mm/kasan/common.c:47 save_stack_info+0x40/0x158 mm/kasan/tags.c:106 kasan_save_alloc_info+0x14/0x20 mm/kasan/tags.c:142 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] poison_kmalloc_redzone mm/kasan/common.c:350 [inline] __kasan_kmalloc+0xb4/0xb8 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:257 [inline] __kmalloc_cache_noprof+0x14c/0x2e4 mm/slub.c:4295 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] binder_request_freeze_notification drivers/android/binder.c:3855 [inline] binder_thread_write+0x748/0x1c28 drivers/android/binder.c:4485 binder_ioctl_write_read drivers/android/binder.c:5387 [inline] binder_ioctl+0xf60/0x1270 drivers/android/binder.c:5718 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __arm64_sys_ioctl+0xac/0xf0 fs/ioctl.c:893 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x48/0x110 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0x40/0xe0 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x1c/0x28 arch/arm64/kernel/syscall.c:151 el0_svc+0x30/0xdc arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:598 Freed by task 3197: kasan_save_stack+0x3c/0x64 mm/kasan/common.c:47 save_stack_info+0x40/0x158 mm/kasan/tags.c:106 kasan_save_free_info+0x18/0x24 mm/kasan/tags.c:147 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x74/0x8c mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kfree+0xfc/0x2f0 mm/slub.c:4727 binder_free_ref drivers/android/binder.c:1355 [inline] binder_deferred_release drivers/android/binder.c:6256 [inline] binder_deferred_func+0x5ec/0x7dc drivers/android/binder.c:6296 process_one_work+0x15c/0x29c kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x24c/0x354 kernel/workqueue.c:3391 kthread+0x114/0x118 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 The buggy address belongs to the object at fff00000094853c0 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [fff00000094853c0, fff0000009485400) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xfbf0000009485180 pfn:0x49485 flags: 0x1ffc00000000000(node=0|zone=0|lastcpupid=0x7ff|kasantag=0x0) page_type: f5(slab) raw: 01ffc00000000000 f2f0000003001600 dead000000000122 0000000000000000 raw: fbf0000009485180 0000000080400020 00000001f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: fff0000009485100: f2 f2 f2 f2 f3 f3 f3 fe fe fe fe fe f6 f6 f6 f6 fff0000009485200: fa fa fa fe f1 f1 f1 f1 f3 f3 f3 fe f3 f3 f3 f3 >fff0000009485300: f6 f6 f6 f6 fe fe fe fe f0 f0 f0 fe fe fe fe fe ^ fff0000009485400: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fff0000009485500: fe fe fe fe fe fe fe fe fc fc fc fe fe fe fe fe ================================================================== binder: unexpected work type, 10, not freed