syzbot


KASAN: use-after-free Read in ax25_find_cb

Status: upstream: reported syz repro on 2025/11/09 13:50
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+3697ea2bf224eb4637cd@syzkaller.appspotmail.com
First crash: 21d, last: 21d
Bug presence (1)
Date Name Commit Repro Result
2025/11/14 upstream (ToT) de90cc610eb6 syz [report] WARNING: ODEBUG bug in handle_softirqs
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_find_cb 19 3 100d 130d 0/3 auto-obsoleted due to no activity on 2025/11/30 02:07
upstream KASAN: slab-use-after-free Read in ax25_find_cb hams 19 1 38d 38d 0/29 upstream: reported on 2025/10/23 12:13

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ax25_find_cb+0x175/0x3a0 net/ax25/af_ax25.c:236
Read of size 8 at addr ffff88802fe5f410 by task syz.1.111/4853

CPU: 1 PID: 4853 Comm: syz.1.111 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 ax25_find_cb+0x175/0x3a0 net/ax25/af_ax25.c:236
 rose_link_up net/rose/rose_link.c:129 [inline]
 rose_transmit_link+0x169/0x730 net/rose/rose_link.c:271
 rose_write_internal+0x1096/0x1eb0 net/rose/rose_subr.c:198
 rose_release+0x20f/0x4c0 net/rose/af_rose.c:671
 __sock_release net/socket.c:654 [inline]
 sock_close+0xd5/0x240 net/socket.c:1400
 __fput+0x22c/0x920 fs/file_table.c:320
 task_work_run+0x1ca/0x250 kernel/task_work.c:203
 get_signal+0x11a6/0x1350 kernel/signal.c:2648
 arch_do_signal_or_restart+0xb7/0x1240 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1abb38f6c9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1abc2cf038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: fffffffffffffe00 RBX: 00007f1abb5e6090 RCX: 00007f1abb38f6c9
RDX: 0000000000000040 RSI: 0000200000000100 RDI: 000000000000000a
RBP: 00007f1abb411f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1abb5e6128 R14: 00007f1abb5e6090 R15: 00007ffea04c3218
 </TASK>

Allocated by task 4764:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383
 kmalloc include/linux/slab.h:563 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 ax25_dev_device_up+0x50/0x5f0 net/ax25/ax25_dev.c:57
 ax25_device_event+0x117/0x600 net/ax25/af_ax25.c:143
 notifier_call_chain kernel/notifier.c:87 [inline]
 raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
 call_netdevice_notifiers net/core/dev.c:2053 [inline]
 __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8714
 dev_ifsioc+0x159/0xe90 net/core/dev_ioctl.c:327
 dev_ioctl+0x578/0xea0 net/core/dev_ioctl.c:588
 sock_do_ioctl+0x222/0x2f0 net/socket.c:1218
 sock_ioctl+0x4ed/0x6e0 net/socket.c:1321
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 4388:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755
 slab_free mm/slub.c:3687 [inline]
 kmem_cache_free_bulk+0x348/0x460 mm/slub.c:3805
 kfree_bulk include/linux/slab.h:475 [inline]
 kfree_rcu_work+0x33f/0x890 kernel/rcu/tree.c:3091
 process_one_work+0x898/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
 kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405
 ax25_device_event+0x555/0x600 net/ax25/af_ax25.c:148
 notifier_call_chain kernel/notifier.c:87 [inline]
 raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
 call_netdevice_notifiers net/core/dev.c:2053 [inline]
 __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8714
 dev_ifsioc+0x159/0xe90 net/core/dev_ioctl.c:327
 dev_ioctl+0x578/0xea0 net/core/dev_ioctl.c:588
 sock_do_ioctl+0x222/0x2f0 net/socket.c:1218
 sock_ioctl+0x4ed/0x6e0 net/socket.c:1321
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Second to last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
 call_rcu+0x154/0x980 kernel/rcu/tree.c:2849
 fib_create_info+0x1871/0x2490 net/ipv4/fib_semantics.c:1591
 fib_table_insert+0xc3/0x1b50 net/ipv4/fib_trie.c:1217
 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1118
 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1140
 fib_netdev_event+0x361/0x470 net/ipv4/fib_frontend.c:1500
 notifier_call_chain kernel/notifier.c:87 [inline]
 raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
 call_netdevice_notifiers net/core/dev.c:2053 [inline]
 __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8714
 do_setlink+0xc31/0x3c40 net/core/rtnetlink.c:2833
 __rtnl_newlink net/core/rtnetlink.c:3608 [inline]
 rtnl_newlink+0x17d6/0x1ff0 net/core/rtnetlink.c:3655
 rtnetlink_rcv_msg+0x79b/0xed0 net/core/rtnetlink.c:6150
 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2511
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1872
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 __sys_sendto+0x44f/0x5c0 net/socket.c:2153
 __do_sys_sendto net/socket.c:2165 [inline]
 __se_sys_sendto net/socket.c:2161 [inline]
 __x64_sys_sendto+0xda/0xf0 net/socket.c:2161
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff88802fe5f400
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 16 bytes inside of
 256-byte region [ffff88802fe5f400, ffff88802fe5f500)

