syzbot


KASAN: slab-use-after-free Read in rds_conn_path_connect_if_down

Status: closed as invalid on 2026/03/30 17:42
Subsystems: rds
[Documentation on labels]
First crash: 142d, last: 98d

Sample crash report:
infiniband syz0: set active
infiniband syz0: added lo
RDS/IB: syz0: added
==================================================================
BUG: KASAN: slab-use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline]
BUG: KASAN: slab-use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
BUG: KASAN: slab-use-after-free in refcount_read include/linux/refcount.h:170 [inline]
BUG: KASAN: slab-use-after-free in __ns_ref_read include/linux/ns_common.h:65 [inline]
BUG: KASAN: slab-use-after-free in check_net include/net/net_namespace.h:309 [inline]
BUG: KASAN: slab-use-after-free in rds_destroy_pending net/rds/rds.h:984 [inline]
BUG: KASAN: slab-use-after-free in rds_conn_path_connect_if_down+0x118/0x3a0 net/rds/connection.c:934
Read of size 4 at addr ffff888029cf0180 by task syz.0.7523/1063

CPU: 0 UID: 0 PID: 1063 Comm: syz.0.7523 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xba/0x230 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 check_region_inline mm/kasan/generic.c:-1 [inline]
 kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200
 instrument_atomic_read include/linux/instrumented.h:68 [inline]
 atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline]
 refcount_read include/linux/refcount.h:170 [inline]
 __ns_ref_read include/linux/ns_common.h:65 [inline]
 check_net include/net/net_namespace.h:309 [inline]
 rds_destroy_pending net/rds/rds.h:984 [inline]
 rds_conn_path_connect_if_down+0x118/0x3a0 net/rds/connection.c:934
 rds_ib_nodev_connect+0x4e/0xa0 net/rds/ib.c:79
 rds_ib_add_one+0x7e0/0xa10 net/rds/ib.c:222
 add_client_context+0x37c/0x7a0 drivers/infiniband/core/device.c:757
 enable_device_and_get+0x19c/0x3e0 drivers/infiniband/core/device.c:1368
 ib_register_device+0x110f/0x13e0 drivers/infiniband/core/device.c:1487
 rxe_register_device+0x1e3/0x350 drivers/infiniband/sw/rxe/rxe_verbs.c:1556
 rxe_net_add+0x81/0x110 drivers/infiniband/sw/rxe/rxe_net.c:618
 rxe_newlink+0xdd/0x190 drivers/infiniband/sw/rxe/rxe.c:234
 nldev_newlink+0x5bd/0x650 drivers/infiniband/core/nldev.c:1797
 rdma_nl_rcv_msg drivers/infiniband/core/netlink.c:-1 [inline]
 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline]
 rdma_nl_rcv+0x6d7/0xa10 drivers/infiniband/core/netlink.c:259
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x80f/0x9b0 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1894
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg net/socket.c:742 [inline]
 ____sys_sendmsg+0xa68/0xad0 net/socket.c:2592
 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2646
 __sys_sendmsg net/socket.c:2678 [inline]
 __do_sys_sendmsg net/socket.c:2683 [inline]
 __se_sys_sendmsg net/socket.c:2681 [inline]
 __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2681
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa7fa59bf79
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:00007fa7fb4b3028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fa7fa815fa0 RCX: 00007fa7fa59bf79
RDX: 000000002400c000 RSI: 00002000000000c0 RDI: 0000000000000003
RBP: 00007fa7fa6327e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa7fa816038 R14: 00007fa7fa815fa0 R15: 00007ffe24085528
 </TASK>

Allocated by task 16492:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 unpoison_slab_object mm/kasan/common.c:340 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4459 [inline]
 slab_alloc_node mm/slub.c:4788 [inline]
 kmem_cache_alloc_noprof+0x2bc/0x650 mm/slub.c:4795
 net_alloc net/core/net_namespace.c:490 [inline]
 copy_net_ns+0x1e3/0x730 net/core/net_namespace.c:565
 create_new_namespaces+0x3e7/0x6a0 kernel/nsproxy.c:130
 unshare_nsproxy_namespaces+0x11a/0x160 kernel/nsproxy.c:226
 ksys_unshare+0x4f4/0x900 kernel/fork.c:3174
 __do_sys_unshare kernel/fork.c:3245 [inline]
 __se_sys_unshare kernel/fork.c:3243 [inline]
 __x64_sys_unshare+0x38/0x50 kernel/fork.c:3243
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 12:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2670 [inline]
 slab_free mm/slub.c:6082 [inline]
 kmem_cache_free+0x180/0x610 mm/slub.c:6212
 net_complete_free net/core/net_namespace.c:526 [inline]
 cleanup_net+0x5cc/0x800 net/core/net_namespace.c:713
 process_one_work kernel/workqueue.c:3275 [inline]
 process_scheduled_works+0xaec/0x17a0 kernel/workqueue.c:3358
 worker_thread+0xa50/0xfc0 kernel/workqueue.c:3439
 kthread+0x388/0x470 kernel/kthread.c:467
 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 insert_work+0x3d/0x330 kernel/workqueue.c:2199
 __queue_work+0xccf/0xf90 kernel/workqueue.c:2354
 call_timer_fn+0x192/0x5a0 kernel/time/timer.c:1748
 expire_timers kernel/time/timer.c:1794 [inline]
 __run_timers kernel/time/timer.c:2373 [inline]
 __run_timer_base+0x67e/0x8b0 kernel/time/timer.c:2385
 run_timer_base kernel/time/timer.c:2394 [inline]
 run_timer_softirq+0x103/0x170 kernel/time/timer.c:2405
 handle_softirqs+0x22a/0x7c0 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 insert_work+0x3d/0x330 kernel/workqueue.c:2199
 __queue_work+0xccf/0xf90 kernel/workqueue.c:2354
 call_timer_fn+0x192/0x5a0 kernel/time/timer.c:1748
 expire_timers kernel/time/timer.c:1794 [inline]
 __run_timers kernel/time/timer.c:2373 [inline]
 __run_timer_base+0x67e/0x8b0 kernel/time/timer.c:2385
 run_timer_base kernel/time/timer.c:2394 [inline]
 run_timer_softirq+0x103/0x170 kernel/time/timer.c:2405
 handle_softirqs+0x22a/0x7c0 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697

