audit: type=1400 audit(1657633494.224:9): avc: denied { write } for pid=3912 comm="syz-executor.3" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=perf_event permissive=1 ================================================================== BUG: KASAN: stack-out-of-bounds in _copy_to_iter+0x48f/0x1420 Read of size 4094 at addr ffff88803e7cfb12 by task syz-executor.5/3929 CPU: 0 PID: 3929 Comm: syz-executor.5 Not tainted 5.19.0-rc6-next-20220712 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 print_report.cold+0x5e/0x5e1 kasan_report+0xb1/0x1b0 kasan_check_range+0x35/0x1b0 memcpy+0x20/0x60 _copy_to_iter+0x48f/0x1420 tty_read+0x29a/0x5d0 generic_file_splice_read+0x187/0x4d0 do_splice_to+0x1bc/0x240 splice_file_to_pipe+0x100/0x120 do_sendfile+0x42a/0x1270 __x64_sys_sendfile64+0x1cd/0x210 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fa1cf75fb19 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:00007fa1cccd5188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007fa1cf872f60 RCX: 00007fa1cf75fb19 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004 RBP: 00007fa1cf7b9f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc5ebf77ff R14: 00007fa1cccd5300 R15: 0000000000022000 The buggy address belongs to stack of task syz-executor.5/3929 and is located at offset 66 in frame: tty_read+0x0/0x5d0 This frame has 2 objects: [32, 40) 'cookie' [64, 128) 'kernel_buf' The buggy address belongs to the physical page: page:000000001023a25a refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3e7cf flags: 0x100000000000000(node=0|zone=1) raw: 0100000000000000 0000000000000000 ffffea0000f9f3c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88803e7cfa00: 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 ffff88803e7cfa80: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 >ffff88803e7cfb00: f2 f2 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 ^ ffff88803e7cfb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 ffff88803e7cfc00: f1 f1 f1 00 00 00 00 00 f2 f2 f2 f2 f2 00 00 00 ================================================================== wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready loop1: detected capacity change from 0 to 40 loop2: detected capacity change from 0 to 40 syz-executor.2: attempt to access beyond end of device loop2: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop2, logical block 10, lost async page write syz-executor.1: attempt to access beyond end of device loop1: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop1, logical block 10, lost async page write loop2: detected capacity change from 0 to 40 syz-executor.2: attempt to access beyond end of device loop2: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop2, logical block 10, lost async page write loop2: detected capacity change from 0 to 40 loop1: detected capacity change from 0 to 40 syz-executor.1: attempt to access beyond end of device loop1: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop1, logical block 10, lost async page write syz-executor.2: attempt to access beyond end of device loop2: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop2, logical block 10, lost async page write loop1: detected capacity change from 0 to 40 syz-executor.1: attempt to access beyond end of device loop1: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop1, logical block 10, lost async page write loop1: detected capacity change from 0 to 40 loop2: detected capacity change from 0 to 40 syz-executor.1: attempt to access beyond end of device loop1: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop1, logical block 10, lost async page write loop5: detected capacity change from 0 to 640 EXT4-fs (loop5): mounted filesystem without journal. Quota mode: writeback. ext4 filesystem being mounted at /syzkaller-testdir498433347/syzkaller.rkb90e/7/file0 supports timestamps until 2038 (0x7fffffff) EXT4-fs (loop5): unmounting filesystem. syz-executor.2: attempt to access beyond end of device loop2: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop2, logical block 10, lost async page write loop2: detected capacity change from 0 to 40 loop1: detected capacity change from 0 to 40 loop5: detected capacity change from 0 to 640 EXT4-fs (loop5): mounted filesystem without journal. Quota mode: writeback. ext4 filesystem being mounted at /syzkaller-testdir498433347/syzkaller.rkb90e/8/file0 supports timestamps until 2038 (0x7fffffff) EXT4-fs (loop5): unmounting filesystem. loop5: detected capacity change from 0 to 640 EXT4-fs (loop5): mounted filesystem without journal. Quota mode: writeback. ext4 filesystem being mounted at /syzkaller-testdir498433347/syzkaller.rkb90e/9/file0 supports timestamps until 2038 (0x7fffffff) EXT4-fs (loop5): unmounting filesystem. syz-executor.2: attempt to access beyond end of device loop2: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop2, logical block 10, lost async page write loop5: detected capacity change from 0 to 640 loop2: detected capacity change from 0 to 40 loop1: detected capacity change from 0 to 40 EXT4-fs (loop5): mounted filesystem without journal. Quota mode: writeback. ext4 filesystem being mounted at /syzkaller-testdir498433347/syzkaller.rkb90e/10/file0 supports timestamps until 2038 (0x7fffffff) syz-executor.1: attempt to access beyond end of device loop1: rw=2049, sector=40, nr_sectors = 4 limit=40 Buffer I/O error on dev loop1, logical block 10, lost async page write EXT4-fs (loop5): unmounting filesystem. random: crng reseeded on system resumption Restarting kernel threads ... done. random: crng reseeded on system resumption Restarting kernel threads ... done. random: crng reseeded on system resumption Restarting kernel threads ... done. random: crng reseeded on system resumption Restarting kernel threads ... done. ieee802154 phy0 wpan0: encryption failed: -22 random: crng reseeded on system resumption Restarting kernel threads ... done. ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy0 wpan0: encryption failed: -22 random: crng reseeded on system resumption Restarting kernel threads ... done. ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy0 wpan0: encryption failed: -22 random: crng reseeded on system resumption Restarting kernel threads ... done. random: crng reseeded on system resumption Restarting kernel threads ... ieee802154 phy0 wpan0: encryption failed: -22 done. ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy0 wpan0: encryption failed: -22