================================================================== BUG: KASAN: use-after-free in rose_transmit_link+0x4f8/0x66c net/rose/rose_link.c:266 Read of size 1 at addr ffff0000cb7d5032 by task syz.3.681/6603 CPU: 1 PID: 6603 Comm: syz.3.681 Not tainted 6.1.140-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x88/0x220 mm/kasan/report.c:316 print_report+0x50/0x68 mm/kasan/report.c:427 kasan_report+0xa8/0x100 mm/kasan/report.c:531 __asan_report_load1_noabort+0x2c/0x38 mm/kasan/report_generic.c:348 rose_transmit_link+0x4f8/0x66c net/rose/rose_link.c:266 rose_write_internal+0xeec/0x17c0 net/rose/rose_subr.c:198 rose_release+0x224/0x518 net/rose/af_rose.c:671 __sock_release net/socket.c:654 [inline] sock_close+0xb4/0x1f8 net/socket.c:1400 __fput+0x1bc/0x7c0 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x1ec/0x270 kernel/task_work.c:203 get_signal+0x1120/0x1310 kernel/signal.c:2648 do_signal arch/arm64/kernel/signal.c:1081 [inline] do_notify_resume+0x340/0x2b0c arch/arm64/kernel/signal.c:1134 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x138 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 4450: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x28/0x34 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace+0x7c/0x94 mm/slab_common.c:1031 kmalloc include/linux/slab.h:563 [inline] rose_add_node+0x1f4/0xba4 net/rose/rose_route.c:85 rose_rt_ioctl+0xa04/0xde4 net/rose/rose_route.c:747 rose_ioctl+0x378/0xb80 net/rose/af_rose.c:1380 sock_do_ioctl+0xf8/0x240 net/socket.c:1204 sock_ioctl+0x5c4/0x840 net/socket.c:1321 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Freed by task 6602: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x3c/0x60 mm/kasan/generic.c:516 ____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x16c/0x1ec mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0xc0/0x224 mm/slub.c:3674 kfree+0xd0/0x1ac mm/slab_common.c:988 rose_remove_neigh+0x23c/0x2b8 net/rose/rose_route.c:-1 rose_rt_device_down+0x33c/0x394 net/rose/rose_route.c:522 rose_device_event+0x5d8/0x68c net/rose/af_rose.c:248 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:2001 [inline] call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers net/core/dev.c:2053 [inline] __dev_notify_flags+0x250/0x46c net/core/dev.c:-1 dev_change_flags+0xc8/0x154 net/core/dev.c:8702 dev_ifsioc+0x524/0xed0 net/core/dev_ioctl.c:327 dev_ioctl+0x4c8/0xc8c net/core/dev_ioctl.c:588 sock_do_ioctl+0x18c/0x240 net/socket.c:1218 sock_ioctl+0x5c4/0x840 net/socket.c:1321 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 The buggy address belongs to the object at ffff0000cb7d5000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 50 bytes inside of 512-byte region [ffff0000cb7d5000, ffff0000cb7d5200) The buggy address belongs to the physical page: page:00000000ac74ec10 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000cb7d4000 pfn:0x10b7d4 head:00000000ac74ec10 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc000324f408 fffffc0003573f08 ffff0000c0002600 raw: ffff0000cb7d4000 0000000000100003 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cb7d4f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000cb7d4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000cb7d5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000cb7d5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000cb7d5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ ODEBUG: assert_init not available (active state 0) object type: timer_list hint: __ll_sc_atomic_fetch_sub_release arch/arm64/include/asm/atomic_ll_sc.h:-1 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: arch_atomic_fetch_sub_release arch/arm64/include/asm/atomic.h:51 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:177 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: __refcount_sub_and_test include/linux/refcount.h:272 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: __refcount_dec_and_test include/linux/refcount.h:315 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: refcount_dec_and_test include/linux/refcount.h:333 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: ax25_cb_put include/net/ax25.h:282 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: rose_link_up net/rose/rose_link.c:131 [inline] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: rose_t0timer_expiry+0x0/0x344 net/rose/rose_link.c:271 WARNING: CPU: 1 PID: 6603 at lib/debugobjects.c:518 debug_print_object+0x148/0x1d4 lib/debugobjects.c:515 Modules linked in: CPU: 1 PID: 6603 Comm: syz.3.681 Tainted: G B 6.1.140-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : debug_print_object+0x148/0x1d4 lib/debugobjects.c:515 lr : debug_print_object+0x148/0x1d4 lib/debugobjects.c:515 sp : ffff800023e97620 x29: ffff800023e97620 x28: dfff800000000000 x27: 0000000000000002 x26: ffff800015070000 x25: ffff8000083ad894 x24: dfff800000000000 x23: 0000000000000000 x22: ffff800010a98630 x21: ffff800011f69f40 x20: ffff800011a9ad20 x19: ffff800011f69a80 x18: ffff800011a7bd00 x17: 0000000000000040 x16: ffff800008042940 x15: 0000000000000000 x14: 0000000000000040 x13: a29bf434c13f4600 x12: 0000000000080000 x11: 000000000002c82a x10: ffff800025aba000 x9 : a29bf434c13f4600 x8 : a29bf434c13f4600 x7 : 0000000000000000 x6 : ffff8000119ebf6c x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : ffff800023e97280 x1 : 0000000000000000 x0 : ffff8000119ecb80 Call trace: debug_print_object+0x148/0x1d4 lib/debugobjects.c:515 debug_object_assert_init+0x250/0x2c8 lib/debugobjects.c:900 debug_timer_assert_init kernel/time/timer.c:792 [inline] debug_assert_init kernel/time/timer.c:837 [inline] timer_delete+0x48/0x1e8 kernel/time/timer.c:1277 del_timer include/linux/timer.h:211 [inline] rose_start_t0timer net/rose/rose_link.c:46 [inline] rose_transmit_link+0x43c/0x66c net/rose/rose_link.c:286 rose_write_internal+0xeec/0x17c0 net/rose/rose_subr.c:198 rose_release+0x224/0x518 net/rose/af_rose.c:671 __sock_release net/socket.c:654 [inline] sock_close+0xb4/0x1f8 net/socket.c:1400 __fput+0x1bc/0x7c0 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x1ec/0x270 kernel/task_work.c:203 get_signal+0x1120/0x1310 kernel/signal.c:2648 do_signal arch/arm64/kernel/signal.c:1081 [inline] do_notify_resume+0x340/0x2b0c arch/arm64/kernel/signal.c:1134 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x138 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 irq event stamp: 993 hardirqs last enabled at (993): [] call_rcu+0x590/0x948 kernel/rcu/tree.c:2880 hardirqs last disabled at (992): [] call_rcu+0x5dc/0x948 kernel/rcu/tree.c:2846 softirqs last enabled at (556): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (556): [] lock_sock_nested+0xe0/0x130 net/core/sock.c:3495 softirqs last disabled at (554): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (554): [] lock_sock_nested+0x88/0x130 net/core/sock.c:3491 ---[ end trace 0000000000000000 ]---