================================================================== BUG: KASAN: stack-out-of-bounds in sys_imageblit+0x1b4a/0x1ee0 Write of size 4 at addr ffffc900043d7d60 by task syz-executor.0/2790 CPU: 0 PID: 2790 Comm: syz-executor.0 Not tainted 6.0.0-rc3-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: dump_stack_lvl+0x14f/0x1be print_report.cold+0x59/0x6e9 kasan_report+0xb1/0x1e0 sys_imageblit+0x1b4a/0x1ee0 drm_fbdev_fb_imageblit+0x15c/0x350 bit_putcs+0x6e1/0xd20 fbcon_putcs+0x30e/0x3e0 do_update_region+0x399/0x630 invert_screen+0x1d4/0x600 clear_selection+0x55/0x70 vc_do_resize+0xe61/0x1170 fbcon_do_set_font+0x490/0x950 fbcon_set_font+0x7db/0x960 con_font_op+0x75b/0xcc0 vt_ioctl+0x1e9f/0x29e0 tty_ioctl+0xfab/0x15d0 __x64_sys_ioctl+0x193/0x200 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x464319 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:00007ff4c3641198 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000464319 RDX: 0000000020000080 RSI: 0000000000004b72 RDI: 0000000000000003 RBP: 00000000004fffa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000055bf00 R13: 00007ff4c36416bc R14: 00000000ffffffff R15: 0000000000000003 The buggy address belongs to the virtual mapping at [ffffc900043d0000, ffffc900043d9000) created by: kernel_clone+0xe7/0xab0 The buggy address belongs to the physical page: page:000000002e5c7bbf refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2a4a5 flags: 0xfffe0000000000(node=0|zone=1|lastcpupid=0x3fff) raw: 00fffe0000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffffc900043d7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900043d7c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900043d7d00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ^ ffffc900043d7d80: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900043d7e00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ================================================================== BUG: unable to handle page fault for address: ffffc900043d8000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD e000067 P4D e000067 PUD e205067 PMD 1bb4b067 PTE 0 Oops: 0002 [#1] PREEMPT SMP KASAN CPU: 0 PID: 2790 Comm: syz-executor.0 Tainted: G B 6.0.0-rc3-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 RIP: 0010:sys_imageblit+0x14d9/0x1ee0 Code: 00 4c 89 ea 46 8b a4 a4 d8 00 00 00 48 c1 ea 03 42 0f b6 0c 32 4c 89 ea 83 e2 07 83 c2 03 38 ca 7c 08 84 c9 0f 85 69 06 00 00 <45> 89 65 00 45 0f b6 27 41 c0 fc 06 45 0f be e4 41 21 ec 4a 8d 3c RSP: 0018:ffffc900043f7260 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffffc900043f7338 RCX: ffffffff8402c89a RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc900043d8000 RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000007 R10: 0000000000000400 R11: 0000000000000001 R12: 0000000000000000 R13: ffffc900043d8000 R14: dffffc0000000000 R15: ffff888018a7857a FS: 00007ff4c3641700(0000) GS:ffff88806be00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc900043d8000 CR3: 0000000029226001 CR4: 0000000000170ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: drm_fbdev_fb_imageblit+0x15c/0x350 bit_putcs+0x6e1/0xd20 fbcon_putcs+0x30e/0x3e0 do_update_region+0x399/0x630 invert_screen+0x1d4/0x600 clear_selection+0x55/0x70 vc_do_resize+0xe61/0x1170 fbcon_do_set_font+0x490/0x950 fbcon_set_font+0x7db/0x960 con_font_op+0x75b/0xcc0 vt_ioctl+0x1e9f/0x29e0 tty_ioctl+0xfab/0x15d0 __x64_sys_ioctl+0x193/0x200 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x464319 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:00007ff4c3641198 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000464319 RDX: 0000000020000080 RSI: 0000000000004b72 RDI: 0000000000000003 RBP: 00000000004fffa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000055bf00 R13: 00007ff4c36416bc R14: 00000000ffffffff R15: 0000000000000003 Modules linked in: CR2: ffffc900043d8000 ---[ end trace 0000000000000000 ]--- RIP: 0010:sys_imageblit+0x14d9/0x1ee0 Code: 00 4c 89 ea 46 8b a4 a4 d8 00 00 00 48 c1 ea 03 42 0f b6 0c 32 4c 89 ea 83 e2 07 83 c2 03 38 ca 7c 08 84 c9 0f 85 69 06 00 00 <45> 89 65 00 45 0f b6 27 41 c0 fc 06 45 0f be e4 41 21 ec 4a 8d 3c RSP: 0018:ffffc900043f7260 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffffc900043f7338 RCX: ffffffff8402c89a RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc900043d8000 RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000007 R10: 0000000000000400 R11: 0000000000000001 R12: 0000000000000000 R13: ffffc900043d8000 R14: dffffc0000000000 R15: ffff888018a7857a FS: 00007ff4c3641700(0000) GS:ffff88806be00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc900043d8000 CR3: 0000000029226001 CR4: 0000000000170ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 00 4c 89 ea add %cl,-0x16(%rcx,%rcx,4) 4: 46 8b a4 a4 d8 00 00 mov 0xd8(%rsp,%r12,4),%r12d b: 00 c: 48 c1 ea 03 shr $0x3,%rdx 10: 42 0f b6 0c 32 movzbl (%rdx,%r14,1),%ecx 15: 4c 89 ea mov %r13,%rdx 18: 83 e2 07 and $0x7,%edx 1b: 83 c2 03 add $0x3,%edx 1e: 38 ca cmp %cl,%dl 20: 7c 08 jl 0x2a 22: 84 c9 test %cl,%cl 24: 0f 85 69 06 00 00 jne 0x693 * 2a: 45 89 65 00 mov %r12d,0x0(%r13) <-- trapping instruction 2e: 45 0f b6 27 movzbl (%r15),%r12d 32: 41 c0 fc 06 sar $0x6,%r12b 36: 45 0f be e4 movsbl %r12b,%r12d 3a: 41 21 ec and %ebp,%r12d 3d: 4a rex.WX 3e: 8d .byte 0x8d 3f: 3c .byte 0x3c