syzbot


KASAN: slab-out-of-bounds Read in cfg80211_wext_freq

Status: upstream: reported C repro on 2024/05/29 09:49
Subsystems: wireless
[Documentation on labels]
Reported-by: syzbot+253cd2d2491df77c93ac@syzkaller.appspotmail.com
First crash: 19d, last: 17h42m
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: KASAN: slab-out-of-bounds Read in cfg80211_wext_freq (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] wifi: wireless: add extra SIOCSIWSCAN data check 1 (1) 2024/05/31 03:20
[syzbot] [wireless?] KASAN: slab-out-of-bounds Read in cfg80211_wext_freq 0 (1) 2024/05/29 09:49
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq 3 1d09h 6d01h 0/3 upstream: reported on 2024/06/09 04:12
linux-5.15 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq C 2 1d16h 1d18h 0/3 upstream: reported C repro on 2024/06/13 10:59

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in cfg80211_wext_freq+0x1f9/0x240 net/wireless/wext-compat.c:238
Read of size 2 at addr ffff88801f290940 by task syz-executor309/6594

CPU: 0 PID: 6594 Comm: syz-executor309 Tainted: G        W          6.10.0-rc2-next-20240605-syzkaller #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:91 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:117
 print_address_description mm/kasan/report.c:377 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:488
 kasan_report+0x143/0x180 mm/kasan/report.c:601
 cfg80211_wext_freq+0x1f9/0x240 net/wireless/wext-compat.c:238
 cfg80211_wext_siwscan+0x4fd/0x10d0 net/wireless/scan.c:3463
 ioctl_standard_iw_point+0x788/0xcb0 net/wireless/wext-core.c:867
 ioctl_standard_call+0xc7/0x290 net/wireless/wext-core.c:1052
 wext_ioctl_dispatch+0x58e/0x640 net/wireless/wext-core.c:1016
 wext_handle_ioctl+0x15f/0x270 net/wireless/wext-core.c:1077
 sock_ioctl+0x17f/0x8e0 net/socket.c:1275
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8f74142599
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8f740fd218 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f8f741cd328 RCX: 00007f8f74142599
RDX: 0000000020000000 RSI: 0000000000008b18 RDI: 0000000000000003
RBP: 00007f8f741cd320 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8f7419a1bc
R13: 0073746e6576652e R14: 652e79726f6d656d R15: 0000000000000000
 </TASK>

