================================================================== BUG: KASAN: stack-out-of-bounds in ipmr_ioctl+0x886/0xaf0 Read of size 4 at addr ffff88804296fb24 by task syz-executor.2/5073 CPU: 0 PID: 5073 Comm: syz-executor.2 Not tainted 6.4.0-rc7-next-20230621 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x91/0xf0 print_report+0xcc/0x620 kasan_report+0xbe/0xf0 ipmr_ioctl+0x886/0xaf0 raw_ioctl+0x4e/0x1e0 sk_ioctl+0x14b/0x320 inet_ioctl+0x18c/0x390 sock_do_ioctl+0xd2/0x240 sock_ioctl+0x424/0x670 __x64_sys_ioctl+0x1a4/0x210 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7f6b721ecb19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6b6f762188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f6b722fff60 RCX: 00007f6b721ecb19 RDX: 0000000000000000 RSI: 00000000000089e1 RDI: 0000000000000003 RBP: 00007f6b72246f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd93953b9f R14: 00007f6b6f762300 R15: 0000000000022000 The buggy address belongs to stack of task syz-executor.2/5073 and is located at offset 36 in frame: sk_ioctl+0x0/0x320 This frame has 1 object: [32, 36) 'karg' The buggy address belongs to the physical page: page:0000000040523f5f refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4296f flags: 0x100000000000000(node=0|zone=1) page_type: 0xffffffff() raw: 0100000000000000 0000000000000000 ffffea00010a5bc8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804296fa00: 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 ffff88804296fa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804296fb00: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffff88804296fb80: 00 00 00 f1 f1 f1 f1 f1 f1 00 00 00 00 00 f2 f2 ffff88804296fc00: f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== loop4: detected capacity change from 0 to 264192 loop4: detected capacity change from 0 to 264192 tmpfs: Bad value for 'mpol' tmpfs: Bad value for 'mpol' ------------[ cut here ]------------ wlan1: Failed check-sdata-in-driver check, flags: 0x0 WARNING: CPU: 1 PID: 5219 at net/mac80211/main.c:236 ieee80211_bss_info_change_notify+0x305/0xab0 Modules linked in: CPU: 1 PID: 5219 Comm: syz-executor.1 Tainted: G B 6.4.0-rc7-next-20230621 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:ieee80211_bss_info_change_notify+0x305/0xab0 Code: 88 06 00 00 4d 85 f6 0f 84 c0 06 00 00 e8 a3 83 2f fd e8 9e 83 2f fd 8b 54 24 0c 4c 89 f6 48 c7 c7 e0 27 e0 84 e8 9b 78 fa fc <0f> 0b 48 b8 00 00 00 00 00 fc ff df 48 8b 14 24 48 c1 ea 03 0f b6 RSP: 0018:ffff8880441df540 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff888042268b80 RCX: ffffc900021dc000 RDX: 0000000000040000 RSI: ffffffff81171eb2 RDI: 0000000000000001 RBP: ffff8880422a8e20 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000400000 R13: ffff88804226a4f0 R14: ffff888042268000 R15: 0000000000000000 FS: 00007f41378ef700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffe2ba1bff8 CR3: 00000000418ec000 CR4: 0000000000350ee0 Call Trace: ieee80211_ocb_leave+0x1f1/0x350 __cfg80211_leave_ocb+0x1d5/0x5a0 cfg80211_leave_ocb+0x52/0x80 cfg80211_change_iface+0x8cb/0x1080 nl80211_set_interface+0x6b0/0x990 genl_family_rcv_msg_doit.isra.0+0x1ee/0x2e0 genl_rcv_msg+0x503/0x7e0 netlink_rcv_skb+0x15d/0x450 genl_rcv+0x28/0x40 netlink_unicast+0x552/0x800 netlink_sendmsg+0x923/0xe40 sock_sendmsg+0x1b6/0x200 __sys_sendto+0x254/0x360 __x64_sys_sendto+0xe1/0x1c0 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7f413a32c8ac Code: fa fa ff ff 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 20 fb ff ff 48 8b RSP: 002b:00007f41378edf80 EFLAGS: 00000293 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f41378ee0f0 RCX: 00007f413a32c8ac RDX: 0000000000000024 RSI: 00007f41378ee140 RDI: 0000000000000006 RBP: 0000000000000000 R08: 00007f41378edfd4 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 00007f41378ee140 R14: 0000000000000006 R15: 0000000000000000 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x1c3a/0x7320 softirqs last enabled at (0): [] copy_process+0x1c7e/0x7320 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace 0000000000000000 ]--- SELinux: security_context_str_to_sid (staff_u) failed with errno=-22 loop3: detected capacity change from 0 to 512 loop3: detected capacity change from 0 to 512 EXT4-fs (loop3): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. EXT4-fs (loop3): unmounting filesystem 00000000-0000-0000-0000-000000000000. SELinux: security_context_str_to_sid (staff_u) failed with errno=-22 loop3: detected capacity change from 0 to 512 loop7: detected capacity change from 0 to 1 SELinux: security_context_str_to_sid (staff_u) failed with errno=-22 loop7: detected capacity change from 0 to 1 EXT4-fs (loop3): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. EXT4-fs (loop3): unmounting filesystem 00000000-0000-0000-0000-000000000000. SELinux: security_context_str_to_sid (staff_u) failed with errno=-22 loop7: detected capacity change from 0 to 1 loop3: detected capacity change from 0 to 512 tmpfs: Unknown parameter 'hugetlbfs' loop3: detected capacity change from 0 to 512 SELinux: security_context_str_to_sid (staff_u) failed with errno=-22 EXT4-fs (loop3): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. EXT4-fs (loop3): unmounting filesystem 00000000-0000-0000-0000-000000000000. netlink: 4612 bytes leftover after parsing attributes in process `syz-executor.4'. syz-executor.5: attempt to access beyond end of device loop5: rw=4096, sector=2, nr_sectors = 2 limit=0 EXT4-fs (loop5): unable to read superblock syz-executor.5: attempt to access beyond end of device loop5: rw=4096, sector=2, nr_sectors = 2 limit=0 EXT4-fs (loop5): unable to read superblock loop7: detected capacity change from 0 to 1 loop7: detected capacity change from 0 to 1 audit: type=1326 audit(1687347032.444:15): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=5439 comm="syz-executor.2" exe="/syz-executor.2" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f6b721ecb19 code=0x0 SELinux: security_context_str_to_sid (unconfined_u) failed with errno=-22 syz-executor.5 uses obsolete (PF_INET,SOCK_PACKET)