The buggy address belongs to the physical page:
page:ffffea0000bf9780 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2fe5e
head:ffffea0000bf9780 order:1 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001f82f00 dead000000000005 ffff888017441b40
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4390, tgid 4390 (syz-executor), ts 91386382630, free_ts 76310022183
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
 prep_new_page mm/page_alloc.c:2539 [inline]
 get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
 alloc_slab_page+0x5d/0x160 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2c0 mm/slub.c:1997
 ___slab_alloc+0xbc6/0x1230 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc+0xa0/0x240 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 fib_create_info+0xa53/0x2490 net/ipv4/fib_semantics.c:1459
 fib_table_insert+0xc3/0x1b50 net/ipv4/fib_trie.c:1217
 fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1118
 fib_add_ifaddr+0x140/0x5e0 net/ipv4/fib_frontend.c:1140
 fib_netdev_event+0x361/0x470 net/ipv4/fib_frontend.c:1500
 notifier_call_chain kernel/notifier.c:87 [inline]
 raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
 call_netdevice_notifiers net/core/dev.c:2053 [inline]
 __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8714
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1459 [inline]
 free_pcp_prepare mm/page_alloc.c:1509 [inline]
 free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 slab_alloc mm/slub.c:3367 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3374 [inline]
 kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3383
 kmem_cache_zalloc include/linux/slab.h:689 [inline]
 journal_alloc_journal_head fs/jbd2/journal.c:2876 [inline]
 jbd2_journal_add_journal_head+0x91/0x4c0 fs/jbd2/journal.c:2945
 jbd2_journal_get_create_access+0x49/0x440 fs/jbd2/transaction.c:1279
 __ext4_journal_get_create_access+0xa2/0x550 fs/ext4/ext4_jbd2.c:330
 ext4_getblk+0x45d/0x6d0 fs/ext4/inode.c:917
 ext4_bread+0x26/0x170 fs/ext4/inode.c:946
 ext4_append+0x2c3/0x560 fs/ext4/namei.c:83
 ext4_init_new_dir+0x2b8/0x570 fs/ext4/namei.c:3030
 ext4_mkdir+0x47d/0xc50 fs/ext4/namei.c:3076
 vfs_mkdir+0x387/0x570 fs/namei.c:4114

Memory state around the buggy address:
 ffff88802fe5f300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88802fe5f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88802fe5f400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                         ^
 ffff88802fe5f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88802fe5f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/09 13:50 linux-6.1.y f6e38ae624cf 4e1406b4 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in ax25_find_cb
* Struck through repros no longer work on HEAD.