================================================================== BUG: KASAN: stack-out-of-bounds in ipmr_ioctl+0x886/0xaf0 Read of size 4 at addr ffff88803dd57b24 by task syz-executor.5/16269 CPU: 0 PID: 16269 Comm: syz-executor.5 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:0x7f7066debb19 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:00007f7064361188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f7066efef60 RCX: 00007f7066debb19 RDX: 0000000020000140 RSI: 00000000000089e1 RDI: 0000000000000003 RBP: 00007f7066e45f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe0bd27e9f R14: 00007f7064361300 R15: 0000000000022000 The buggy address belongs to stack of task syz-executor.5/16269 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:00000000a2eb787f refcount:0 mapcount:0 mapping:0000000000000000 index:0x2 pfn:0x3dd57 flags: 0x100000000000000(node=0|zone=1) page_type: 0xffffffff() raw: 0100000000000000 0000000000000000 ffffffff00000101 0000000000000000 raw: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88803dd57a00: 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 ffff88803dd57a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88803dd57b00: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffff88803dd57b80: 00 00 00 f1 f1 f1 f1 f1 f1 00 00 00 00 00 f2 f2 ffff88803dd57c00: f2 f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== tmpfs: Unknown parameter 'pol' netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.2'. Process accounting paused loop6: detected capacity change from 0 to 40 vfat filesystem being mounted at /syzkaller-testdir460541337/syzkaller.Hj2rOV/608/file0 supports timestamps until 2107-12-31 (0x10391447e) syz-executor.6: attempt to access beyond end of device loop6: rw=2049, sector=40, nr_sectors = 4 limit=40 buffer_io_error: 494 callbacks suppressed Buffer I/O error on dev loop6, logical block 10, lost async page write loop6: detected capacity change from 0 to 40 vfat filesystem being mounted at /syzkaller-testdir460541337/syzkaller.Hj2rOV/609/file0 supports timestamps until 2107-12-31 (0x10391447e) syz-executor.6: attempt to access beyond end of device loop6: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop6, logical block 10, lost async page write loop6: detected capacity change from 0 to 40 vfat filesystem being mounted at /syzkaller-testdir460541337/syzkaller.Hj2rOV/610/file0 supports timestamps until 2107-12-31 (0x10391447e) syz-executor.6: attempt to access beyond end of device loop6: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop6, logical block 10, lost async page write loop6: detected capacity change from 0 to 40 loop0: detected capacity change from 0 to 40 vfat filesystem being mounted at /syzkaller-testdir460541337/syzkaller.Hj2rOV/611/file0 supports timestamps until 2107-12-31 (0x10391447e) vfat filesystem being mounted at /syzkaller-testdir895396673/syzkaller.cbQvaJ/617/file0 supports timestamps until 2107-12-31 (0x10391447e) audit: type=1326 audit(3818674987.687:38): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=16560 comm="syz-executor.5" exe="/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f7066debb19 code=0x0 random: crng reseeded on system resumption syz-executor.0: attempt to access beyond end of device loop0: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop0, logical block 10, lost async page write syz-executor.6: attempt to access beyond end of device loop6: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop6, logical block 10, lost async page write Restarting kernel threads ... done. random: crng reseeded on system resumption Restarting kernel threads ... done. loop0: detected capacity change from 0 to 40 vfat filesystem being mounted at /syzkaller-testdir895396673/syzkaller.cbQvaJ/618/file0 supports timestamps until 2107-12-31 (0x10391447e) syz-executor.0: attempt to access beyond end of device loop0: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop0, logical block 10, lost async page write audit: type=1326 audit(3818674987.912:39): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=16589 comm="syz-executor.5" exe="/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f7066debb19 code=0x0 random: crng reseeded on system resumption loop0: detected capacity change from 0 to 40 vfat filesystem being mounted at /syzkaller-testdir895396673/syzkaller.cbQvaJ/619/file0 supports timestamps until 2107-12-31 (0x10391447e) Restarting kernel threads ... done. syz-executor.0: attempt to access beyond end of device loop0: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop0, logical block 10, lost async page write audit: type=1326 audit(3818674988.079:40): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=16599 comm="syz-executor.6" exe="/syz-executor.6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f664c15eb19 code=0x0 random: crng reseeded on system resumption audit: type=1326 audit(3818674988.114:41): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=16608 comm="syz-executor.5" exe="/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f7066debb19 code=0x0 audit: type=1326 audit(3818674988.179:42): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=16614 comm="syz-executor.6" exe="/syz-executor.6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f664c15eb19 code=0x0 audit: type=1326 audit(3818674988.221:43): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=16619 comm="syz-executor.5" exe="/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f7066debb19 code=0x0 random: crng reseeded on system resumption Restarting kernel threads ... done. audit: type=1326 audit(3818674988.261:44): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=16626 comm="syz-executor.6" exe="/syz-executor.6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x7f664c15eb19 code=0x0 loop6: detected capacity change from 0 to 64 FAT-fs (loop6): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) vfat filesystem being mounted at /syzkaller-testdir460541337/syzkaller.Hj2rOV/626/file0 supports timestamps until 2107-12-31 (0x10391447e) FAT-fs (loop6): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) loop6: detected capacity change from 0 to 64 FAT-fs (loop6): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) vfat filesystem being mounted at /syzkaller-testdir460541337/syzkaller.Hj2rOV/627/file0 supports timestamps until 2107-12-31 (0x10391447e) FAT-fs (loop6): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) loop6: detected capacity change from 0 to 64 FAT-fs (loop6): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) vfat filesystem being mounted at /syzkaller-testdir460541337/syzkaller.Hj2rOV/628/file0 supports timestamps until 2107-12-31 (0x10391447e) FAT-fs (loop6): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) SELinux: unrecognized netlink message: protocol=0 nlmsg_type=123 sclass=netlink_route_socket pid=16818 comm=syz-executor.3 loop6: detected capacity change from 0 to 64 FAT-fs (loop6): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) vfat filesystem being mounted at /syzkaller-testdir460541337/syzkaller.Hj2rOV/629/file0 supports timestamps until 2107-12-31 (0x10391447e) SELinux: unrecognized netlink message: protocol=0 nlmsg_type=123 sclass=netlink_route_socket pid=16821 comm=syz-executor.3 FAT-fs (loop6): Invalid FSINFO signature: 0x00000000, 0x00000000 (sector = 1) SELinux: unrecognized netlink message: protocol=0 nlmsg_type=123 sclass=netlink_route_socket pid=16831 comm=syz-executor.3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=123 sclass=netlink_route_socket pid=16837 comm=syz-executor.3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=123 sclass=netlink_route_socket pid=16864 comm=syz-executor.3 random: crng reseeded on system resumption Restarting kernel threads ... done. random: crng reseeded on system resumption Restarting kernel threads ... done. loop7: detected capacity change from 0 to 136 ISOFS: Logical zone size(0) < hardware blocksize(1024) loop7: detected capacity change from 0 to 136 ISOFS: Logical zone size(0) < hardware blocksize(1024) random: crng reseeded on system resumption Restarting kernel threads ... done. loop7: detected capacity change from 0 to 136 ISOFS: Logical zone size(0) < hardware blocksize(1024) loop7: detected capacity change from 0 to 136 ISOFS: Logical zone size(0) < hardware blocksize(1024) random: crng reseeded on system resumption loop7: detected capacity change from 0 to 136 ISOFS: Logical zone size(0) < hardware blocksize(1024) Restarting kernel threads ... done. random: crng reseeded on system resumption