================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x14c/0x1c0 lib/list_debug.c:49 Read of size 8 at addr ffff88805f6bc308 by task kworker/1:6/5944 CPU: 1 UID: 0 PID: 5944 Comm: kworker/1:6 Not tainted 6.12.0-rc7-syzkaller-00212-g4a5df3796467 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Workqueue: events binder_deferred_func 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:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 __list_del_entry_valid_or_report+0x14c/0x1c0 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+0x9b/0x490 drivers/android/binder.c:5110 binder_deferred_release drivers/android/binder.c:6261 [inline] binder_deferred_func+0xe6e/0x12e0 drivers/android/binder.c:6296 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 9027: 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 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+0xe19/0x4c60 drivers/android/binder.c:4485 binder_ioctl_write_read drivers/android/binder.c:5387 [inline] binder_ioctl+0x265b/0x6fa0 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] __x64_sys_ioctl+0x192/0x220 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5944: 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:579 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:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kfree+0x14f/0x4b0 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+0xdd7/0x12e0 drivers/android/binder.c:6296 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88805f6bc300 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 8 bytes inside of freed 64-byte region [ffff88805f6bc300, ffff88805f6bc340) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f6bc flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b0418c0 ffffea00017babc0 dead000000000002 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 5861, tgid 5861 (syz-executor), ts 90159222495, free_ts 31054483296 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474 __alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265 alloc_slab_page mm/slub.c:2412 [inline] allocate_slab mm/slub.c:2578 [inline] new_slab+0x2c9/0x410 mm/slub.c:2631 ___slab_alloc+0xdac/0x1880 mm/slub.c:3818 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] __kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4290 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] mpls_add_dev net/mpls/af_mpls.c:1443 [inline] mpls_dev_notify+0x346/0xa20 net/mpls/af_mpls.c:1600 notifier_call_chain+0xbc/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1996 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] register_netdevice+0x17a0/0x1e90 net/core/dev.c:10528 ipcaif_newlink+0x50/0x290 net/caif/chnl_net.c:451 rtnl_newlink_create net/core/rtnetlink.c:3539 [inline] __rtnl_newlink+0x119a/0x1920 net/core/rtnetlink.c:3759 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3772 rtnetlink_rcv_msg+0x3ca/0xea0 net/core/rtnetlink.c:6675 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x661/0x1080 mm/page_alloc.c:2657 free_contig_range+0x133/0x3f0 mm/page_alloc.c:6766 destroy_args+0xa87/0xe60 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x168e/0x31a0 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x12b/0x700 init/main.c:1269 do_initcall_level init/main.c:1331 [inline] do_initcalls init/main.c:1347 [inline] do_basic_setup init/main.c:1366 [inline] kernel_init_freeable+0x5c7/0x900 init/main.c:1580 kernel_init+0x1c/0x2b0 init/main.c:1469 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88805f6bc200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88805f6bc280: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88805f6bc300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88805f6bc380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88805f6bc400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x166/0x1c0 lib/list_debug.c:50 Read of size 8 at addr ffff88805f6bc300 by task kworker/1:6/5944 CPU: 1 UID: 0 PID: 5944 Comm: kworker/1:6 Tainted: G B 6.12.0-rc7-syzkaller-00212-g4a5df3796467 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Workqueue: events binder_deferred_func 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:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 __list_del_entry_valid_or_report+0x166/0x1c0 lib/list_debug.c:50 __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+0x9b/0x490 drivers/android/binder.c:5110 binder_deferred_release drivers/android/binder.c:6261 [inline] binder_deferred_func+0xe6e/0x12e0 drivers/android/binder.c:6296 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 9027: 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 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+0xe19/0x4c60 drivers/android/binder.c:4485 binder_ioctl_write_read drivers/android/binder.c:5387 [inline] binder_ioctl+0x265b/0x6fa0 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] __x64_sys_ioctl+0x192/0x220 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5944: 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:579 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:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kfree+0x14f/0x4b0 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+0xdd7/0x12e0 drivers/android/binder.c:6296 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff88805f6bc300 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of freed 64-byte region [ffff88805f6bc300, ffff88805f6bc340) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f6bc flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b0418c0 ffffea00017babc0 dead000000000002 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 5861, tgid 5861 (syz-executor), ts 90159222495, free_ts 31054483296 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474 __alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265 alloc_slab_page mm/slub.c:2412 [inline] allocate_slab mm/slub.c:2578 [inline] new_slab+0x2c9/0x410 mm/slub.c:2631 ___slab_alloc+0xdac/0x1880 mm/slub.c:3818 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] __kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4290 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] mpls_add_dev net/mpls/af_mpls.c:1443 [inline] mpls_dev_notify+0x346/0xa20 net/mpls/af_mpls.c:1600 notifier_call_chain+0xbc/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1996 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] register_netdevice+0x17a0/0x1e90 net/core/dev.c:10528 ipcaif_newlink+0x50/0x290 net/caif/chnl_net.c:451 rtnl_newlink_create net/core/rtnetlink.c:3539 [inline] __rtnl_newlink+0x119a/0x1920 net/core/rtnetlink.c:3759 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3772 rtnetlink_rcv_msg+0x3ca/0xea0 net/core/rtnetlink.c:6675 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x661/0x1080 mm/page_alloc.c:2657 free_contig_range+0x133/0x3f0 mm/page_alloc.c:6766 destroy_args+0xa87/0xe60 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x168e/0x31a0 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x12b/0x700 init/main.c:1269 do_initcall_level init/main.c:1331 [inline] do_initcalls init/main.c:1347 [inline] do_basic_setup init/main.c:1366 [inline] kernel_init_freeable+0x5c7/0x900 init/main.c:1580 kernel_init+0x1c/0x2b0 init/main.c:1469 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88805f6bc200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88805f6bc280: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88805f6bc300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88805f6bc380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88805f6bc400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== Oops: general protection fault, probably for non-canonical address 0xe0d9fc69400002e7: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: maybe wild-memory-access in range [0x06d0034a00001738-0x06d0034a0000173f] CPU: 1 UID: 0 PID: 5944 Comm: kworker/1:6 Tainted: G B 6.12.0-rc7-syzkaller-00212-g4a5df3796467 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Workqueue: events binder_deferred_func RIP: 0010:__list_del_entry_valid_or_report+0x95/0x1c0 lib/list_debug.c:62 Code: 0f 84 8a 00 00 00 48 b8 22 01 00 00 00 00 ad de 48 39 c1 0f 84 86 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 cf 48 c1 ef 03 <80> 3c 07 00 0f 85 f1 00 00 00 48 8b 01 48 39 f0 75 75 48 8d 7a 08 RSP: 0018:ffffc9000400fbd8 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88805f6bc300 RCX: 06d0034a00001738 RDX: ffff88807c27a900 RSI: ffff88805f6bc300 RDI: 00da0069400002e7 RBP: 0000000000000001 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 3d3d3d3d3d3d3d3d R12: dffffc0000000000 R13: ffff88805d9332d0 R14: ffff88805d9330d8 R15: ffff88805f6bc308 FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c25d903 CR3: 00000000505dc000 CR4: 0000000000350ef0 Call Trace: __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+0x9b/0x490 drivers/android/binder.c:5110 binder_deferred_release drivers/android/binder.c:6261 [inline] binder_deferred_func+0xe6e/0x12e0 drivers/android/binder.c:6296 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__list_del_entry_valid_or_report+0x95/0x1c0 lib/list_debug.c:62 Code: 0f 84 8a 00 00 00 48 b8 22 01 00 00 00 00 ad de 48 39 c1 0f 84 86 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 cf 48 c1 ef 03 <80> 3c 07 00 0f 85 f1 00 00 00 48 8b 01 48 39 f0 75 75 48 8d 7a 08 RSP: 0018:ffffc9000400fbd8 EFLAGS: 00010216 RAX: dffffc0000000000 RBX: ffff88805f6bc300 RCX: 06d0034a00001738 RDX: ffff88807c27a900 RSI: ffff88805f6bc300 RDI: 00da0069400002e7 RBP: 0000000000000001 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 3d3d3d3d3d3d3d3d R12: dffffc0000000000 R13: ffff88805d9332d0 R14: ffff88805d9330d8 R15: ffff88805f6bc308 FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c25d903 CR3: 00000000505dc000 CR4: 0000000000350ef0 ---------------- Code disassembly (best guess): 0: 0f 84 8a 00 00 00 je 0x90 6: 48 b8 22 01 00 00 00 movabs $0xdead000000000122,%rax d: 00 ad de 10: 48 39 c1 cmp %rax,%rcx 13: 0f 84 86 00 00 00 je 0x9f 19: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 20: fc ff df 23: 48 89 cf mov %rcx,%rdi 26: 48 c1 ef 03 shr $0x3,%rdi * 2a: 80 3c 07 00 cmpb $0x0,(%rdi,%rax,1) <-- trapping instruction 2e: 0f 85 f1 00 00 00 jne 0x125 34: 48 8b 01 mov (%rcx),%rax 37: 48 39 f0 cmp %rsi,%rax 3a: 75 75 jne 0xb1 3c: 48 8d 7a 08 lea 0x8(%rdx),%rdi