================================================================== BUG: KASAN: slab-out-of-bounds in skip_ie net/wireless/util.c:2068 [inline] BUG: KASAN: slab-out-of-bounds in ieee80211_ie_split_ric+0x5a7/0x610 net/wireless/util.c:2124 Read of size 1 at addr ffff88802a5d2e01 by task syz.0.18/5932 CPU: 2 UID: 0 PID: 5932 Comm: syz.0.18 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 skip_ie net/wireless/util.c:2068 [inline] ieee80211_ie_split_ric+0x5a7/0x610 net/wireless/util.c:2124 ieee80211_ie_split include/net/cfg80211.h:10226 [inline] cfg80211_sme_get_conn_ies net/wireless/sme.c:529 [inline] cfg80211_sme_connect net/wireless/sme.c:586 [inline] cfg80211_connect+0x18a9/0x1ff0 net/wireless/sme.c:1528 cfg80211_mgd_wext_connect+0x57d/0x6d0 net/wireless/wext-sme.c:57 cfg80211_mgd_wext_siwessid+0x36e/0x750 net/wireless/wext-sme.c:184 cfg80211_wext_siwessid+0xd2/0x140 net/wireless/wext-compat.c:1415 ioctl_standard_iw_point+0x5b4/0xc90 net/wireless/wext-core.c:864 ioctl_standard_call+0x167/0x1d0 net/wireless/wext-core.c:1049 wireless_process_ioctl net/wireless/wext-core.c:980 [inline] wext_ioctl_dispatch.constprop.0+0x312/0x3e0 net/wireless/wext-core.c:1013 wext_handle_ioctl+0x105/0x1b0 net/wireless/wext-core.c:1074 sock_ioctl+0x2d4/0x6b0 net/socket.c:1353 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3ccf39de59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe5c899268 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f3ccf625fa0 RCX: 00007f3ccf39de59 RDX: 0000200000000040 RSI: 0000000000008b1a RDI: 0000000000000006 RBP: 00007f3ccf433e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3ccf625fac R14: 00007f3ccf625fa0 R15: 00007f3ccf625fa0 Allocated by task 5932: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5362 [inline] __kmalloc_node_track_caller_noprof+0x331/0x830 mm/slub.c:5497 kmemdup_noprof+0x29/0x60 mm/util.c:138 kmemdup_noprof include/linux/fortify-string.h:715 [inline] cfg80211_wext_siwgenie+0x15f/0x410 net/wireless/wext-sme.c:322 ioctl_standard_iw_point+0x5b4/0xc90 net/wireless/wext-core.c:864 ioctl_standard_call+0x167/0x1d0 net/wireless/wext-core.c:1049 wireless_process_ioctl net/wireless/wext-core.c:980 [inline] wext_ioctl_dispatch.constprop.0+0x312/0x3e0 net/wireless/wext-core.c:1013 wext_handle_ioctl+0x105/0x1b0 net/wireless/wext-core.c:1074 sock_ioctl+0x2d4/0x6b0 net/socket.c:1353 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88802a5d2e00 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes to the right of allocated 1-byte region [ffff88802a5d2e00, ffff88802a5d2e01) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88802a5d2000 pfn:0x2a5d2 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000200 ffff88801bc42500 ffffea0000a966d0 ffffea000087d850 raw: ffff88802a5d2000 000000080080007e 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 12366518257, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3294 [inline] allocate_slab mm/slub.c:3408 [inline] new_slab+0xa2/0x650 mm/slub.c:3454 refill_objects+0xe3/0x410 mm/slub.c:7338 refill_sheaf mm/slub.c:2832 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4703 alloc_from_pcs mm/slub.c:4801 [inline] slab_alloc_node mm/slub.c:4933 [inline] __kmalloc_cache_noprof+0x479/0x6c0 mm/slub.c:5511 _kmalloc_noprof include/linux/slab.h:969 [inline] usb_control_msg+0xbc/0x4b0 drivers/usb/core/message.c:157 set_port_feature drivers/usb/core/hub.c:466 [inline] hub_power_on+0x193/0x4f0 drivers/usb/core/hub.c:979 hub_activate+0x146e/0x1c40 drivers/usb/core/hub.c:1139 hub_configure drivers/usb/core/hub.c:1766 [inline] hub_probe.cold+0x2eca/0x2eda drivers/usb/core/hub.c:2001 usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x20e/0x450 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 page_owner free stack trace missing Memory state around the buggy address: ffff88802a5d2d00: fa fc fc fc fa fc fc fc 06 fc fc fc 07 fc fc fc ffff88802a5d2d80: 06 fc fc fc 06 fc fc fc fa fc fc fc fa fc fc fc >ffff88802a5d2e00: 01 fc fc fc 05 fc fc fc 00 fc fc fc 00 fc fc fc ^ ffff88802a5d2e80: fa fc fc fc fa fc fc fc 06 fc fc fc 06 fc fc fc ffff88802a5d2f00: fa fc fc fc fa fc fc fc fa fc fc fc 00 fc fc fc ==================================================================