do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 ================================================================== BUG: KASAN: use-after-free in ax25_unregister_dev_sysctl+0x3c/0xa0 net/ax25/sysctl_net_ax25.c:172 Read of size 8 at addr ffff0000db31d218 by task syz.8.844/8347 CPU: 0 PID: 8347 Comm: syz.8.844 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x78/0x30c mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xec/0x15c mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 ax25_unregister_dev_sysctl+0x3c/0xa0 net/ax25/sysctl_net_ax25.c:172 ax25_dev_device_down+0x58/0x67c net/ax25/ax25_dev.c:101 ax25_device_event+0x538/0x590 net/ax25/af_ax25.c:144 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] __dev_notify_flags+0x250/0x46c net/core/dev.c:-1 dev_change_flags+0xc8/0x154 net/core/dev.c:8929 dev_ifsioc+0x504/0xef4 net/core/dev_ioctl.c:324 dev_ioctl+0x4d0/0xc94 net/core/dev_ioctl.c:587 sock_do_ioctl+0x18c/0x240 net/socket.c:1154 sock_ioctl+0x5c8/0x87c net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Allocated by task 4911: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb0/0xf0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x274/0x3fc mm/slub.c:3247 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:735 [inline] ax25_dev_device_up+0x5c/0x540 net/ax25/ax25_dev.c:55 ax25_device_event+0x504/0x590 net/ax25/af_ax25.c:139 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] __dev_notify_flags+0x250/0x46c net/core/dev.c:-1 dev_change_flags+0xc8/0x154 net/core/dev.c:8929 dev_ifsioc+0x504/0xef4 net/core/dev_ioctl.c:324 dev_ioctl+0x4d0/0xc94 net/core/dev_ioctl.c:587 sock_do_ioctl+0x18c/0x240 net/socket.c:1154 sock_ioctl+0x5c8/0x87c net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Freed by task 8334: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0x128/0x1e8 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0x170/0x40c mm/slub.c:4559 ax25_dev_put include/net/ax25.h:302 [inline] ax25_release+0x564/0x814 net/ax25/af_ax25.c:1062 __sock_release net/socket.c:649 [inline] sock_close+0xb4/0x1f8 net/socket.c:1336 __fput+0x1c0/0x7f8 fs/file_table.c:311 ____fput+0x20/0x30 fs/file_table.c:339 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] do_notify_resume+0x24b4/0x3128 arch/arm64/kernel/signal.c:949 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xcc/0x114 mm/kasan/generic.c:348 insert_work+0x64/0x388 kernel/workqueue.c:1366 __queue_work+0xb30/0x1054 kernel/workqueue.c:1532 queue_work_on+0xc4/0x17c kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] addr_event+0x2f8/0x3f0 drivers/infiniband/core/roce_gid_mgmt.c:853 inet6addr_event+0xa4/0xd8 drivers/infiniband/core/roce_gid_mgmt.c:883 notifier_call_chain kernel/notifier.c:83 [inline] atomic_notifier_call_chain+0x174/0x2a0 kernel/notifier.c:198 inet6addr_notifier_call_chain+0x30/0x40 net/ipv6/addrconf_core.c:109 ipv6_add_addr+0x8ec/0xb6c net/ipv6/addrconf.c:1182 addrconf_add_linklocal+0x224/0x5dc net/ipv6/addrconf.c:3239 addrconf_addr_gen+0x3ac/0x4bc net/ipv6/addrconf.c:3370 addrconf_init_auto_addrs+0x598/0x928 net/ipv6/addrconf.c:-1 addrconf_notify+0x884/0xc6c net/ipv6/addrconf.c:3663 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] netdev_state_change+0x150/0x1fc net/core/dev.c:1440 linkwatch_do_dev+0x2b0/0x3c8 net/core/link_watch.c:167 __linkwatch_run_queue+0x3d4/0x674 net/core/link_watch.c:213 linkwatch_event+0x58/0x68 net/core/link_watch.c:252 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:855 Second to last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xcc/0x114 mm/kasan/generic.c:348 insert_work+0x64/0x388 kernel/workqueue.c:1366 __queue_work+0xb30/0x1054 kernel/workqueue.c:1532 queue_work_on+0xc4/0x17c kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x6ac/0x79c drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers+0x10c/0x18c net/core/dev.c:2075 register_netdevice+0xf04/0x1304 net/core/dev.c:10428 batadv_softif_newlink+0x90/0xa0 net/batman-adv/soft-interface.c:1074 __rtnl_newlink net/core/rtnetlink.c:3524 [inline] rtnl_newlink+0xeac/0x1404 net/core/rtnetlink.c:3572 rtnetlink_rcv_msg+0x9d4/0xd04 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x208/0x3c4 net/netlink/af_netlink.c:2507 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5668 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x624/0x8b0 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6e8/0x9cc net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x2e8/0x3d8 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2071 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 The buggy address belongs to the object at ffff0000db31d200 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 24 bytes inside of 256-byte region [ffff0000db31d200, ffff0000db31d300) The buggy address belongs to the page: page:00000000113a3c81 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11b31c head:00000000113a3c81 order:1 compound_mapcount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc00030be100 0000000200000002 ffff0000c0002480 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000db31d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000db31d180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000db31d200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000db31d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000db31d300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ ODEBUG: assert_init not available (active state 0) object type: timer_list hint: ax25_ds_timeout+0x0/0x2d4 net/ax25/ax25_ds_timer.c:42 WARNING: CPU: 1 PID: 8347 at lib/debugobjects.c:521 debug_print_object+0x148/0x1d4 lib/debugobjects.c:518 Modules linked in: CPU: 1 PID: 8347 Comm: syz.8.844 Tainted: G B 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : debug_print_object+0x148/0x1d4 lib/debugobjects.c:518 lr : debug_print_object+0x148/0x1d4 lib/debugobjects.c:518 sp : ffff80001f917560 x29: ffff80001f917560 x28: ffff8000163d4b00 x27: 0000000000000001 x26: ffff800014170000 x25: ffff80000837e25c x24: dfff800000000000 x23: 0000000000000000 x22: ffff8000104687c0 x21: ffff8000117c8f60 x20: ffff800011332ce0 x19: ffff8000117c8aa0 x18: 0000000000000202 x17: 0000000000000000 x16: ffff8000083020fc x15: 00000000ffffffff x14: 0000000000ff0100 x13: 0000000000000001 x12: 0000000000ff0100 x11: 0000000000000201 x10: 0000000000000000 x9 : 7447da09987ac300 x8 : 7447da09987ac300 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80001f916e58 x4 : ffff80001424f400 x3 : ffff80000830220c x2 : 0000000000000001 x1 : 0000000000000201 x0 : 000000000000006a Call trace: debug_print_object+0x148/0x1d4 lib/debugobjects.c:518 debug_object_assert_init+0x24c/0x2c4 lib/debugobjects.c:894 debug_timer_assert_init kernel/time/timer.c:739 [inline] debug_assert_init kernel/time/timer.c:784 [inline] del_timer+0x48/0x1e4 kernel/time/timer.c:1224 ax25_ds_del_timer+0x28/0x40 net/ax25/ax25_ds_timer.c:47 ax25_dev_device_down+0x6c/0x67c net/ax25/ax25_dev.c:106 ax25_device_event+0x538/0x590 net/ax25/af_ax25.c:144 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] __dev_notify_flags+0x250/0x46c net/core/dev.c:-1 dev_change_flags+0xc8/0x154 net/core/dev.c:8929 dev_ifsioc+0x504/0xef4 net/core/dev_ioctl.c:324 dev_ioctl+0x4d0/0xc94 net/core/dev_ioctl.c:587 sock_do_ioctl+0x18c/0x240 net/socket.c:1154 sock_ioctl+0x5c8/0x87c net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 irq event stamp: 1318 hardirqs last enabled at (1317): [] __local_bh_enable_ip+0x1f8/0x380 kernel/softirq.c:406 hardirqs last disabled at (1318): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (1318): [] _raw_spin_lock_irqsave+0xfc/0x14c kernel/locking/spinlock.c:162 softirqs last enabled at (1316): [] ax25_rt_device_down+0x148/0x164 net/ax25/ax25_route.c:69 softirqs last disabled at (1314): [] ax25_rt_device_down+0x30/0x164 net/ax25/ax25_route.c:46 ---[ end trace 277a375255ef674a ]--- ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 8347 at lib/refcount.c:28 refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 Modules linked in: CPU: 0 PID: 8347 Comm: syz.8.844 Tainted: G B W 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 lr : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 sp : ffff80001f917690 x29: ffff80001f917690 x28: ffff8000163d4b00 x27: 1fffe0001cddb6c2 x26: ffff80001b1e4000 x25: 1fffe0001a1e6c6d x24: dfff800000000000 x23: 0000000000000000 x22: ffff0000db31d2b8 x21: ffff0000d0f36000 x20: ffff0000db31d2b8 x19: ffff8000165b2000 x18: 0000000000000002 x17: 0000000040000000 x16: ffff8000111bc798 x15: 0000000000000002 x14: 0000000000ff0100 x13: ffffffffffffffff x12: 0000000000ff0100 x11: 0000000000000000 x10: 0000000000000000 x9 : 7447da09987ac300 x8 : 7447da09987ac300 x7 : 0000000000000000 x6 : ffff80000824599c x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff80000a723764 x2 : ffff0001a10c5d50 x1 : 0000000100000000 x0 : 0000000000000026 Call trace: refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] ax25_dev_put include/net/ax25.h:301 [inline] ax25_dev_device_down+0x4d4/0x67c net/ax25/ax25_dev.c:119 ax25_device_event+0x538/0x590 net/ax25/af_ax25.c:144 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] __dev_notify_flags+0x250/0x46c net/core/dev.c:-1 dev_change_flags+0xc8/0x154 net/core/dev.c:8929 dev_ifsioc+0x504/0xef4 net/core/dev_ioctl.c:324 dev_ioctl+0x4d0/0xc94 net/core/dev_ioctl.c:587 sock_do_ioctl+0x18c/0x240 net/socket.c:1154 sock_ioctl+0x5c8/0x87c net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 irq event stamp: 1318 hardirqs last enabled at (1317): [] __local_bh_enable_ip+0x1f8/0x380 kernel/softirq.c:406 hardirqs last disabled at (1318): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (1318): [] _raw_spin_lock_irqsave+0xfc/0x14c kernel/locking/spinlock.c:162 softirqs last enabled at (1316): [] ax25_rt_device_down+0x148/0x164 net/ax25/ax25_route.c:69 softirqs last disabled at (1314): [] ax25_rt_device_down+0x30/0x164 net/ax25/ax25_route.c:46 ---[ end trace 277a375255ef674b ]---