syzbot


KASAN: use-after-free Read in ax25_heartbeat_expiry (2)

Status: upstream: reported on 2026/01/27 17:12
Reported-by: syzbot+ee5c912f8e69215b5297@syzkaller.appspotmail.com
First crash: 1d07h, last: 1d07h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in ax25_heartbeat_expiry 19 5 190d 341d 0/3 auto-obsoleted due to no activity on 2025/10/31 01:02
linux-6.1 KASAN: use-after-free Read in ax25_heartbeat_expiry 19 1 82d 82d 0/3 upstream: reported on 2025/11/07 08:58

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ax25_heartbeat_expiry+0x10c/0x130 net/ax25/ax25_timer.c:125
Read of size 4 at addr ffff88802aab4850 by task syz.4.808/7166

CPU: 0 PID: 7166 Comm: syz.4.808 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <IRQ>
 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:1451
 expire_timers kernel/time/timer.c:1496 [inline]
 __run_timers+0x53a/0x7f0 kernel/time/timer.c:1767
 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
 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
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:__sanitizer_cov_trace_cmp8+0x7a/0x80 kernel/kcov.c:274
Code: c1 e0 05 4d 8d 50 28 4d 39 ca 77 1e 4a c7 44 02 08 06 00 00 00 4a 89 7c 02 10 4a 89 74 02 18 4a 89 44 02 20 48 ff c1 48 89 0a <c3> 0f 1f 44 00 00 48 8b 04 24 65 48 8b 0d b4 4d 89 7e 65 8b 15 b5
RSP: 0018:ffffc900033ff9b0 EFLAGS: 00000297
RAX: ffffffff81c6be4b RBX: 0000000000000001 RCX: ffff8880285ad940
RDX: 0000000000000002 RSI: ffffffff81000000 RDI: ffff888074614952
RBP: ffffea0001d18400 R08: 0000000000000001 R09: 0000000000000951
R10: dffffc0000000000 R11: fffff940003a3081 R12: ffffffff81000000
R13: 0000000000000000 R14: ffff888074614951 R15: ffff888074614952
 __check_object_size+0x27b/0x410 mm/usercopy.c:-1
 check_object_size include/linux/thread_info.h:199 [inline]
 check_copy_size include/linux/thread_info.h:232 [inline]
 copy_from_user include/linux/uaccess.h:191 [inline]
 snd_rawmidi_kernel_write1+0x345/0x590 sound/core/rawmidi.c:1486
 snd_rawmidi_write+0x5c2/0xc10 sound/core/rawmidi.c:1555
 do_loop_readv_writev fs/read_write.c:-1 [inline]
 do_iter_write+0x3e4/0x7b0 fs/read_write.c:857
 vfs_writev fs/read_write.c:928 [inline]
 do_writev+0x281/0x480 fs/read_write.c:971
 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:0x7fd17df24eb9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd17c180028 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007fd17e19ffa0 RCX: 00007fd17df24eb9
RDX: 0000000000000002 RSI: 0000200000000840 RDI: 0000000000000005
RBP: 00007fd17df92c1f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd17e1a0038 R14: 00007fd17e19ffa0 R15: 00007fff465161b8
 </TASK>

Allocated by task 7122:
 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:2061 [inline]
 call_netdevice_notifiers net/core/dev.c:2075 [inline]
 __dev_notify_flags+0x194/0x300 net/core/dev.c:8891
 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
 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 7160:
 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
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
 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

Last potentially related work creation:
 kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
 insert_work+0x54/0x3d0 kernel/workqueue.c:1366
 __queue_work+0x9c5/0xd50 kernel/workqueue.c:1532
 queue_work_on+0x124/0x1f0 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+0x803/0x900 drivers/infiniband/core/roce_gid_mgmt.c:802
 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:2061 [inline]
 call_netdevice_notifiers net/core/dev.c:2075 [inline]
 __dev_notify_flags+0x194/0x300 net/core/dev.c:8891
 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
 do_setlink+0xcdb/0x3d60 net/core/rtnetlink.c:2781
 __rtnl_newlink net/core/rtnetlink.c:3452 [inline]
 rtnl_newlink+0x1658/0x1a50 net/core/rtnetlink.c:3574
 rtnetlink_rcv_msg+0x844/0xf30 net/core/rtnetlink.c:5684
 netlink_rcv_skb+0x1f5/0x440 net/netlink/af_netlink.c:2507
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:706 [inline]
 __sock_sendmsg net/socket.c:718 [inline]
 __sys_sendto+0x46d/0x620 net/socket.c:2072
 __do_sys_sendto net/socket.c:2084 [inline]
 __se_sys_sendto net/socket.c:2080 [inline]
 __x64_sys_sendto+0xda/0xf0 net/socket.c:2080
 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

