================================================================== 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 ffff88802e708688 by task kworker/3:0/35 CPU: 3 UID: 0 PID: 35 Comm: kworker/3:0 Not tainted 6.12.0-rc1-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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+0x9c5/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Allocated by task 5595: 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+0x18f/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 35: 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:2343 [inline] slab_free mm/slub.c:4580 [inline] kfree+0x14f/0x4b0 mm/slub.c:4728 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+0x9c5/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/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 ffff88802e708680 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 8 bytes inside of freed 64-byte region [ffff88802e708680, ffff88802e7086c0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802e708280 pfn:0x2e708 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b0428c0 ffffea000083a5c0 dead000000000006 raw: ffff88802e708280 000000008020001f 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 5343, tgid 5343 (syz-executor), ts 39065167011, free_ts 39041912483 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x101e/0x3070 mm/page_alloc.c:3457 __alloc_pages_noprof+0x223/0x25c0 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265 alloc_slab_page mm/slub.c:2413 [inline] allocate_slab mm/slub.c:2579 [inline] new_slab+0x2ba/0x3f0 mm/slub.c:2632 ___slab_alloc+0xdac/0x1880 mm/slub.c:3819 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3909 __slab_alloc_node mm/slub.c:3962 [inline] slab_alloc_node mm/slub.c:4123 [inline] __do_kmalloc_node mm/slub.c:4264 [inline] __kmalloc_noprof+0x367/0x400 mm/slub.c:4277 kmalloc_noprof include/linux/slab.h:882 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] kobject_get_path+0xd9/0x2b0 lib/kobject.c:161 kobject_uevent_env+0x289/0x1860 lib/kobject_uevent.c:545 netdev_queue_add_kobject net/core/net-sysfs.c:1800 [inline] netdev_queue_update_kobjects+0x151/0x5b0 net/core/net-sysfs.c:1841 register_queue_kobjects net/core/net-sysfs.c:1903 [inline] netdev_register_kobject+0x290/0x3f0 net/core/net-sysfs.c:2143 register_netdevice+0x1473/0x1e90 net/core/dev.c:10487 veth_newlink+0x366/0x9e0 drivers/net/veth.c:1830 rtnl_newlink_create net/core/rtnetlink.c:3510 [inline] __rtnl_newlink+0x1197/0x1920 net/core/rtnetlink.c:3730 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3743 page last free pid 5343 tgid 5343 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0x5f4/0xdc0 mm/page_alloc.c:2638 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4086 [inline] slab_alloc_node mm/slub.c:4135 [inline] __kmalloc_cache_noprof+0x11e/0x300 mm/slub.c:4291 kmalloc_noprof include/linux/slab.h:878 [inline] kzalloc_noprof include/linux/slab.h:1014 [inline] ref_tracker_alloc+0x17c/0x5b0 lib/ref_tracker.c:203 __netdev_tracker_alloc include/linux/netdevice.h:4050 [inline] netdev_hold include/linux/netdevice.h:4079 [inline] netdev_hold include/linux/netdevice.h:4074 [inline] rx_queue_add_kobject net/core/net-sysfs.c:1106 [inline] net_rx_queue_update_kobjects+0x284/0x5f0 net/core/net-sysfs.c:1164 register_queue_kobjects net/core/net-sysfs.c:1898 [inline] netdev_register_kobject+0x26d/0x3f0 net/core/net-sysfs.c:2143 register_netdevice+0x1473/0x1e90 net/core/dev.c:10487 veth_newlink+0x4fb/0x9e0 drivers/net/veth.c:1861 rtnl_newlink_create net/core/rtnetlink.c:3510 [inline] __rtnl_newlink+0x1197/0x1920 net/core/rtnetlink.c:3730 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3743 rtnetlink_rcv_msg+0x3c7/0xea0 net/core/rtnetlink.c:6646 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1901 Memory state around the buggy address: ffff88802e708580: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88802e708600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88802e708680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88802e708700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802e708780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================