Allocated by task 6594:
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
 poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
 __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slub.c:4122 [inline]
 __kmalloc_noprof+0x1f9/0x400 mm/slub.c:4135
 kmalloc_noprof include/linux/slab.h:664 [inline]
 kzalloc_noprof include/linux/slab.h:778 [inline]
 ioctl_standard_iw_point+0x4ae/0xcb0 net/wireless/wext-core.c:828
 ioctl_standard_call+0xc7/0x290 net/wireless/wext-core.c:1052
 wext_ioctl_dispatch+0x58e/0x640 net/wireless/wext-core.c:1016
 wext_handle_ioctl+0x15f/0x270 net/wireless/wext-core.c:1077
 sock_ioctl+0x17f/0x8e0 net/socket.c:1275
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88801f290800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 4 bytes to the right of
 allocated 316-byte region [ffff88801f290800, ffff88801f29093c)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1f290
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xfdffffff(slab)
raw: 00fff00000000040 ffff888015041c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080100010 00000001fdffffff 0000000000000000
head: 00fff00000000040 ffff888015041c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000080100010 00000001fdffffff 0000000000000000
head: 00fff00000000002 ffffea00007ca401 ffffffffffffffff 0000000000000000
head: 0000000000000004 0000000000000000 00000000ffffffff 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 7258318340, free_ts 0
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1470
 prep_new_page mm/page_alloc.c:1478 [inline]
 get_page_from_freelist+0x2cbd/0x2d70 mm/page_alloc.c:3457
 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4715
 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
 alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
 alloc_slab_page+0x5f/0x120 mm/slub.c:2265
 allocate_slab+0x5a/0x2f0 mm/slub.c:2428
 new_slab mm/slub.c:2481 [inline]
 ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3667
 __slab_alloc+0x58/0xa0 mm/slub.c:3757
 __slab_alloc_node mm/slub.c:3810 [inline]
 slab_alloc_node mm/slub.c:3989 [inline]
 __do_kmalloc_node mm/slub.c:4121 [inline]
 __kmalloc_noprof+0x257/0x400 mm/slub.c:4135
 kmalloc_noprof include/linux/slab.h:664 [inline]
 kzalloc_noprof include/linux/slab.h:778 [inline]
 fb_alloc_cmap_gfp+0x23c/0x6e0 drivers/video/fbdev/core/fbcmap.c:110
 drm_fb_helper_alloc_info+0x80/0x120 drivers/gpu/drm/drm_fb_helper.c:527
 drm_fbdev_generic_helper_fb_probe+0x246/0x550 drivers/gpu/drm/drm_fbdev_generic.c:103
 drm_fb_helper_single_fb_probe drivers/gpu/drm/drm_fb_helper.c:1668 [inline]
 __drm_fb_helper_initial_config_and_unlock+0x15fe/0x1e30 drivers/gpu/drm/drm_fb_helper.c:1846
 drm_fbdev_generic_client_hotplug+0x16e/0x230 drivers/gpu/drm/drm_fbdev_generic.c:278
 drm_client_register+0x17f/0x210 drivers/gpu/drm/drm_client.c:141
 vkms_create drivers/gpu/drm/vkms/vkms_drv.c:226 [inline]
 vkms_init+0x5f5/0x730 drivers/gpu/drm/vkms/vkms_drv.c:252
 do_one_initcall+0x248/0x880 init/main.c:1267
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88801f290800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88801f290880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88801f290900: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc
                                           ^
 ffff88801f290980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88801f290a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (93):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/05 17:58 linux-next 234cb065ad82 e1e2c66e .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/05/26 12:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fda5695d692c a10a183e .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/14 12:01 upstream 2ccbdf43d5e7 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/14 01:39 upstream 2ccbdf43d5e7 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/13 21:22 upstream 2ccbdf43d5e7 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/13 17:11 upstream 2ccbdf43d5e7 2aa5052f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/13 16:26 upstream 2ccbdf43d5e7 2aa5052f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/05 06:04 upstream 32f88d65f01b e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 18:17 upstream 83814698cf48 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 14:18 upstream 83814698cf48 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/10 18:43 net 5add2f728846 048c640a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/08 20:24 net c44711b78608 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/07 04:04 net d30d0e49da71 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/06 12:25 net b0c9a2643541 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/05 04:12 net a535d5943237 e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/04 17:27 net d6301802607b a1feae05 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/04 14:23 net d6301802607b a1feae05 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/03 18:58 net 6149db4997f5 0aba2352 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/01 04:20 net 13c7c941e729 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/12 11:46 net-next 45403b12c29c 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/12 05:42 net-next 45403b12c29c 4d75f4f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/07 21:15 net-next a99997323654 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/07 10:28 net-next 62b5bf58b928 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/06 16:34 net-next 98aa546af5e4 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/06 10:03 net-next 54751f4d5406 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/06 08:07 net-next 54751f4d5406 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/05 14:20 net-next 69e0b33a7fce e1e2c66e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 10:58 net-next 6d9e9c36e1a6 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 10:58 net-next 6d9e9c36e1a6 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/01 17:42 net-next e19de2064fdf 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/13 15:05 linux-next a957267fa7e9 2aa5052f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/12 01:23 linux-next a957267fa7e9 c7d7d815 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/10 09:00 linux-next d35b2284e966 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/08 10:21 linux-next d35b2284e966 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/03 00:54 linux-next 0e1980c40b6e 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 15:17 linux-next 0e1980c40b6e 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 13:49 linux-next 0e1980c40b6e 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 06:16 linux-next 0e1980c40b6e 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/05/31 22:43 linux-next 0e1980c40b6e 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/05/31 22:43 linux-next 0e1980c40b6e 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/14 08:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ac2193b4b460 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/13 22:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ac2193b4b460 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/13 09:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 71a096f1ec28 2aa5052f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/10 23:29 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8867bbd4a056 048c640a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/08 01:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8867bbd4a056 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/07 17:28 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8867bbd4a056 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/07 06:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8867bbd4a056 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/06 02:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8867bbd4a056 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 11:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fda5695d692c 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/02 09:05 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fda5695d692c 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/01 16:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fda5695d692c 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/01 04:17 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci fda5695d692c 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
* Struck through repros no longer work on HEAD.