syzbot


KASAN: use-after-free Read in rose_get_neigh

Status: upstream: reported syz repro on 2025/03/17 15:45
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+a30154b4da062a2cc7b2@syzkaller.appspotmail.com
First crash: 61d, last: 18h55m
Bug presence (1)
Date Name Commit Repro Result
2025/04/08 upstream (ToT) 0af2f6be1b42 C [report] unregister_netdevice: waiting for DEV to become free
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in rose_get_neigh (2) origin:upstream C 58 15h23m 46d 0/3 upstream: reported C repro on 2025/04/01 12:19
linux-5.15 KASAN: use-after-free Read in rose_get_neigh 1 290d 290d 0/3 auto-obsoleted due to no activity on 2024/11/08 20:40
upstream KASAN: slab-use-after-free Read in rose_get_neigh hams C error 656 31m 340d 0/28 upstream: reported C repro on 2024/06/11 06:56

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): bpq0: link becomes ready
==================================================================
BUG: KASAN: use-after-free in rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:692
Read of size 1 at addr ffff88805b547830 by task syz.4.2916/10370

CPU: 1 PID: 10370 Comm: syz.4.2916 Not tainted 6.1.136-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/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/0x220 mm/kasan/report.c:427
 kasan_report+0x10b/0x140 mm/kasan/report.c:531
 rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:692
 rose_connect+0x412/0x1380 net/rose/af_rose.c:816
 __sys_connect_file net/socket.c:2011 [inline]
 __sys_connect+0x389/0x410 net/socket.c:2028
 __do_sys_connect net/socket.c:2038 [inline]
 __se_sys_connect net/socket.c:2035 [inline]
 __x64_sys_connect+0x76/0x80 net/socket.c:2035
 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
RIP: 0033:0x7effbcf8e969
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:00007effbde2f038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 00007effbd1b5fa0 RCX: 00007effbcf8e969
RDX: 000000000000001c RSI: 0000200000000240 RDI: 0000000000000007
RBP: 00007effbd010ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007effbd1b5fa0 R15: 00007ffd74e8f2d8
 </TASK>

Allocated by task 4394:
 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]
 rose_add_node+0x227/0xdb0 net/rose/rose_route.c:85
 rose_rt_ioctl+0xa4c/0xe90 net/rose/rose_route.c:747
 rose_ioctl+0x27a/0x790 net/rose/af_rose.c:1380
 sock_do_ioctl+0xd3/0x2f0 net/socket.c:1204
 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 10366:
 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:1724 [inline]
 slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1750
 slab_free mm/slub.c:3661 [inline]
 __kmem_cache_free+0xb6/0x1f0 mm/slub.c:3674
 rose_rt_device_down+0x3e5/0x430 net/rose/rose_route.c:522
 rose_device_event+0x600/0x690 net/rose/af_rose.c:248
 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:8702
 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

The buggy address belongs to the object at ffff88805b547800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 48 bytes inside of
 512-byte region [ffff88805b547800, ffff88805b547a00)

The buggy address belongs to the physical page:
page:ffffea00016d5100 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805b545c00 pfn:0x5b544
head:ffffea00016d5100 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001790308 ffffea00016d2208 ffff888017441c80
raw: ffff88805b545c00 0000000000100008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 75, tgid 75 (kworker/u4:4), ts 87489064216, free_ts 83421394441
 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:5606
 alloc_slab_page+0x5d/0x160 mm/slub.c:1794
 allocate_slab mm/slub.c:1939 [inline]
 new_slab+0x87/0x2c0 mm/slub.c:1992
 ___slab_alloc+0xbc6/0x1220 mm/slub.c:3180
 __slab_alloc mm/slub.c:3279 [inline]
 slab_alloc_node mm/slub.c:3364 [inline]
 __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3437
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc_node_track_caller+0x9e/0x230 mm/slab_common.c:956
 kmalloc_reserve net/core/skbuff.c:446 [inline]
 pskb_expand_head+0x1a6/0x12a0 net/core/skbuff.c:1848
 netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1293
 netlink_broadcast+0x75/0x10f0 net/netlink/af_netlink.c:1487
 sta_info_insert_finish net/mac80211/sta_info.c:885 [inline]
 sta_info_insert_rcu+0x1008/0x1550 net/mac80211/sta_info.c:933
 ieee80211_ibss_finish_sta+0x27f/0x350 net/mac80211/ibss.c:585
 ieee80211_update_sta_info net/mac80211/ibss.c:1027 [inline]
 ieee80211_rx_bss_info net/mac80211/ibss.c:1118 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x1432/0x2b10 net/mac80211/ibss.c:1638
 ieee80211_iface_process_skb net/mac80211/iface.c:1671 [inline]
 ieee80211_iface_work+0x726/0xc80 net/mac80211/iface.c:1725
 process_one_work+0x898/0x1160 kernel/workqueue.c:2292
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
 kasan_depopulate_vmalloc_pte+0x67/0x80 mm/kasan/shadow.c:375
 apply_to_pte_range mm/memory.c:2662 [inline]
 apply_to_pmd_range mm/memory.c:2706 [inline]
 apply_to_pud_range mm/memory.c:2742 [inline]
 apply_to_p4d_range mm/memory.c:2778 [inline]
 __apply_to_page_range+0x962/0xc80 mm/memory.c:2814
 kasan_release_vmalloc+0x93/0xb0 mm/kasan/shadow.c:492
 __purge_vmap_area_lazy+0xdb0/0x1900 mm/vmalloc.c:1774
 drain_vmap_area_work+0x3c/0xd0 mm/vmalloc.c:1803
 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

