syzbot


KASAN: global-out-of-bounds Read in fbcon_resize

Status: fixed on 2020/10/23 18:53
Reported-by: syzbot+c35addc8234a2cff7fd0@syzkaller.appspotmail.com
Fix commit: 76fe92986c5c fbcon: Fix user font detection test at fbcon_resize().
First crash: 1324d, last: 1304d
Fix bisection: fixed by (bisect log) :
commit 76fe92986c5c2fff36d8fb83e86332113b6c1725
Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Thu Sep 10 22:57:06 2020 +0000

  fbcon: Fix user font detection test at fbcon_resize().

  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: global-out-of-bounds Read in fbcon_resize C done 529 1276d 1324d 1/1 fixed on 2020/11/21 10:42
upstream KASAN: global-out-of-bounds Read in fbcon_resize fbdev C error 673 1306d 1338d 15/26 fixed on 2020/10/10 01:52

Sample crash report:
audit: type=1400 audit(1599182638.627:8): avc:  denied  { execmem } for  pid=6469 comm="syz-executor433" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
==================================================================
BUG: KASAN: global-out-of-bounds in fbcon_resize+0x7b5/0x860 drivers/video/fbdev/core/fbcon.c:2167
Read of size 4 at addr ffffffff87cd6258 by task syz-executor433/6475

CPU: 1 PID: 6475 Comm: syz-executor433 Not tainted 4.19.143-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2fe lib/dump_stack.c:118
 print_address_description.cold+0x5/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432
 fbcon_resize+0x7b5/0x860 drivers/video/fbdev/core/fbcon.c:2167
 resize_screen drivers/tty/vt/vt.c:1173 [inline]
 vc_do_resize+0x53e/0x1410 drivers/tty/vt/vt.c:1244
 vt_ioctl+0xb23/0x2580 drivers/tty/vt/vt_ioctl.c:850
 tty_ioctl+0x5b0/0x15c0 drivers/tty/tty_io.c:2669
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x445959
Code: e8 fc b8 02 00 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 0b 12 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fca8681edb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dac38 RCX: 0000000000445959
RDX: 0000000020001740 RSI: 0000000000005609 RDI: 0000000000000004
RBP: 00000000006dac30 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac3c
R13: 00007ffe7f98542f R14: 00007fca8681f9c0 R15: 20c49ba5e353f7cf

The buggy address belongs to the variable:
 font_vga_8x16+0x58/0x60

Memory state around the buggy address:
 ffffffff87cd6100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffff87cd6180: 00 00 00 00 fa fa fa fa 00 fa fa fa fa fa fa fa
>ffffffff87cd6200: 00 00 00 00 00 fa fa fa fa fa fa fa 00 00 00 00
                                                    ^
 ffffffff87cd6280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffff87cd6300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (286):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/04 01:25 linux-4.19.y c37da90efff5 abf9ba4f .config console log report syz C ci2-linux-4-19
