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

Status: upstream: reported on 2023/12/13 22:42
Reported-by: syzbot+15a94a0531011bda93cc@syzkaller.appspotmail.com
First crash: 1088d, last: 4d19h
▶ ▼ Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in siw_query_port rdma 19 50 1188d 1303d 0/30 auto-obsoleted due to no activity on 2023/11/13 22:18
linux-6.1 KASAN: use-after-free Read in siw_query_port 19 5 1143d 1220d 0/3 auto-obsoleted due to no activity on 2024/01/27 18:37
linux-5.15 KASAN: use-after-free Read in siw_query_port 19 3 1233d 1260d 0/3 auto-obsoleted due to no activity on 2023/10/29 16:51
linux-6.1 KASAN: use-after-free Read in siw_query_port (2) 19 syz, C inconclusive 461 4d00h 1030d 0/3 upstream: reported C repro on 2024/02/09 22:01
upstream KASAN: slab-use-after-free Read in siw_query_port (2) rdma 19 syz error inconclusive 2 725d 738d 0/30 auto-obsoleted due to no activity on 2025/04/27 10:54

Sample crash report:
bond0 speed is unknown, defaulting to 1000
==================================================================
BUG: KASAN: use-after-free in siw_query_port+0x359/0x450 drivers/infiniband/sw/siw/siw_verbs.c:175
Read of size 4 at addr ffff888077d540d8 by task kworker/0:20/28807

CPU: 0 PID: 28807 Comm: kworker/0:20 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Workqueue: infiniband ib_cache_event_task
Call Trace:
 <TASK>
 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
 siw_query_port+0x359/0x450 drivers/infiniband/sw/siw/siw_verbs.c:175
 ib_cache_update+0x1bd/0x9c0 drivers/infiniband/core/cache.c:1484
 ib_cache_event_task+0xcf/0x1c0 drivers/infiniband/core/cache.c:1558
 process_one_work+0x867/0xff0 kernel/workqueue.c:2310
 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
 kthread+0x42e/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Allocated by task 4284:
 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+0xaf/0xe0 mm/kasan/common.c:522
 kmalloc_node include/linux/slab.h:630 [inline]
 kvmalloc_node+0x84/0x130 mm/util.c:619
 kvmalloc include/linux/mm.h:816 [inline]
 kvzalloc include/linux/mm.h:824 [inline]
 alloc_netdev_mqs+0x84/0xc40 net/core/dev.c:10918
 rtnl_create_link+0x2fd/0xa90 net/core/rtnetlink.c:3246
 __rtnl_newlink net/core/rtnetlink.c:3528 [inline]
 rtnl_newlink+0x12b6/0x1920 net/core/rtnetlink.c:3586
 rtnetlink_rcv_msg+0x7f1/0xf10 net/core/rtnetlink.c:5698
 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2535
 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
 netlink_unicast+0x804/0x9e0 net/netlink/af_netlink.c:1340
 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:706 [inline]
 __sock_sendmsg net/socket.c:718 [inline]
 __sys_sendto+0x46d/0x620 net/socket.c:2073
 __do_sys_sendto net/socket.c:2085 [inline]
 __se_sys_sendto net/socket.c:2081 [inline]
 __x64_sys_sendto+0xda/0xf0 net/socket.c:2081
 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 21628:
 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+0xec/0x170 mm/slub.c:1736
 slab_free mm/slub.c:3504 [inline]
 kfree+0xef/0x2a0 mm/slub.c:4564
 device_release+0x92/0x1c0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:713 [inline]
 kobject_release lib/kobject.c:744 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x217/0x450 lib/kobject.c:761
 netdev_run_todo+0x942/0xac0 net/core/dev.c:10736
 rtnl_unlock net/core/rtnetlink.c:112 [inline]
 rtnetlink_rcv_msg+0xa0e/0xf10 net/core/rtnetlink.c:5699
 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2535
 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
 netlink_unicast+0x804/0x9e0 net/netlink/af_netlink.c:1340
 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1927
 sock_sendmsg_nosec net/socket.c:706 [inline]
 __sock_sendmsg net/socket.c:718 [inline]
 ____sys_sendmsg+0x546/0x840 net/socket.c:2444
 ___sys_sendmsg+0x278/0x340 net/socket.c:2501
 __sys_sendmsg net/socket.c:2530 [inline]
 __do_sys_sendmsg net/socket.c:2539 [inline]
 __se_sys_sendmsg+0x1b7/0x2a0 net/socket.c:2537
 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

The buggy address belongs to the object at ffff888077d54000
 which belongs to the cache kmalloc-cg-8k of size 8192
The buggy address is located 216 bytes inside of
 8192-byte region [ffff888077d54000, ffff888077d56000)
