================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x34/0x158 lib/list_debug.c:49 Read of size 8 at addr ffff0000cf2b7e88 by task kworker/1:4/6472 CPU: 1 UID: 0 PID: 6472 Comm: kworker/1:4 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events binder_deferred_func Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 __list_del_entry_valid_or_report+0x34/0x158 lib/list_debug.c:49 __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+0xc0/0x4f4 drivers/android/binder.c:5110 binder_deferred_release drivers/android/binder.c:6261 [inline] binder_deferred_func+0x109c/0x1270 drivers/android/binder.c:6296 process_one_work+0x7bc/0x1600 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 Allocated by task 6546: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:257 [inline] __kmalloc_cache_noprof+0x244/0x378 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 drivers/android/binder.c:4485 [inline] binder_ioctl_write_read+0x1e94/0xb0d8 drivers/android/binder.c:5387 binder_ioctl+0x408/0x2670 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+0x14c/0x1c8 fs/ioctl.c:893 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Freed by task 6472: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x64/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+0x184/0x47c 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+0xff0/0x1270 drivers/android/binder.c:6296 process_one_work+0x7bc/0x1600 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 The buggy address belongs to the object at ffff0000cf2b7e80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 8 bytes inside of freed 64-byte region [ffff0000cf2b7e80, ffff0000cf2b7ec0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f2b7 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000000 ffff0000c00018c0 fffffdffc32571c0 dead000000000002 raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cf2b7d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff0000cf2b7e00: 00 00 00 00 04 fc fc fc fc fc fc fc fc fc fc fc >ffff0000cf2b7e80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff0000cf2b7f00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff0000cf2b7f80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== Unable to handle kernel paging request at virtual address e0aec07ac0000329 KASAN: maybe wild-memory-access in range [0x057a03d600001948-0x057a03d60000194f] Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [e0aec07ac0000329] address between user and kernel address ranges Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP Modules linked in: CPU: 1 UID: 0 PID: 6472 Comm: kworker/1:4 Tainted: G B 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events binder_deferred_func pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __list_del_entry_valid_or_report+0x78/0x158 lib/list_debug.c:62 lr : __list_del_entry_valid_or_report+0x4c/0x158 lib/list_debug.c:50 sp : ffff8000a3c179c0 x29: ffff8000a3c179c0 x28: ffff700014782f80 x27: ffff0000cf2b7e80 x26: dfff800000000000 x25: ffff8000922b00a0 x24: ffff80008f154f3b x23: ffff80008f154f16 x22: dfff800000000000 x21: 057a03d600001948 x20: ffff0000d9a34f00 x19: ffff0000cf2b7e80 x18: 0000000000000008 x17: 0000000000000000 x16: ffff80008b47f65c x15: 0000000000000001 x14: 1ffff000125bc2e8 x13: 0000000000000000 x12: 0000000000000000 x11: ffff7000125bc2e9 x10: 0000000000ff0100 x9 : ffff80009746b3a0 x8 : 00af407ac0000329 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000a3c16ff8 x4 : ffff80008f9bd220 x3 : ffff800083161924 x2 : dead000000000122 x1 : 0000000000000008 x0 : 0000000000000000 Call trace: __list_del_entry_valid_or_report+0x78/0x158 lib/list_debug.c:62 (P) __list_del_entry_valid_or_report+0x4c/0x158 lib/list_debug.c:50 (L) __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+0xc0/0x4f4 drivers/android/binder.c:5110 binder_deferred_release drivers/android/binder.c:6261 [inline] binder_deferred_func+0x109c/0x1270 drivers/android/binder.c:6296 process_one_work+0x7bc/0x1600 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 Code: 91008902 eb0202bf 54000520 d343fea8 (38766908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 91008902 add x2, x8, #0x22 4: eb0202bf cmp x21, x2 8: 54000520 b.eq 0xac // b.none c: d343fea8 lsr x8, x21, #3 * 10: 38766908 ldrb w8, [x8, x22] <-- trapping instruction