syzbot


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

Status: upstream: reported C repro on 2024/06/09 04:12
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+27fa463168bc04c57661@syzkaller.appspotmail.com
First crash: 102d, last: 56d
Fix commit to backport (bisect log) :
tree: upstream
commit 6ef09cdc5ba0f93826c09d810c141a8d103a80fc
Author: Dmitry Antipov <dmantipov@yandex.ru>
Date: Fri May 31 03:20:10 2024 +0000

  wifi: cfg80211: wext: add extra SIOCSIWSCAN data check

  
Bug presence (2)
Date Name Commit Repro Result
2024/07/07 linux-6.1.y (ToT) 7753af06eebf C [report] KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/23 upstream (ToT) 5f583a3162ff C Didn't crash
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in cfg80211_wext_freq wireless C inconclusive 133 86d 112d 26/28 fixed on 2024/07/09 19:14
upstream KASAN: slab-out-of-bounds Read in cfg80211_wext_freq (2) wireless 6 36d 32d 0/28 upstream: reported on 2024/08/17 19:12
linux-5.15 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq origin:lts-only C error 71 55d 97d 0/3 upstream: reported C repro on 2024/06/13 10:59
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2024/07/18 03:45 8h52m fix candidate upstream OK (1) job log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in cfg80211_wext_freq+0x170/0x1ac net/wireless/wext-compat.c:235
Read of size 2 at addr ffff0000cf4a7540 by task syz-executor108/4223

CPU: 0 PID: 4223 Comm: syz-executor108 Not tainted 6.1.94-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x174/0x4c0 mm/kasan/report.c:395
 kasan_report+0xd4/0x130 mm/kasan/report.c:495
 __asan_report_load2_noabort+0x2c/0x38 mm/kasan/report_generic.c:349
 cfg80211_wext_freq+0x170/0x1ac net/wireless/wext-compat.c:235
 cfg80211_wext_siwscan+0x430/0xee8 net/wireless/scan.c:2751
 ioctl_standard_iw_point+0x7f0/0xdc4 net/wireless/wext-core.c:848
 ioctl_standard_call+0xcc/0x264 net/wireless/wext-core.c:1033
 wext_ioctl_dispatch+0x16c/0x3ec net/wireless/wext-core.c:997
 wext_handle_ioctl+0x1f8/0x3f4 net/wireless/wext-core.c:1058
 sock_ioctl+0x140/0x858 net/socket.c:1255
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Allocated by task 4223:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slab_common.c:955 [inline]
 __kmalloc+0xd8/0x1c4 mm/slab_common.c:968
 kmalloc include/linux/slab.h:561 [inline]
 kzalloc include/linux/slab.h:692 [inline]
 ioctl_standard_iw_point+0x3b8/0xdc4 net/wireless/wext-core.c:809
 ioctl_standard_call+0xcc/0x264 net/wireless/wext-core.c:1033
 wext_ioctl_dispatch+0x16c/0x3ec net/wireless/wext-core.c:997
 wext_handle_ioctl+0x1f8/0x3f4 net/wireless/wext-core.c:1058
 sock_ioctl+0x140/0x858 net/socket.c:1255
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

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

The buggy address belongs to the physical page:
page:00000000c65c4785 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f4a4
head:00000000c65c4785 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 0000000000000000 dead000000000001 ffff0000c0002600
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000cf4a7400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff0000cf4a7480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff0000cf4a7500: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc
                                           ^
 ffff0000cf4a7580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff0000cf4a7600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
================================================================================
UBSAN: array-index-out-of-bounds in net/wireless/scan.c:2749:8
index 33 is out of range for type 'struct iw_freq[32]'
CPU: 0 PID: 4223 Comm: syz-executor108 Tainted: G    B              6.1.94-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282
 cfg80211_wext_siwscan+0x4a0/0xee8 net/wireless/scan.c:2749
 ioctl_standard_iw_point+0x7f0/0xdc4 net/wireless/wext-core.c:848
 ioctl_standard_call+0xcc/0x264 net/wireless/wext-core.c:1033
 wext_ioctl_dispatch+0x16c/0x3ec net/wireless/wext-core.c:997
 wext_handle_ioctl+0x1f8/0x3f4 net/wireless/wext-core.c:1058
 sock_ioctl+0x140/0x858 net/socket.c:1255
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
================================================================================

Crashes (48):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/21 09:54 linux-6.1.y eb44d83053d6 dac2aa43 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/25 03:05 linux-6.1.y 9b3f9a5b12dc d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/13 10:15 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/13 10:15 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/12 12:02 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/12 12:02 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/12 05:54 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/12 05:54 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/06 07:00 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/06 07:00 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/23 02:38 linux-6.1.y eb44d83053d6 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/23 02:38 linux-6.1.y eb44d83053d6 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/23 02:25 linux-6.1.y eb44d83053d6 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/23 02:24 linux-6.1.y eb44d83053d6 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/21 07:43 linux-6.1.y eb44d83053d6 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/21 07:43 linux-6.1.y eb44d83053d6 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/13 20:27 linux-6.1.y ae9f2a70d69e a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/13 20:27 linux-6.1.y ae9f2a70d69e a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/09 04:12 linux-6.1.y 88690811da69 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/25 04:36 linux-6.1.y 9b3f9a5b12dc d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/22 03:06 linux-6.1.y 9b3f9a5b12dc b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/22 03:06 linux-6.1.y 9b3f9a5b12dc b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/14 03:29 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/14 03:27 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/12 08:04 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/12 08:04 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/06 08:57 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/06 08:56 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/06 03:44 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/07/06 03:44 linux-6.1.y 7753af06eebf 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/28 10:39 linux-6.1.y 99e6a620de00 6ef39602 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/28 10:39 linux-6.1.y 99e6a620de00 6ef39602 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/28 10:37 linux-6.1.y 99e6a620de00 6ef39602 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/28 10:37 linux-6.1.y 99e6a620de00 6ef39602 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/25 19:19 linux-6.1.y eb44d83053d6 04bd2a30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/25 19:18 linux-6.1.y eb44d83053d6 04bd2a30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/25 19:15 linux-6.1.y eb44d83053d6 04bd2a30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/25 19:15 linux-6.1.y eb44d83053d6 04bd2a30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/23 00:22 linux-6.1.y eb44d83053d6 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/23 00:22 linux-6.1.y eb44d83053d6 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/21 07:50 linux-6.1.y eb44d83053d6 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
2024/06/21 07:48 linux-6.1.y eb44d83053d6 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: slab-out-of-bounds Read in cfg80211_wext_freq
* Struck through repros no longer work on HEAD.