The buggy address belongs to the page:
page:ffffea0001df5400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x77d50
head:ffffea0001df5400 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff88805fb80fc1
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff88801784c3c0
raw: 0000000000000000 0000000000020002 00000001ffffffff ffff88805fb80fc1
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d60c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4286, ts 76080991888, free_ts 76012911306
 prep_new_page mm/page_alloc.c:2427 [inline]
 get_page_from_freelist+0x2510/0x2680 mm/page_alloc.c:4202
 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5511
 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+0x807/0xdd0 mm/slub.c:3013
 __slab_alloc mm/slub.c:3100 [inline]
 slab_alloc_node mm/slub.c:3191 [inline]
 __kmalloc_node+0x142/0x3a0 mm/slub.c:4456
 kmalloc_node include/linux/slab.h:630 [inline]
 kvmalloc_node+0x84/0x130 mm/util.c:619
 kvmalloc include/linux/mm.h:816 [inline]
 kvzalloc include/linux/mm.h:824 [inline]
 alloc_netdev_mqs+0x84/0xc40 net/core/dev.c:10918
 nsim_create+0x76/0x3e0 drivers/net/netdevsim/netdev.c:350
 __nsim_dev_port_add+0x66e/0xa80 drivers/net/netdevsim/dev.c:1312
 nsim_dev_port_add_all+0x37/0x100 drivers/net/netdevsim/dev.c:1372
 nsim_dev_probe+0x75e/0x9d0 drivers/net/netdevsim/dev.c:1513
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x276/0xc70 drivers/base/dd.c:595
 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805
 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1341 [inline]
 free_pcp_prepare mm/page_alloc.c:1392 [inline]
 free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3325
 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3404
 free_slab mm/slub.c:2020 [inline]
 discard_slab mm/slub.c:2026 [inline]
 __unfreeze_partials+0x188/0x1e0 mm/slub.c:2512
 put_cpu_partial+0x12d/0x190 mm/slub.c:2592
 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3225 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 __kmalloc_track_caller+0x187/0x330 mm/slub.c:4930
 kstrdup+0x32/0x70 mm/util.c:60
 device_rename+0xaf/0x1a0 drivers/base/core.c:4289
 dev_change_name+0x2ee/0xc10 net/core/dev.c:1323
 do_setlink+0x9e7/0x29d0 net/core/rtnetlink.c:2773
 __rtnl_newlink net/core/rtnetlink.c:3464 [inline]
 rtnl_newlink+0x15bb/0x1920 net/core/rtnetlink.c:3586
 rtnetlink_rcv_msg+0x7f1/0xf10 net/core/rtnetlink.c:5698
 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2535

Memory state around the buggy address:
 ffff888077d53f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888077d54000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888077d54080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                    ^
 ffff888077d54100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888077d54180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (144):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/12/01 07:49 linux-5.15.y 9bdc23a21e3d ba8e13b2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/11/25 08:50 linux-5.15.y 4f2df9a01754 bda6e3c6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/11/17 13:26 linux-5.15.y 29c6cdaac04a 43af6cac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/11/11 01:21 linux-5.15.y 29c6cdaac04a d3056657 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/11/03 15:22 linux-5.15.y 700e62ea909a e2d35131 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/30 17:45 linux-5.15.y 700e62ea909a 0ec395f8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/27 16:57 linux-5.15.y 792fbe1537d8 96923c60 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/25 08:34 linux-5.15.y 792fbe1537d8 1d9ca40b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/21 10:08 linux-5.15.y 792fbe1537d8 61c200c7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/21 06:18 linux-5.15.y 792fbe1537d8 61c200c7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/15 19:17 linux-5.15.y 792fbe1537d8 8fb0ae89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/14 13:40 linux-5.15.y a051a4bf909f 1a71827b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/09 18:31 linux-5.15.y a051a4bf909f 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/08 06:02 linux-5.15.y a051a4bf909f 4f6a9fcf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/07 10:28 linux-5.15.y a051a4bf909f 6520ecdb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/07 06:22 linux-5.15.y a051a4bf909f f7710056 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/04 10:46 linux-5.15.y a051a4bf909f 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/03 13:40 linux-5.15.y a051a4bf909f 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/03 07:51 linux-5.15.y 0248c33e835e 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/10/02 06:04 linux-5.15.y 0248c33e835e 6d32eb1f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/09/29 09:21 linux-5.15.y 0248c33e835e 7bf4ea23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/09/02 20:48 linux-5.15.y 0996e0926f6b 85995287 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/08/26 16:37 linux-5.15.y 945fa863f02c a2b77b9e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/08/25 15:49 linux-5.15.y 945fa863f02c a9a1fc32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/08/20 11:21 linux-5.15.y 0eb903b5b519 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/08/14 18:39 linux-5.15.y aabd761612db 6f9b3e89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/08/08 07:11 linux-5.15.y aabd761612db 5d63f80b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/07/10 17:06 linux-5.15.y c86c4726e7f0 99e64375 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/05/18 08:40 linux-5.15.y 93741761e5e3 de5aae85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/04/20 07:28 linux-5.15.y b9d57c40a767 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/04/19 19:43 linux-5.15.y b9d57c40a767 303e2802 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/04/01 20:16 linux-5.15.y 91d48252ad4b 9a1f7828 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/03/23 07:49 linux-5.15.y 91d48252ad4b 5b92003d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/03/09 13:52 linux-5.15.y 91d48252ad4b 176bead5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/03/03 22:22 linux-5.15.y 3330a8d33e08 4180d919 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/02/25 15:05 linux-5.15.y 3330a8d33e08 94a9671e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/02/21 09:40 linux-5.15.y 3330a8d33e08 6e7b5511 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/02/21 01:01 linux-5.15.y 3330a8d33e08 6e7b5511 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/02/18 21:09 linux-5.15.y e45d5d41c134 77d4d919 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/02/05 04:31 linux-5.15.y 9eec9a14ee10 ea10c935 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/02/04 20:42 linux-5.15.y 9eec9a14ee10 ea10c935 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/01/30 03:58 linux-5.15.y 9eec9a14ee10 bfa73b7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/01/26 15:36 linux-5.15.y 9eec9a14ee10 a4c52dd6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2026/01/26 10:29 linux-5.15.y 9eec9a14ee10 a4c52dd6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2025/12/25 09:13 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2023/12/13 22:41 linux-5.15.y d0fc081c6241 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2025/07/23 14:46 linux-5.15.y c79648372d02 e1dd4f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in siw_query_port
* Struck through repros no longer work on HEAD.