================================================================== BUG: KASAN: use-after-free in ax25_heartbeat_expiry+0x10c/0x130 net/ax25/ax25_timer.c:125 Read of size 4 at addr ffff888023552850 by task udevd/4174 CPU: 1 PID: 4174 Comm: udevd Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 ax25_heartbeat_expiry+0x10c/0x130 net/ax25/ax25_timer.c:125 call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648 expire_timers kernel/time/timer.c:1699 [inline] __run_timers+0x53e/0x800 kernel/time/timer.c:1970 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983 handle_softirqs+0x339/0x830 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 RIP: 0010:unwind_next_frame+0x3ce/0x1d90 arch/x86/kernel/unwind_orc.c:461 Code: b6 04 28 84 c0 0f 85 87 14 00 00 41 c6 06 01 48 c7 c2 e0 91 28 8a 4c 8d 72 04 4c 8d 7a 05 4d 89 f4 49 c1 ec 03 43 0f b6 04 2c <84> c0 48 89 14 24 0f 85 af 13 00 00 4c 89 f8 48 c1 e8 03 42 0f b6 RSP: 0018:ffffc90002e5f5c8 EFLAGS: 00000a06 RAX: 0000000000000000 RBX: ffffc90002e5f688 RCX: ffffffff8dfa1d78 RDX: ffffffff8e96a02e RSI: ffffffff8e96a016 RDI: ffffffff81350d2c RBP: ffffffff89bc315b R08: 000000000000000b R09: 0000000000000008 R10: dffffc0000000000 R11: fffff520005cbedd R12: 1ffffffff1d2d406 R13: dffffc0000000000 R14: ffffffff8e96a032 R15: ffffffff8e96a033 arch_stack_walk+0x10c/0x140 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0xa6/0xf0 kernel/stacktrace.c:122 save_stack+0x121/0x230 mm/page_owner.c:119 __set_page_owner+0x41/0x2d0 mm/page_owner.c:181 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1bbd/0x1ca0 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x80a/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc+0x195/0x290 mm/slub.c:3238 getname_flags+0xb5/0x500 fs/namei.c:138 user_path_at_empty+0x2a/0x190 fs/namei.c:2890 user_path_at include/linux/namei.h:57 [inline] inotify_find_inode fs/notify/inotify/inotify_user.c:370 [inline] __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:769 [inline] __se_sys_inotify_add_watch+0x196/0xeb0 fs/notify/inotify/inotify_user.c:722 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fa7f6d839a7 Code: f0 ff ff 73 01 c3 48 8b 0d 4e f4 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 fe 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 21 f4 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffc26277788 EFLAGS: 00000206 ORIG_RAX: 00000000000000fe RAX: ffffffffffffffda RBX: 00005650b0148a00 RCX: 00007fa7f6d839a7 RDX: 0000000000000008 RSI: 00005650b01364a0 RDI: 0000000000000007 RBP: 00005650b0129910 R08: 00000000000001d0 R09: 0000000000000003 R10: 0000000000000000 R11: 0000000000000206 R12: 00005650b0148a00 R13: 00005650b0141410 R14: 0000000000000008 R15: 00005650b0148a00 Allocated by task 4571: 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+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] ax25_dev_device_up+0x50/0x580 net/ax25/ax25_dev.c:55 ax25_device_event+0x483/0x4f0 net/ax25/af_ax25.c:139 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2074 [inline] call_netdevice_notifiers net/core/dev.c:2088 [inline] __dev_notify_flags+0x194/0x300 net/core/dev.c:8917 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8955 dev_ifsioc+0x130/0xd50 net/core/dev_ioctl.c:324 dev_ioctl+0x545/0xe30 net/core/dev_ioctl.c:572 sock_do_ioctl+0x245/0x320 net/socket.c:1161 sock_ioctl+0x4d2/0x710 net/socket.c:1266 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 4631: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xea/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 ax25_dev_put include/net/ax25.h:302 [inline] ax25_release+0x661/0x870 net/ax25/af_ax25.c:1062 __sock_release net/socket.c:651 [inline] sock_close+0xd5/0x240 net/socket.c:1345 __fput+0x234/0x930 fs/file_table.c:311 task_work_run+0x125/0x1a0 kernel/task_work.c:188 get_signal+0x1222/0x12c0 kernel/signal.c:2672 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888023552800 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 80 bytes inside of 192-byte region [ffff888023552800, ffff8880235528c0) The buggy address belongs to the page: page:ffffea00008d5480 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23552 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001d44fc0 0000000c00000002 ffff888016c41a00 raw: 0000000000000000 0000000000100010 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 4198, ts 62482491720, free_ts 62482286908 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1bbd/0x1ca0 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_slab_page mm/slub.c:1782 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xb6/0x4b0 mm/slub.c:1980 ___slab_alloc+0x80a/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] __kmalloc_node+0x200/0x3b0 mm/slub.c:4456 kmalloc_array_node include/linux/slab.h:700 [inline] kcalloc_node include/linux/slab.h:705 [inline] memcg_alloc_page_obj_cgroups+0x81/0x120 mm/memcontrol.c:2839 account_slab_page mm/slab.h:424 [inline] allocate_slab mm/slub.c:1933 [inline] new_slab+0x100/0x4b0 mm/slub.c:1980 ___slab_alloc+0x80a/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc+0x195/0x290 mm/slub.c:3238 __d_alloc+0x2a/0x6f0 fs/dcache.c:1749 d_alloc_pseudo+0x19/0x70 fs/dcache.c:1880 alloc_file_pseudo+0xe0/0x200 fs/file_table.c:256 sock_alloc_file+0xb3/0x240 net/socket.c:464 sock_map_fd net/socket.c:488 [inline] __sys_socket+0x11d/0x170 net/socket.c:1597 __do_sys_socket net/socket.c:1602 [inline] __se_sys_socket net/socket.c:1600 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1600 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 __vunmap+0x8b9/0xa50 mm/vmalloc.c:2628 copy_entries_to_user net/ipv4/netfilter/arp_tables.c:712 [inline] get_entries net/ipv4/netfilter/arp_tables.c:866 [inline] do_arpt_get_ctl+0xd53/0x1000 net/ipv4/netfilter/arp_tables.c:1460 nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x1256/0x16a0 net/ipv4/ip_sockglue.c:1797 tcp_getsockopt+0x200/0x25a0 net/ipv4/tcp.c:4322 __sys_getsockopt+0x1b0/0x230 net/socket.c:2256 __do_sys_getsockopt net/socket.c:2271 [inline] __se_sys_getsockopt net/socket.c:2268 [inline] __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2268 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff888023552700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888023552780: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff888023552800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888023552880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888023552900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: b6 04 mov $0x4,%dh 2: 28 84 c0 0f 85 87 14 sub %al,0x1487850f(%rax,%rax,8) 9: 00 00 add %al,(%rax) b: 41 c6 06 01 movb $0x1,(%r14) f: 48 c7 c2 e0 91 28 8a mov $0xffffffff8a2891e0,%rdx 16: 4c 8d 72 04 lea 0x4(%rdx),%r14 1a: 4c 8d 7a 05 lea 0x5(%rdx),%r15 1e: 4d 89 f4 mov %r14,%r12 21: 49 c1 ec 03 shr $0x3,%r12 25: 43 0f b6 04 2c movzbl (%r12,%r13,1),%eax * 2a: 84 c0 test %al,%al <-- trapping instruction 2c: 48 89 14 24 mov %rdx,(%rsp) 30: 0f 85 af 13 00 00 jne 0x13e5 36: 4c 89 f8 mov %r15,%rax 39: 48 c1 e8 03 shr $0x3,%rax 3d: 42 rex.X 3e: 0f .byte 0xf 3f: b6 .byte 0xb6