syzbot


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: 301d, last: 2d10h
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in siw_query_port rdma 50 401d 517d 0/28 auto-obsoleted due to no activity on 2023/11/13 22:18
linux-6.1 KASAN: use-after-free Read in siw_query_port 5 356d 433d 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 3 446d 473d 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) 173 3h30m 243d 0/3 upstream: reported on 2024/02/09 22:01

Sample crash report:
wlan0 speed is unknown, defaulting to 1000
==================================================================
BUG: KASAN: use-after-free in siw_query_port+0x342/0x430 drivers/infiniband/sw/siw/siw_verbs.c:175
Read of size 4 at addr ffff8880532580d8 by task kworker/1:13/4103

CPU: 1 PID: 4103 Comm: kworker/1:13 Not tainted 5.15.167-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: infiniband ib_cache_event_task
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 print_address_description+0x63/0x3b0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
 siw_query_port+0x342/0x430 drivers/infiniband/sw/siw/siw_verbs.c:175
 ib_cache_update+0x1a8/0xaf0 drivers/infiniband/core/cache.c:1477
 ib_cache_event_task+0xef/0x1e0 drivers/infiniband/core/cache.c:1551
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

The buggy address belongs to the page:
page:ffffea00014c9600 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x53258
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea00008bd708 ffff8880b91409b0 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x546dc0(GFP_USER|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP|__GFP_ZERO|__GFP_ACCOUNT), pid 3567, ts 51889713362, free_ts 84426007495
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159
 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423
 __alloc_pages_node include/linux/gfp.h:570 [inline]
 alloc_pages_node include/linux/gfp.h:584 [inline]
 kmalloc_large_node+0x7c/0x180 mm/slub.c:4421
 __kmalloc_node+0x22d/0x390 mm/slub.c:4437
 kmalloc_node include/linux/slab.h:614 [inline]
 kvmalloc_node+0x80/0x140 mm/util.c:619
 kvmalloc include/linux/mm.h:805 [inline]
 kvzalloc include/linux/mm.h:813 [inline]
 alloc_netdev_mqs+0x85/0xc10 net/core/dev.c:10844
 ieee80211_if_add+0x11fe/0x1e50 net/mac80211/iface.c:1934
 ieee80211_register_hw+0x2aa9/0x39d0 net/mac80211/main.c:1321
 mac80211_hwsim_new_radio+0x223d/0x4200 drivers/net/wireless/mac80211_hwsim.c:3374
 hwsim_new_radio_nl+0xbae/0x1090 drivers/net/wireless/mac80211_hwsim.c:3950
 genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:775 [inline]
 genl_rcv_msg+0xfbd/0x14a0 net/netlink/genetlink.c:792
 netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2503
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:803
 netlink_unicast_kernel net/netlink/af_netlink.c:1326 [inline]
 netlink_unicast+0x7b6/0x980 net/netlink/af_netlink.c:1352
 netlink_sendmsg+0xa30/0xd60 net/netlink/af_netlink.c:1920
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 __sys_sendto+0x564/0x720 net/socket.c:2058
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317
 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396
 free_nonslab_page+0xe4/0x150 mm/slub.c:3535
 kfree+0x1cf/0x270 mm/slub.c:4556
 device_release+0x91/0x1c0
 kobject_cleanup lib/kobject.c:713 [inline]
 kobject_release lib/kobject.c:744 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x224/0x460 lib/kobject.c:761
 netdev_run_todo+0xaaf/0xc40 net/core/dev.c:10662
 ieee80211_unregister_hw+0x5a/0x220 net/mac80211/main.c:1399
 mac80211_hwsim_del_radio+0x2bb/0x4a0 drivers/net/wireless/mac80211_hwsim.c:3473
 hwsim_exit_net+0x5b8/0x660 drivers/net/wireless/mac80211_hwsim.c:4243
 ops_exit_list net/core/net_namespace.c:172 [inline]
 cleanup_net+0x6ce/0xb60 net/core/net_namespace.c:599
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Memory state around the buggy address:
 ffff888053257f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888053258000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888053258080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                                    ^
 ffff888053258100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888053258180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (52):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/08 05:29 linux-5.15.y 3a5928702e71 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/10/03 19:07 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/10/03 05:39 linux-5.15.y 3a5928702e71 a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/09/30 15:08 linux-5.15.y 3a5928702e71 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/09/28 07:53 linux-5.15.y 3a5928702e71 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/09/27 20:52 linux-5.15.y 3a5928702e71 440b26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/09/25 23:08 linux-5.15.y 3a5928702e71 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/09/25 11:06 linux-5.15.y 3a5928702e71 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/09/11 10:07 linux-5.15.y 14e468424d3e 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/09/09 19:05 linux-5.15.y 14e468424d3e 073f8be2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/09/06 21:33 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/31 00:23 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/30 10:45 linux-5.15.y fa93fa65db6e ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/30 10:19 linux-5.15.y fa93fa65db6e ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/27 22:47 linux-5.15.y fa93fa65db6e 6c853ff9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/14 02:54 linux-5.15.y 7e89efd3ae1c bde81f6f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/12 13:00 linux-5.15.y 7e89efd3ae1c 842184b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/08 20:01 linux-5.15.y 7e89efd3ae1c 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/08 01:46 linux-5.15.y 7e89efd3ae1c de12cf65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/05 15:50 linux-5.15.y 7e89efd3ae1c e35c337f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/04 01:05 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/08/02 23:45 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/07/27 07:56 linux-5.15.y 7c6d66f0266f 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/07/26 05:36 linux-5.15.y 7c6d66f0266f 3f86dfed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/07/23 03:01 linux-5.15.y 7c6d66f0266f 708c10c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/07/16 00:00 linux-5.15.y f45bea23c39c e8709b21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/07/14 03:20 linux-5.15.y f45bea23c39c eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/07/10 20:58 linux-5.15.y f45bea23c39c 6f7fa383 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/06/28 14:46 linux-5.15.y 4878aadf2d15 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/06/28 14:44 linux-5.15.y 4878aadf2d15 757f06b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/06/27 22:44 linux-5.15.y 4878aadf2d15 6ef39602 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/06/20 11:15 linux-5.15.y 4878aadf2d15 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/06/13 06:46 linux-5.15.y c61bd26ae81a 2aa5052f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/06/01 20:47 linux-5.15.y c61bd26ae81a 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/05/29 05:16 linux-5.15.y c61bd26ae81a 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/05/18 06:58 linux-5.15.y 83655231580b c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/05/07 18:11 linux-5.15.y 284087d4f7d5 cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/04/04 11:04 linux-5.15.y 9465fef4ae35 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/04/03 15:46 linux-5.15.y 9465fef4ae35 51c4dcff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/04/03 03:32 linux-5.15.y 9465fef4ae35 7925100d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/04/02 13:45 linux-5.15.y 9465fef4ae35 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/03/30 02:50 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/02/16 04:40 linux-5.15.y 6139f2a02fe0 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/01/29 17:20 linux-5.15.y 6139f2a02fe0 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/01/22 18:38 linux-5.15.y ddcaf4999061 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in siw_query_port
2024/01/12 21:02 linux-5.15.y 26c690eff0a5 551587c1 .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
2024/07/27 04:50 linux-5.15.y 7c6d66f0266f 46eb10b7 .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
2024/07/26 02:49 linux-5.15.y 7c6d66f0266f 3f86dfed .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
2024/07/20 12:31 linux-5.15.y 7c6d66f0266f b88348e9 .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.