================================================================== BUG: KASAN: slab-use-after-free in consumer_filter kernel/events/uprobes.c:869 [inline] BUG: KASAN: slab-use-after-free in filter_chain kernel/events/uprobes.c:880 [inline] BUG: KASAN: slab-use-after-free in uprobe_mmap+0xb9a/0x11a0 kernel/events/uprobes.c:1387 Read of size 8 at addr ffff88802e117d30 by task syz.0.5265/24751 CPU: 1 UID: 0 PID: 24751 Comm: syz.0.5265 Not tainted 6.11.0-rc1-syzkaller-00043-g94ede2a3e913 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 consumer_filter kernel/events/uprobes.c:869 [inline] filter_chain kernel/events/uprobes.c:880 [inline] uprobe_mmap+0xb9a/0x11a0 kernel/events/uprobes.c:1387 mmap_region+0x1891/0x2090 mm/mmap.c:3058 do_mmap+0x8f9/0x1010 mm/mmap.c:1468 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588 ksys_mmap_pgoff+0x4f1/0x720 mm/mmap.c:1514 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9f8cb77299 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9f8d949048 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f9f8cd06058 RCX: 00007f9f8cb77299 RDX: 0000000000000001 RSI: 0000000000003000 RDI: 0000000020000000 RBP: 00007f9f8cbe48e6 R08: 0000000000000012 R09: 0000000000000000 R10: 0000000000000012 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f9f8cd06058 R15: 00007ffdde140098 Allocated by task 18300: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4158 [inline] __kmalloc_node_track_caller_noprof+0x225/0x440 mm/slub.c:4177 kmemdup_noprof+0x2a/0x60 mm/util.c:133 sctp_addr_wq_mgmt+0x2f8/0x720 net/sctp/protocol.c:756 sctp_inet6addr_event+0x566/0x730 net/sctp/ipv6.c:94 notifier_call_chain+0x1a1/0x3e0 kernel/notifier.c:93 atomic_notifier_call_chain+0xdb/0x180 kernel/notifier.c:231 ipv6_add_addr+0xde0/0x1090 net/ipv6/addrconf.c:1180 addrconf_add_linklocal+0x36c/0xa30 net/ipv6/addrconf.c:3315 addrconf_addr_gen+0x510/0xbb0 addrconf_dev_config net/ipv6/addrconf.c:3492 [inline] addrconf_init_auto_addrs+0x96a/0xeb0 net/ipv6/addrconf.c:3570 addrconf_notify+0xaff/0x1020 net/ipv6/addrconf.c:3743 notifier_call_chain+0x1a1/0x3e0 kernel/notifier.c:93 netdev_state_change+0x11f/0x1a0 net/core/dev.c:1376 linkwatch_do_dev+0x112/0x170 net/core/link_watch.c:177 __linkwatch_run_queue+0x44f/0x6c0 net/core/link_watch.c:234 linkwatch_event+0x4c/0x60 net/core/link_watch.c:277 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2e/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390 kthread+0x2f2/0x390 kernel/kthread.c:389 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 24709: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xe0/0x150 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2252 [inline] slab_free mm/slub.c:4473 [inline] kfree+0x149/0x360 mm/slub.c:4594 sctp_addr_wq_timeout_handler+0x2e6/0x470 net/sctp/protocol.c:685 call_timer_fn+0x190/0x650 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers kernel/time/timer.c:2417 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2428 run_timer_base kernel/time/timer.c:2437 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447 handle_softirqs+0x2c6/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 The buggy address belongs to the object at ffff88802e117d00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 48 bytes inside of freed 64-byte region [ffff88802e117d00, ffff88802e117d40) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2e117 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000000 ffff8880158418c0 ffffea0000898b00 dead000000000005 raw: 0000000000000000 0000000000200020 00000001fdffffff 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 5220, tgid 5220 (syz-executor), ts 82413392553, free_ts 82379039109 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3442 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2321 allocate_slab+0x5a/0x2f0 mm/slub.c:2484 new_slab mm/slub.c:2537 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3723 __slab_alloc+0x58/0xa0 mm/slub.c:3813 __slab_alloc_node mm/slub.c:3866 [inline] slab_alloc_node mm/slub.c:4025 [inline] __kmalloc_cache_noprof+0x1d5/0x2c0 mm/slub.c:4184 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:807 [inline] snmp6_alloc_dev net/ipv6/addrconf.c:355 [inline] ipv6_add_dev+0x510/0x1220 net/ipv6/addrconf.c:409 addrconf_notify+0x6a7/0x1020 net/ipv6/addrconf.c:3653 notifier_call_chain+0x1a1/0x3e0 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2032 [inline] call_netdevice_notifiers net/core/dev.c:2046 [inline] register_netdevice+0x167f/0x1b00 net/core/dev.c:10468 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:690 [inline] nsim_create+0x647/0x890 drivers/net/netdevsim/netdev.c:750 __nsim_dev_port_add+0x6c0/0xae0 drivers/net/netdevsim/dev.c:1390 nsim_dev_port_add_all+0x33/0xf0 drivers/net/netdevsim/dev.c:1446 nsim_drv_probe+0x85f/0xb80 drivers/net/netdevsim/dev.c:1604 page last free pid 5229 tgid 5229 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2612 __slab_free+0x31b/0x3d0 mm/slub.c:4384 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3988 [inline] slab_alloc_node mm/slub.c:4037 [inline] __kmalloc_cache_noprof+0x132/0x2c0 mm/slub.c:4184 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:807 [inline] ref_tracker_alloc+0x14b/0x490 lib/ref_tracker.c:203 __netdev_tracker_alloc include/linux/netdevice.h:4047 [inline] netdev_hold include/linux/netdevice.h:4076 [inline] netdev_queue_add_kobject net/core/net-sysfs.c:1783 [inline] netdev_queue_update_kobjects+0x186/0x5f0 net/core/net-sysfs.c:1838 register_queue_kobjects net/core/net-sysfs.c:1900 [inline] netdev_register_kobject+0x265/0x320 net/core/net-sysfs.c:2140 register_netdevice+0x12c5/0x1b00 net/core/dev.c:10435 ipvlan_link_new+0x38e/0xa30 drivers/net/ipvlan/ipvlan_main.c:588 rtnl_newlink_create net/core/rtnetlink.c:3510 [inline] __rtnl_newlink net/core/rtnetlink.c:3730 [inline] rtnl_newlink+0x1593/0x20a0 net/core/rtnetlink.c:3743 rtnetlink_rcv_msg+0x741/0xcf0 net/core/rtnetlink.c:6647 netlink_rcv_skb+0x1e5/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f2/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 Memory state around the buggy address: ffff88802e117c00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802e117c80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc >ffff88802e117d00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88802e117d80: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ffff88802e117e00: 00 00 00 00 00 00 00 01 fc fc fc fc fc fc fc fc ==================================================================