================================================================== BUG: KASAN: slab-out-of-bounds in cfg80211_wext_freq+0x1f9/0x240 net/wireless/wext-compat.c:238 Read of size 2 at addr ffff88802dbba940 by task syz-executor.3/8125 CPU: 1 PID: 8125 Comm: syz-executor.3 Not tainted 6.10.0-rc1-syzkaller-00276-g54751f4d5406 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 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:3447 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:0x7fcf1ae7cf69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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:00007fcf1a9ff0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fcf1afb3f80 RCX: 00007fcf1ae7cf69 RDX: 0000000020000000 RSI: 0000000000008b18 RDI: 0000000000000003 RBP: 00007fcf1aeda6fe R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fcf1afb3f80 R15: 00007fff13bf10d8 Allocated by task 8125: 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:4121 [inline] __kmalloc_noprof+0x1f9/0x400 mm/slub.c:4134 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 ffff88802dbba800 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 [ffff88802dbba800, ffff88802dbba93c) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2dbb8 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: 0xffffefff(slab) raw: 00fff00000000040 ffff888015041c80 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080100010 00000001ffffefff 0000000000000000 head: 00fff00000000040 ffff888015041c80 0000000000000000 dead000000000001 head: 0000000000000000 0000000080100010 00000001ffffefff 0000000000000000 head: 00fff00000000002 ffffea0000b6ee01 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4757, tgid 4757 (dhcpcd), ts 46231583944, free_ts 46195404219 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2e2d/0x2ee0 mm/page_alloc.c:3402 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4660 __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:2264 allocate_slab+0x5a/0x2e0 mm/slub.c:2427 new_slab mm/slub.c:2480 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3666 __slab_alloc+0x58/0xa0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_noprof+0x257/0x400 mm/slub.c:4134 kmalloc_noprof include/linux/slab.h:664 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] tomoyo_init_log+0x1b3e/0x2050 security/tomoyo/audit.c:275 tomoyo_supervisor+0x38a/0x11f0 security/tomoyo/common.c:2089 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission+0x243/0x360 security/tomoyo/file.c:587 tomoyo_path_perm+0x480/0x740 security/tomoyo/file.c:838 security_inode_getattr+0xd8/0x130 security/security.c:2269 vfs_getattr+0x45/0x430 fs/stat.c:173 vfs_fstat fs/stat.c:198 [inline] vfs_fstatat+0xd6/0x190 fs/stat.c:300 __do_sys_newfstatat fs/stat.c:468 [inline] __se_sys_newfstatat fs/stat.c:462 [inline] __x64_sys_newfstatat+0x125/0x1b0 fs/stat.c:462 page last free pid 4754 tgid 4754 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2565 stack_depot_save_flags+0x6f6/0x830 lib/stackdepot.c:666 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_save_track+0x51/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xe0/0x150 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2195 [inline] slab_free mm/slub.c:4436 [inline] kfree+0x149/0x360 mm/slub.c:4557 tomoyo_realpath_from_path+0x5a9/0x5e0 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x2b7/0x740 security/tomoyo/file.c:822 security_path_chroot+0x65/0x90 security/security.c:1985 __do_sys_chroot fs/open.c:617 [inline] __se_sys_chroot+0x1c8/0x2b0 fs/open.c:600 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 Memory state around the buggy address: ffff88802dbba800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802dbba880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802dbba900: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff88802dbba980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802dbbaa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================