================================================================== BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x464/0x4a0 net/rose/rose_timer.c:183 Read of size 2 at addr ffff888021bc1c2a by task syz-executor/12501 CPU: 0 UID: 0 PID: 12501 Comm: syz-executor Not tainted 6.14.0-rc2-syzkaller-00158-g071ed42cff4f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 rose_timer_expiry+0x464/0x4a0 net/rose/rose_timer.c:183 call_timer_fn+0x187/0x650 kernel/time/timer.c:1789 expire_timers kernel/time/timer.c:1840 [inline] __run_timers kernel/time/timer.c:2414 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2426 run_timer_base kernel/time/timer.c:2435 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2445 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0xf7/0x220 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:console_flush_all+0x996/0xeb0 Code: 48 21 c3 0f 85 16 02 00 00 e8 56 eb 20 00 4c 8b 7c 24 10 4d 85 f6 75 07 e8 47 eb 20 00 eb 06 e8 40 eb 20 00 fb 48 8b 5c 24 18 <48> 8b 44 24 30 42 80 3c 28 00 74 08 48 89 df e8 76 28 88 00 4c 8b RSP: 0018:ffffc90003ba6900 EFLAGS: 00000293 RAX: ffffffff81a0cc20 RBX: ffffffff8f38bbf8 RCX: ffff888031473c00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90003ba6ab0 R08: ffffffff81a0cbf7 R09: 1ffffffff28a8908 R10: dffffc0000000000 R11: fffffbfff28a8909 R12: ffffffff8f38bba0 R13: dffffc0000000000 R14: 0000000000000200 R15: ffffc90003ba6b00 __console_flush_and_unlock kernel/printk/printk.c:3269 [inline] console_unlock+0x14f/0x3b0 kernel/printk/printk.c:3309 vprintk_emit+0x730/0xa10 kernel/printk/printk.c:2432 _printk+0xd5/0x120 kernel/printk/printk.c:2457 batadv_hardif_enable_interface+0x7d0/0x9f0 net/batman-adv/hard-interface.c:756 batadv_softif_slave_add+0x79/0x100 net/batman-adv/soft-interface.c:858 do_set_master net/core/rtnetlink.c:2926 [inline] do_setlink+0xe7f/0x4300 net/core/rtnetlink.c:3125 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1704/0x1d30 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:733 __sys_sendto+0x363/0x4c0 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2190 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:0x7fa82178ec7c Code: 2a 5f 02 00 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 70 5f 02 00 48 8b RSP: 002b:00007ffd89cff980 EFLAGS: 00000293 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fa8224d4620 RCX: 00007fa82178ec7c RDX: 0000000000000028 RSI: 00007fa8224d4670 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00007ffd89cff9d4 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000003 R13: 0000000000000000 R14: 00007fa8224d4670 R15: 0000000000000000 Allocated by task 12247: 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:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4294 [inline] __kmalloc_noprof+0x285/0x4c0 mm/slub.c:4306 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] fib6_info_alloc+0x2e/0xf0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x445/0x12b0 net/ipv6/route.c:3766 ip6_route_add+0x28/0x160 net/ipv6/route.c:3858 addrconf_add_mroute net/ipv6/addrconf.c:2549 [inline] addrconf_add_dev+0x35b/0x540 net/ipv6/addrconf.c:2567 inet6_addr_add+0x1ee/0xe30 net/ipv6/addrconf.c:3029 inet6_rtm_newaddr+0xa89/0xf10 net/ipv6/addrconf.c:5054 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:733 __sys_sendto+0x363/0x4c0 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2190 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 Freed by task 16: 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:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x196/0x430 mm/slub.c:4757 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0xaaa/0x17a0 kernel/rcu/tree.c:2802 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:561 run_ksoftirqd+0xca/0x130 kernel/softirq.c:950 smpboot_thread_fn+0x544/0xa30 kernel/smpboot.c:164 kthread+0x7a9/0x920 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xaa/0xc0 mm/kasan/generic.c:548 __call_rcu_common kernel/rcu/tree.c:3065 [inline] call_rcu+0x168/0xac0 kernel/rcu/tree.c:3172 call_rcu_hurry include/linux/rcupdate.h:115 [inline] fib6_info_release include/net/ip6_fib.h:343 [inline] ip6_route_info_create+0xa33/0x12b0 net/ipv6/route.c:3844 ip6_route_add+0x28/0x160 net/ipv6/route.c:3858 addrconf_add_mroute net/ipv6/addrconf.c:2549 [inline] addrconf_add_dev+0x35b/0x540 net/ipv6/addrconf.c:2567 inet6_addr_add+0x1ee/0xe30 net/ipv6/addrconf.c:3029 inet6_rtm_newaddr+0xa89/0xf10 net/ipv6/addrconf.c:5054 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x206/0x480 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8de/0xcb0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:733 __sys_sendto+0x363/0x4c0 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2190 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 The buggy address belongs to the object at ffff888021bc1c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of freed 512-byte region [ffff888021bc1c00, ffff888021bc1e00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888021bc0400 pfn:0x21bc0 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b041c80 ffffea0000ec7710 ffffea000070f910 raw: ffff888021bc0400 000000000010000f 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b041c80 ffffea0000ec7710 ffffea000070f910 head: ffff888021bc0400 000000000010000f 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea000086f001 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5850, tgid 5850 (syz-executor), ts 82464070442, free_ts 82417471779 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2587 new_slab mm/slub.c:2640 [inline] ___slab_alloc+0xc27/0x14a0 mm/slub.c:3826 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] __do_kmalloc_node mm/slub.c:4293 [inline] __kmalloc_noprof+0x2e6/0x4c0 mm/slub.c:4306 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] fib6_info_alloc+0x2e/0xf0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x445/0x12b0 net/ipv6/route.c:3766 ip6_route_add+0x28/0x160 net/ipv6/route.c:3858 addrconf_prefix_route net/ipv6/addrconf.c:2485 [inline] fixup_permanent_addr net/ipv6/addrconf.c:3594 [inline] addrconf_permanent_addr+0x7c7/0xc50 net/ipv6/addrconf.c:3618 addrconf_notify+0x9f5/0x1020 net/ipv6/addrconf.c:3690 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 __dev_notify_flags+0x207/0x400 dev_change_flags+0xf0/0x1a0 net/core/dev.c:9249 page last free pid 5834 tgid 5834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2660 stack_depot_save_flags+0x7c6/0x940 lib/stackdepot.c:674 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_save_track+0x51/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4609 [inline] kfree+0x196/0x430 mm/slub.c:4757 free_modprobe_argv+0x5c/0x80 kernel/module/kmod.c:67 call_usermodehelper_freeinfo kernel/umh.c:42 [inline] call_usermodehelper_exec+0x14d/0x4a0 kernel/umh.c:462 call_modprobe kernel/module/kmod.c:102 [inline] __request_module+0x3ee/0x640 kernel/module/kmod.c:172 dev_load+0x18f/0x1f0 net/core/dev_ioctl.c:683 dev_ioctl+0x52e/0x1340 net/core/dev_ioctl.c:749 sock_do_ioctl+0x240/0x460 net/socket.c:1213 sock_ioctl+0x626/0x8e0 net/socket.c:1318 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 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 Memory state around the buggy address: ffff888021bc1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888021bc1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888021bc1c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888021bc1c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888021bc1d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 48 21 c3 and %rax,%rbx 3: 0f 85 16 02 00 00 jne 0x21f 9: e8 56 eb 20 00 call 0x20eb64 e: 4c 8b 7c 24 10 mov 0x10(%rsp),%r15 13: 4d 85 f6 test %r14,%r14 16: 75 07 jne 0x1f 18: e8 47 eb 20 00 call 0x20eb64 1d: eb 06 jmp 0x25 1f: e8 40 eb 20 00 call 0x20eb64 24: fb sti 25: 48 8b 5c 24 18 mov 0x18(%rsp),%rbx * 2a: 48 8b 44 24 30 mov 0x30(%rsp),%rax <-- trapping instruction 2f: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1) 34: 74 08 je 0x3e 36: 48 89 df mov %rbx,%rdi 39: e8 76 28 88 00 call 0x8828b4 3e: 4c rex.WR 3f: 8b .byte 0x8b