Second to last potentially related work creation:
 kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
 insert_work+0x54/0x3d0 kernel/workqueue.c:1366
 __queue_work+0x9c5/0xd50 kernel/workqueue.c:1532
 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1559
 queue_work include/linux/workqueue.h:512 [inline]
 call_usermodehelper_exec+0x2e3/0x520 kernel/umh.c:435
 kobject_uevent_env+0x681/0x890 lib/kobject_uevent.c:633
 device_add+0x91c/0xfb0 drivers/base/core.c:3393
 iscsi_register_transport+0x284/0x5a0 drivers/scsi/scsi_transport_iscsi.c:4906
 iser_init+0xec/0x190 drivers/infiniband/ulp/iser/iscsi_iser.c:1062
 do_one_initcall+0x272/0x730 init/main.c:1316
 do_initcall_level+0x137/0x1f0 init/main.c:1389
 do_initcalls+0x4b/0x90 init/main.c:1405
 kernel_init_freeable+0x3e9/0x570 init/main.c:1629
 kernel_init+0x19/0x1b0 init/main.c:1520
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

The buggy address belongs to the object at ffff88802aab4800
 which belongs to the cache kmalloc-192 of size 192
The buggy address is located 80 bytes inside of
 192-byte region [ffff88802aab4800, ffff88802aab48c0)
The buggy address belongs to the page:
page:ffffea0000aaad00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2aab4
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0001c88040 0000000800000005 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 24157440681, free_ts 0
 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:5487
 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031
 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_trace+0x1a5/0x2a0 mm/slub.c:3250
 kmalloc include/linux/slab.h:607 [inline]
 kzalloc include/linux/slab.h:738 [inline]
 call_usermodehelper_setup+0x8a/0x260 kernel/umh.c:365
 kobject_uevent_env+0x65e/0x890 lib/kobject_uevent.c:629
 kset_register+0x188/0x1f0 lib/kobject.c:894
 bus_register+0x21c/0x6c0 drivers/base/bus.c:808
 memstick_init+0x3c/0xb0 drivers/memstick/core/memstick.c:634
 do_one_initcall+0x272/0x730 init/main.c:1316
 do_initcall_level+0x137/0x1f0 init/main.c:1389
 do_initcalls+0x4b/0x90 init/main.c:1405
 kernel_init_freeable+0x3e9/0x570 init/main.c:1629
 kernel_init+0x19/0x1b0 init/main.c:1520
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88802aab4700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88802aab4780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff88802aab4800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                 ^
 ffff88802aab4880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffff88802aab4900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
vkms_vblank_simulate: vblank timer overrun
----------------
Code disassembly (best guess):
   0:	c1 e0 05             	shl    $0x5,%eax
   3:	4d 8d 50 28          	lea    0x28(%r8),%r10
   7:	4d 39 ca             	cmp    %r9,%r10
   a:	77 1e                	ja     0x2a
   c:	4a c7 44 02 08 06 00 	movq   $0x6,0x8(%rdx,%r8,1)
  13:	00 00
  15:	4a 89 7c 02 10       	mov    %rdi,0x10(%rdx,%r8,1)
  1a:	4a 89 74 02 18       	mov    %rsi,0x18(%rdx,%r8,1)
  1f:	4a 89 44 02 20       	mov    %rax,0x20(%rdx,%r8,1)
  24:	48 ff c1             	inc    %rcx
  27:	48 89 0a             	mov    %rcx,(%rdx)
* 2a:	c3                   	ret <-- trapping instruction
  2b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  30:	48 8b 04 24          	mov    (%rsp),%rax
  34:	65 48 8b 0d b4 4d 89 	mov    %gs:0x7e894db4(%rip),%rcx        # 0x7e894df0
  3b:	7e
  3c:	65                   	gs
  3d:	8b                   	.byte 0x8b
  3e:	15                   	.byte 0x15
  3f:	b5                   	.byte 0xb5

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/27 17:12 linux-5.15.y 9eec9a14ee10 9a514c2f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ax25_heartbeat_expiry
* Struck through repros no longer work on HEAD.