2020/09/03 18:14 linux-4.19.y c37da90efff5 abf9ba4f .config console log report syz C ci2-linux-4-19
2020/09/03 22:09 linux-4.19.y c37da90efff5 abf9ba4f .config console log report syz ci2-linux-4-19
2020/09/23 08:22 linux-4.19.y 015e94d0e37b 287cd75a .config console log report info ci2-linux-4-19
2020/09/23 07:16 linux-4.19.y 015e94d0e37b 287cd75a .config console log report info ci2-linux-4-19
2020/09/23 02:25 linux-4.19.y 015e94d0e37b 3e8f6c27 .config console log report info ci2-linux-4-19
2020/09/23 00:31 linux-4.19.y 015e94d0e37b 3e8f6c27 .config console log report info ci2-linux-4-19
2020/09/22 19:58 linux-4.19.y 015e94d0e37b 3e8f6c27 .config console log report info ci2-linux-4-19
2020/09/22 18:11 linux-4.19.y 015e94d0e37b 3e8f6c27 .config console log report info ci2-linux-4-19
2020/09/22 16:34 linux-4.19.y 015e94d0e37b 3e8f6c27 .config console log report info ci2-linux-4-19
2020/09/22 09:41 linux-4.19.y 015e94d0e37b 3e8f6c27 .config console log report info ci2-linux-4-19
2020/09/22 05:46 linux-4.19.y 015e94d0e37b 9e1fa68e .config console log report info ci2-linux-4-19
2020/09/21 21:04 linux-4.19.y 015e94d0e37b 9e1fa68e .config console log report info ci2-linux-4-19
2020/09/21 19:14 linux-4.19.y 015e94d0e37b c81d99c8 .config console log report info ci2-linux-4-19
2020/09/21 16:48 linux-4.19.y 015e94d0e37b c81d99c8 .config console log report info ci2-linux-4-19
2020/09/21 10:48 linux-4.19.y 015e94d0e37b c81d99c8 .config console log report info ci2-linux-4-19
2020/09/21 04:30 linux-4.19.y 015e94d0e37b 9564d2e9 .config console log report info ci2-linux-4-19
2020/09/21 01:33 linux-4.19.y 015e94d0e37b 9564d2e9 .config console log report info ci2-linux-4-19
2020/09/20 14:18 linux-4.19.y 015e94d0e37b 9564d2e9 .config console log report info ci2-linux-4-19
2020/09/20 09:49 linux-4.19.y 015e94d0e37b 53ce8104 .config console log report info ci2-linux-4-19
2020/09/20 07:16 linux-4.19.y 015e94d0e37b 53ce8104 .config console log report info ci2-linux-4-19
2020/09/20 04:07 linux-4.19.y 015e94d0e37b 53ce8104 .config console log report info ci2-linux-4-19
2020/09/20 00:42 linux-4.19.y 015e94d0e37b 53ce8104 .config console log report info ci2-linux-4-19
2020/09/19 13:54 linux-4.19.y 015e94d0e37b 53ce8104 .config console log report info ci2-linux-4-19
2020/09/19 12:03 linux-4.19.y 015e94d0e37b 53ce8104 .config console log report info ci2-linux-4-19
2020/09/19 02:33 linux-4.19.y 015e94d0e37b 53ce8104 .config console log report info ci2-linux-4-19
2020/09/18 18:40 linux-4.19.y 015e94d0e37b 38962c8b .config console log report info ci2-linux-4-19
2020/09/18 10:53 linux-4.19.y 015e94d0e37b 38962c8b .config console log report info ci2-linux-4-19
2020/09/18 09:26 linux-4.19.y 015e94d0e37b 38962c8b .config console log report info ci2-linux-4-19
2020/09/17 22:38 linux-4.19.y 015e94d0e37b 8247808b .config console log report info ci2-linux-4-19
2020/09/17 19:05 linux-4.19.y 015e94d0e37b 8247808b .config console log report info ci2-linux-4-19
2020/09/17 14:20 linux-4.19.y a87f96283793 8247808b .config console log report info ci2-linux-4-19
2020/09/17 05:58 linux-4.19.y a87f96283793 8247808b .config console log report info ci2-linux-4-19
2020/09/17 04:49 linux-4.19.y a87f96283793 8247808b .config console log report info ci2-linux-4-19
2020/09/16 22:34 linux-4.19.y a87f96283793 77507d02 .config console log report info ci2-linux-4-19
2020/09/16 21:13 linux-4.19.y a87f96283793 77507d02 .config console log report info ci2-linux-4-19
2020/09/16 20:11 linux-4.19.y a87f96283793 77507d02 .config console log report info ci2-linux-4-19
2020/09/16 19:02 linux-4.19.y a87f96283793 77507d02 .config console log report info ci2-linux-4-19
2020/09/16 18:54 linux-4.19.y a87f96283793 77507d02 .config console log report info ci2-linux-4-19
2020/09/16 16:26 linux-4.19.y a87f96283793 77507d02 .config console log report info ci2-linux-4-19
2020/09/16 14:39 linux-4.19.y a87f96283793 77507d02 .config console log report info ci2-linux-4-19
2020/09/16 12:26 linux-4.19.y a87f96283793 18d7d030 .config console log report info ci2-linux-4-19
2020/09/16 11:17 linux-4.19.y a87f96283793 18d7d030 .config console log report info ci2-linux-4-19
2020/09/16 10:16 linux-4.19.y a87f96283793 18d7d030 .config console log report info ci2-linux-4-19
2020/09/16 08:46 linux-4.19.y a87f96283793 18d7d030 .config console log report info ci2-linux-4-19
2020/09/16 07:24 linux-4.19.y a87f96283793 18d7d030 .config console log report info ci2-linux-4-19
2020/09/16 04:12 linux-4.19.y a87f96283793 18d7d030 .config console log report info ci2-linux-4-19
2020/09/03 13:08 linux-4.19.y c37da90efff5 abf9ba4f .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.