The buggy address belongs to the object at ffff888029cf0000
 which belongs to the cache net_namespace of size 9472
The buggy address is located 384 bytes inside of
 freed 9472-byte region [ffff888029cf0000, ffff888029cf2500)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29cf0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88803549a2c1
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff888140410dc0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800030003 00000000f5000000 ffff88803549a2c1
head: 00fff00000000040 ffff888140410dc0 dead000000000100 dead000000000122
head: 0000000000000000 0000000800030003 00000000f5000000 ffff88803549a2c1
head: 00fff00000000003 ffffea0000a73c01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5824, tgid 5824 (syz-executor), ts 71030674021, free_ts 71024896874
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884
 prep_new_page mm/page_alloc.c:1892 [inline]
 get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3950
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5245
 alloc_slab_page mm/slub.c:3238 [inline]
 allocate_slab+0x77/0x660 mm/slub.c:3411
 new_slab mm/slub.c:3469 [inline]
 refill_objects+0x331/0x3c0 mm/slub.c:7091
 refill_sheaf+0x29/0x50 mm/slub.c:2787
 alloc_full_sheaf mm/slub.c:2808 [inline]
 __pcs_replace_empty_main+0x3ef/0x620 mm/slub.c:4546
 alloc_from_pcs mm/slub.c:4639 [inline]
 slab_alloc_node mm/slub.c:4773 [inline]
 kmem_cache_alloc_noprof+0x37d/0x650 mm/slub.c:4795
 net_alloc net/core/net_namespace.c:490 [inline]
 copy_net_ns+0x1e3/0x730 net/core/net_namespace.c:565
 create_new_namespaces+0x3e7/0x6a0 kernel/nsproxy.c:130
 unshare_nsproxy_namespaces+0x11a/0x160 kernel/nsproxy.c:226
 ksys_unshare+0x4f4/0x900 kernel/fork.c:3174
 __do_sys_unshare kernel/fork.c:3245 [inline]
 __se_sys_unshare kernel/fork.c:3243 [inline]
 __x64_sys_unshare+0x38/0x50 kernel/fork.c:3243
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5481 tgid 5481 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1433 [inline]
 __free_frozen_pages+0xbf8/0xd70 mm/page_alloc.c:2973
 skb_kfree_head net/core/skbuff.c:1089 [inline]
 skb_free_head net/core/skbuff.c:1101 [inline]
 skb_release_data+0x6f0/0x940 net/core/skbuff.c:1128
 skb_release_all net/core/skbuff.c:1203 [inline]
 __kfree_skb+0x5d/0x210 net/core/skbuff.c:1217
 netlink_recvmsg+0x5d6/0xa50 net/netlink/af_netlink.c:1972
 sock_recvmsg_nosec net/socket.c:1078 [inline]
 sock_recvmsg+0x22c/0x270 net/socket.c:1100
 ____sys_recvmsg+0x1e6/0x4a0 net/socket.c:2812
 ___sys_recvmsg+0x215/0x590 net/socket.c:2854
 __sys_recvmsg net/socket.c:2887 [inline]
 __do_sys_recvmsg net/socket.c:2893 [inline]
 __se_sys_recvmsg net/socket.c:2890 [inline]
 __x64_sys_recvmsg+0x1ba/0x2a0 net/socket.c:2890
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff888029cf0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888029cf0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888029cf0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff888029cf0200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888029cf0280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/13 10:31 net 8383522821c6 6a673c50 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-use-after-free Read in rds_conn_path_connect_if_down
2026/02/12 23:12 net 37a93dd5c49b 504cb1bf .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-use-after-free Read in rds_conn_path_connect_if_down
2026/01/30 11:05 net ed48a84a72fe bfa73b7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-use-after-free Read in rds_conn_path_connect_if_down
2026/02/18 21:37 net-next 37a93dd5c49b 77d4d919 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in rds_conn_path_connect_if_down
2026/02/17 13:44 net-next 37a93dd5c49b e439b951 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in rds_conn_path_connect_if_down
2026/03/15 08:13 upstream 69237f8c1f69 ee8d34d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: use-after-free Read in rds_conn_path_connect_if_down
* Struck through repros no longer work on HEAD.