================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0xb4/0x158 lib/list_debug.c:49 Read of size 8 at addr ff6000001cf8ec88 by task kworker/0:0/3191 CPU: 0 UID: 0 PID: 3191 Comm: kworker/0:0 Not tainted 6.12.0-rc6-syzkaller-g57f7c7dc78cd #0 Hardware name: riscv-virtio,qemu (DT) Workqueue: events binder_deferred_func Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:130 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:136 [] __dump_stack lib/dump_stack.c:94 [inline] [] dump_stack_lvl+0x122/0x196 lib/dump_stack.c:120 [] print_address_description mm/kasan/report.c:377 [inline] [] print_report+0x290/0x5a0 mm/kasan/report.c:488 [] kasan_report+0xec/0x118 mm/kasan/report.c:601 [] __asan_report_load8_noabort+0x12/0x1a mm/kasan/report_generic.c:381 [] __list_del_entry_valid_or_report+0xb4/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+0xb6/0x47c drivers/android/binder.c:5110 [] binder_deferred_release drivers/android/binder.c:6261 [inline] [] binder_deferred_func+0xd40/0x123e drivers/android/binder.c:6296 [] process_one_work+0x956/0x1dae kernel/workqueue.c:3229 [] process_scheduled_works kernel/workqueue.c:3310 [inline] [] worker_thread+0x5be/0xdc6 kernel/workqueue.c:3391 [] kthread+0x28c/0x3a6 kernel/kthread.c:389 [] ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:326 Allocated by task 6061: stack_trace_save+0xa0/0xd2 kernel/stacktrace.c:122 kasan_save_stack+0x3e/0x6a mm/kasan/common.c:47 kasan_save_track+0x16/0x28 mm/kasan/common.c:68 kasan_save_alloc_info+0x30/0x3e mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xa0/0xa6 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:257 [inline] __kmalloc_cache_noprof+0x1f4/0x318 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+0x148e/0x4af6 drivers/android/binder.c:4485 binder_ioctl_write_read drivers/android/binder.c:5387 [inline] binder_ioctl+0x200e/0x727a 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] __riscv_sys_ioctl+0x182/0x1e6 fs/ioctl.c:893 syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:90 do_trap_ecall_u+0x1aa/0x216 arch/riscv/kernel/traps.c:331 _new_vmalloc_restore_context_a0+0xc2/0xce Freed by task 3191: stack_trace_save+0xa0/0xd2 kernel/stacktrace.c:122 kasan_save_stack+0x3e/0x6a mm/kasan/common.c:47 kasan_save_track+0x16/0x28 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x5a mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x4e/0x68 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+0x13c/0x4ce 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+0xcb8/0x123e drivers/android/binder.c:6296 process_one_work+0x956/0x1dae kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x5be/0xdc6 kernel/workqueue.c:3391 kthread+0x28c/0x3a6 kernel/kthread.c:389 ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:326 The buggy address belongs to the object at ff6000001cf8ec80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 8 bytes inside of freed 64-byte region [ff6000001cf8ec80, ff6000001cf8ecc0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9cf8e anon flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff) page_type: f5(slab) raw: 0ffe000000000000 ff600000114018c0 ff1c0000004be3c0 dead000000000005 raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 3197, tgid 3197 (syz-executor), ts 583428502300, free_ts 582560071400 __set_page_owner+0xa2/0x70c mm/page_owner.c:320 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xec/0x1e4 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0xdaa/0x295a mm/page_alloc.c:3457 __alloc_pages_noprof+0x1e2/0x1e96 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0xf8/0x48a mm/mempolicy.c:2265 alloc_pages_noprof+0x174/0x2f0 mm/mempolicy.c:2345 alloc_slab_page mm/slub.c:2412 [inline] allocate_slab mm/slub.c:2578 [inline] new_slab+0x2b6/0x40c mm/slub.c:2631 ___slab_alloc+0xaca/0x114c mm/slub.c:3818 __slab_alloc.constprop.0+0x60/0xb2 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] __do_kmalloc_node mm/slub.c:4263 [inline] __kmalloc_noprof+0x33a/0x4e4 mm/slub.c:4276 kmalloc_noprof include/linux/slab.h:882 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] kobject_get_path+0xdc/0x22c lib/kobject.c:161 kobject_uevent_env+0x256/0x14e2 lib/kobject_uevent.c:545 kobject_uevent+0x22/0x2e lib/kobject_uevent.c:656 netdev_queue_add_kobject net/core/net-sysfs.c:1800 [inline] netdev_queue_update_kobjects+0x14c/0x570 net/core/net-sysfs.c:1841 register_queue_kobjects net/core/net-sysfs.c:1903 [inline] netdev_register_kobject+0x222/0x304 net/core/net-sysfs.c:2143 register_netdevice+0x1226/0x1dce net/core/dev.c:10495 page last free pid 3550 tgid 3550 stack trace: __reset_page_owner+0x8c/0x400 mm/page_owner.c:297 reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0x592/0xf08 mm/page_alloc.c:2638 __free_pages+0x13c/0x1bc mm/page_alloc.c:4820 __free_slab+0xd0/0x176 mm/slub.c:2648 free_slab+0x38/0x1ae mm/slub.c:2671 discard_slab+0x42/0x5a mm/slub.c:2677 __slab_free+0x346/0x3f6 mm/slub.c:4490 do_slab_free mm/slub.c:4531 [inline] ___cache_free+0x1a6/0x1e0 mm/slub.c:4637 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x76/0x16c mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x158/0x1ba mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x5c/0x82 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] __kmalloc_cache_noprof+0x1a4/0x318 mm/slub.c:4290 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] mca_alloc net/ipv6/mcast.c:881 [inline] __ipv6_dev_mc_inc+0x522/0x120c net/ipv6/mcast.c:937 ipv6_dev_mc_inc+0x22/0x2e net/ipv6/mcast.c:958 addrconf_join_solict net/ipv6/addrconf.c:2241 [inline] addrconf_join_solict net/ipv6/addrconf.c:2233 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4104 [inline] addrconf_dad_work+0x1fe/0x1420 net/ipv6/addrconf.c:4229 process_one_work+0x956/0x1dae kernel/workqueue.c:3229 Memory state around the buggy address: ff6000001cf8eb80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ff6000001cf8ec00: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ff6000001cf8ec80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ff6000001cf8ed00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ff6000001cf8ed80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================