Memory state around the buggy address:
 ffff88805b547700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88805b547780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88805b547800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                     ^
 ffff88805b547880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805b547900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (54):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/05 01:18 linux-6.1.y b6736e03756f b0714e37 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/28 15:11 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/27 06:37 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/06 22:24 linux-6.1.y 8e60a714ba3b 1c65791e .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/01 12:08 linux-6.1.y 8e60a714ba3b 36d76a97 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/05/17 02:56 linux-6.1.y 02b72ccb5f9d f41472b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/08 04:31 linux-6.1.y ac7079a42ea5 dbf35fa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/08 02:37 linux-6.1.y ac7079a42ea5 dbf35fa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/07 22:50 linux-6.1.y ac7079a42ea5 dbf35fa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/04 22:32 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/04 22:31 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/03 04:35 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/03 04:35 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/03 04:35 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/30 14:37 linux-6.1.y 535ec20c5027 85a5a23f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/30 14:36 linux-6.1.y 535ec20c5027 85a5a23f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/30 04:20 linux-6.1.y 535ec20c5027 85a5a23f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/30 04:19 linux-6.1.y 535ec20c5027 85a5a23f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/28 14:40 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/28 14:40 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/28 14:33 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/28 14:33 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/27 21:17 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/27 06:06 linux-6.1.y 535ec20c5027 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/23 23:55 linux-6.1.y 420102835862 73a168d0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/23 23:55 linux-6.1.y 420102835862 73a168d0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/23 03:21 linux-6.1.y 420102835862 53a8b9bd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/16 19:44 linux-6.1.y 420102835862 a95239b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/16 19:44 linux-6.1.y 420102835862 a95239b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/09 00:13 linux-6.1.y 3dfebb87d7eb a775275d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/07 20:09 linux-6.1.y 3dfebb87d7eb a2ada0e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/06 16:25 linux-6.1.y 8e60a714ba3b 1c65791e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/01 13:36 linux-6.1.y 8e60a714ba3b 36d76a97 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/04/01 13:36 linux-6.1.y 8e60a714ba3b 36d76a97 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in rose_get_neigh
2025/05/14 09:39 linux-6.1.y 02b72ccb5f9d 7344edeb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/05/14 08:09 linux-6.1.y 02b72ccb5f9d 7344edeb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/05/03 20:31 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/05/03 16:28 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/05/03 13:54 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/05/03 12:28 linux-6.1.y b6736e03756f b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/05/02 05:41 linux-6.1.y 535ec20c5027 51b137cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/05/02 05:28 linux-6.1.y 535ec20c5027 51b137cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/04/29 03:04 linux-6.1.y 535ec20c5027 aeb6ec69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/04/16 18:20 linux-6.1.y 420102835862 a95239b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/04/04 07:13 linux-6.1.y 8e60a714ba3b d7ae3a11 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/04/01 11:22 linux-6.1.y 8e60a714ba3b 36d76a97 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/03/17 17:21 linux-6.1.y 344a09659766 948c34e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
2025/03/17 15:45 linux-6.1.y 344a09659766 948c34e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in rose_get_neigh
* Struck through repros no longer work on HEAD.