================================================================== BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x404/0x45c net/rose/rose_timer.c:183 Read of size 2 at addr ffff0000dc57142a by task syz.4.654/10113 CPU: 0 UID: 0 PID: 10113 Comm: syz.4.654 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load2_noabort+0x20/0x2c mm/kasan/report_generic.c:379 rose_timer_expiry+0x404/0x45c net/rose/rose_timer.c:183 call_timer_fn+0x1b4/0x818 kernel/time/timer.c:1747 expire_timers kernel/time/timer.c:1798 [inline] __run_timers kernel/time/timer.c:2372 [inline] __run_timer_base+0x51c/0x76c kernel/time/timer.c:2384 run_timer_base kernel/time/timer.c:2393 [inline] run_timer_softirq+0xcc/0x194 kernel/time/timer.c:2403 handle_softirqs+0x328/0xc88 kernel/softirq.c:579 __do_softirq+0x14/0x20 kernel/softirq.c:613 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:68 call_on_irq_stack+0x30/0x48 arch/arm64/kernel/entry.S:891 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:73 invoke_softirq kernel/softirq.c:460 [inline] __irq_exit_rcu+0x1b0/0x478 kernel/softirq.c:680 irq_exit_rcu+0x14/0x84 kernel/softirq.c:696 __el1_irq arch/arm64/kernel/entry-common.c:654 [inline] el1_interrupt+0x38/0x54 arch/arm64/kernel/entry-common.c:668 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:673 el1h_64_irq+0x6c/0x70 arch/arm64/kernel/entry.S:592 __daif_local_irq_restore arch/arm64/include/asm/irqflags.h:175 [inline] (P) arch_local_irq_restore arch/arm64/include/asm/irqflags.h:195 [inline] (P) __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] (P) _raw_spin_unlock_irqrestore+0x44/0x98 kernel/locking/spinlock.c:194 (P) spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] __wake_up_common_lock kernel/sched/wait.c:127 [inline] __wake_up_sync_key+0x13c/0x18c kernel/sched/wait.c:192 __unix_dgram_recvmsg+0x37c/0xb7c net/unix/af_unix.c:2626 unix_dgram_recvmsg+0xd0/0xe8 net/unix/af_unix.c:2700 sock_recvmsg_nosec+0x90/0xec net/socket.c:1065 ____sys_recvmsg+0x5e0/0x744 net/socket.c:2832 ___sys_recvmsg+0x188/0x45c net/socket.c:2876 do_recvmmsg+0x294/0x7cc net/socket.c:2971 __sys_recvmmsg net/socket.c:3045 [inline] __do_sys_recvmmsg net/socket.c:3068 [inline] __se_sys_recvmmsg net/socket.c:3061 [inline] __arm64_sys_recvmmsg+0x17c/0x238 net/socket.c:3061 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Allocated by task 10066: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:562 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4365 [inline] __kmalloc_node_track_caller_noprof+0x304/0x4d0 mm/slub.c:4384 __do_krealloc mm/slub.c:4942 [inline] krealloc_noprof+0x11c/0x2f0 mm/slub.c:4995 bch2_printbuf_make_room+0x19c/0x2e0 fs/bcachefs/printbuf.c:59 bch2_prt_printf+0x1fc/0x598 fs/bcachefs/printbuf.c:186 bch2_btree_path_to_text_short+0x184/0xb48 fs/bcachefs/btree_iter.c:1516 __bch2_trans_paths_to_text+0xc8/0x168 fs/bcachefs/btree_iter.c:1589 bch2_trans_paths_to_text+0x2c/0x3c fs/bcachefs/btree_iter.c:1597 bch2_trans_update_max_paths+0x144/0x2dc fs/bcachefs/btree_iter.c:1625 btree_path_alloc+0x61c/0x7cc fs/bcachefs/btree_iter.c:1722 bch2_path_get+0x5f4/0xf54 fs/bcachefs/btree_iter.c:1778 bch2_trans_iter_init_common fs/bcachefs/btree_iter.h:529 [inline] bch2_trans_iter_init_outlined+0x1f8/0x36c fs/bcachefs/btree_iter.c:3126 bch2_trans_iter_init fs/bcachefs/btree_iter.h:547 [inline] btree_key_cache_fill+0x160/0x21dc fs/bcachefs/btree_key_cache.c:328 bch2_btree_path_traverse_cached+0x8d8/0xcb4 fs/bcachefs/btree_key_cache.c:399 bch2_btree_path_traverse_one+0x2d0/0x1f0c fs/bcachefs/btree_iter.c:1179 bch2_btree_path_traverse fs/bcachefs/btree_iter.h:250 [inline] bch2_btree_iter_peek_slot+0x598/0x2c24 fs/bcachefs/btree_iter.c:2828 __bch2_bkey_get_iter fs/bcachefs/btree_iter.h:632 [inline] bch2_bkey_get_iter fs/bcachefs/btree_iter.h:646 [inline] bch2_check_discard_freespace_key+0x208/0xb3c fs/bcachefs/alloc_background.c:1417 try_alloc_bucket fs/bcachefs/alloc_foreground.c:272 [inline] bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:420 [inline] bch2_bucket_alloc_trans+0xb08/0x1698 fs/bcachefs/alloc_foreground.c:545 bch2_bucket_alloc_set_trans+0x490/0x9cc fs/bcachefs/alloc_foreground.c:729 __open_bucket_add_buckets+0x10a4/0x1954 fs/bcachefs/alloc_foreground.c:926 open_bucket_add_buckets+0x314/0x3d0 fs/bcachefs/alloc_foreground.c:958 bch2_alloc_sectors_start_trans+0xa54/0x1880 fs/bcachefs/alloc_foreground.c:-1 __bch2_btree_node_alloc fs/bcachefs/btree_update_interior.c:320 [inline] bch2_btree_reserve_get+0x4ec/0xe80 fs/bcachefs/btree_update_interior.c:534 bch2_btree_update_start+0x1148/0x1ab8 fs/bcachefs/btree_update_interior.c:1270 bch2_btree_split_leaf+0x118/0x71c fs/bcachefs/btree_update_interior.c:1921 bch2_trans_commit_error+0x17c/0x11a0 fs/bcachefs/btree_trans_commit.c:914 __bch2_trans_commit+0x17a4/0x625c fs/bcachefs/btree_trans_commit.c:1104 bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline] bch2_fs_initialize+0xcc4/0x113c fs/bcachefs/recovery.c:1267 bch2_fs_start+0x930/0xbec fs/bcachefs/super.c:1214 bch2_fs_get_tree+0x880/0x107c fs/bcachefs/fs.c:2488 vfs_get_tree+0x90/0x28c fs/super.c:1815 do_new_mount+0x278/0x7f4 fs/namespace.c:3805 path_mount+0x5b4/0xde0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4321 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Freed by task 10066: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x74/0x98 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kfree+0x17c/0x474 mm/slub.c:4879 krealloc_noprof+0x214/0x2f0 mm/slub.c:-1 bch2_printbuf_make_room+0x19c/0x2e0 fs/bcachefs/printbuf.c:59 bch2_prt_printf+0x1fc/0x598 fs/bcachefs/printbuf.c:186 bch2_bpos_to_text+0x21c/0x320 fs/bcachefs/bkey_methods.c:-1 bch2_btree_path_to_text_short+0x1d8/0xb48 fs/bcachefs/btree_iter.c:1523 __bch2_trans_paths_to_text+0xc8/0x168 fs/bcachefs/btree_iter.c:1589 bch2_trans_paths_to_text+0x2c/0x3c fs/bcachefs/btree_iter.c:1597 bch2_trans_update_max_paths+0x144/0x2dc fs/bcachefs/btree_iter.c:1625 btree_path_alloc+0x61c/0x7cc fs/bcachefs/btree_iter.c:1722 bch2_path_get+0x5f4/0xf54 fs/bcachefs/btree_iter.c:1778 bch2_trans_iter_init_common fs/bcachefs/btree_iter.h:529 [inline] bch2_trans_iter_init_outlined+0x1f8/0x36c fs/bcachefs/btree_iter.c:3126 bch2_trans_iter_init fs/bcachefs/btree_iter.h:547 [inline] btree_key_cache_fill+0x160/0x21dc fs/bcachefs/btree_key_cache.c:328 bch2_btree_path_traverse_cached+0x8d8/0xcb4 fs/bcachefs/btree_key_cache.c:399 bch2_btree_path_traverse_one+0x2d0/0x1f0c fs/bcachefs/btree_iter.c:1179 bch2_btree_path_traverse fs/bcachefs/btree_iter.h:250 [inline] bch2_btree_iter_peek_slot+0x598/0x2c24 fs/bcachefs/btree_iter.c:2828 __bch2_bkey_get_iter fs/bcachefs/btree_iter.h:632 [inline] bch2_bkey_get_iter fs/bcachefs/btree_iter.h:646 [inline] bch2_check_discard_freespace_key+0x208/0xb3c fs/bcachefs/alloc_background.c:1417 try_alloc_bucket fs/bcachefs/alloc_foreground.c:272 [inline] bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:420 [inline] bch2_bucket_alloc_trans+0xb08/0x1698 fs/bcachefs/alloc_foreground.c:545 bch2_bucket_alloc_set_trans+0x490/0x9cc fs/bcachefs/alloc_foreground.c:729 __open_bucket_add_buckets+0x10a4/0x1954 fs/bcachefs/alloc_foreground.c:926 open_bucket_add_buckets+0x314/0x3d0 fs/bcachefs/alloc_foreground.c:958 bch2_alloc_sectors_start_trans+0xa54/0x1880 fs/bcachefs/alloc_foreground.c:-1 __bch2_btree_node_alloc fs/bcachefs/btree_update_interior.c:320 [inline] bch2_btree_reserve_get+0x4ec/0xe80 fs/bcachefs/btree_update_interior.c:534 bch2_btree_update_start+0x1148/0x1ab8 fs/bcachefs/btree_update_interior.c:1270 bch2_btree_split_leaf+0x118/0x71c fs/bcachefs/btree_update_interior.c:1921 bch2_trans_commit_error+0x17c/0x11a0 fs/bcachefs/btree_trans_commit.c:914 __bch2_trans_commit+0x17a4/0x625c fs/bcachefs/btree_trans_commit.c:1104 bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline] bch2_fs_initialize+0xcc4/0x113c fs/bcachefs/recovery.c:1267 bch2_fs_start+0x930/0xbec fs/bcachefs/super.c:1214 bch2_fs_get_tree+0x880/0x107c fs/bcachefs/fs.c:2488 vfs_get_tree+0x90/0x28c fs/super.c:1815 do_new_mount+0x278/0x7f4 fs/namespace.c:3805 path_mount+0x5b4/0xde0 fs/namespace.c:4120 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount fs/namespace.c:4321 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4321 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at ffff0000dc571400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of freed 512-byte region [ffff0000dc571400, ffff0000dc571600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11c570 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000040 ffff0000c0001c80 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 05ffc00000000040 ffff0000c0001c80 0000000000000000 dead000000000001 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 05ffc00000000002 fffffdffc3715c01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000dc571300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000dc571380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000dc571400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000dc571480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000dc571500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================