syzbot


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

Status: fixed on 2020/11/20 16:27
Reported-by: syzbot+867a43b5e2e7dcd3c77f@syzkaller.appspotmail.com
Fix commit: 0472aa0c36c7 video: fbdev: fix OOB read in vga_8planes_imageblit()
First crash: 1598d, last: 1274d
Fix bisection: fixed by (bisect log) :
commit 0472aa0c36c7bb3756629a3bbc834604167567f7
Author: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Date: Mon Aug 31 10:37:00 2020 +0000

  video: fbdev: fix OOB read in vga_8planes_imageblit()

  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: global-out-of-bounds Read in vga16fb_imageblit C done 1071 1312d 1597d 15/26 fixed on 2020/10/10 01:52
linux-4.19 KASAN: global-out-of-bounds Read in vga16fb_imageblit C error 331 1309d 1598d 0/1 upstream: reported C repro on 2019/12/02 21:13

Sample crash report:
audit: type=1400 audit(1599020069.121:8): avc:  denied  { execmem } for  pid=6351 comm="syz-executor303" 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 vga_8planes_imageblit drivers/video/fbdev/vga16fb.c:1141 [inline]
BUG: KASAN: global-out-of-bounds in vga_imageblit_expand drivers/video/fbdev/vga16fb.c:1204 [inline]
BUG: KASAN: global-out-of-bounds in vga16fb_imageblit+0x1be2/0x2140 drivers/video/fbdev/vga16fb.c:1261
Read of size 2 at addr ffffffff86e8da1e by task syz-executor303/6351

CPU: 0 PID: 6351 Comm: syz-executor303 Not tainted 4.14.195-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x5/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load2_noabort+0x68/0x70 mm/kasan/report.c:428
 vga_8planes_imageblit drivers/video/fbdev/vga16fb.c:1141 [inline]
 vga_imageblit_expand drivers/video/fbdev/vga16fb.c:1204 [inline]
 vga16fb_imageblit+0x1be2/0x2140 drivers/video/fbdev/vga16fb.c:1261
 soft_cursor+0x50a/0xa50 drivers/video/fbdev/core/softcursor.c:74
 bit_cursor+0x1056/0x1620 drivers/video/fbdev/core/bitblit.c:386
 fbcon_cursor+0x4b1/0x6a0 drivers/video/fbdev/core/fbcon.c:1350
 set_cursor drivers/tty/vt/vt.c:603 [inline]
 set_cursor+0x189/0x1e0 drivers/tty/vt/vt.c:594
 redraw_screen+0x57b/0x790 drivers/tty/vt/vt.c:707
 fbcon_modechanged+0x68a/0x980 drivers/video/fbdev/core/fbcon.c:2949
 fbcon_event_notify+0x107/0x1760 drivers/video/fbdev/core/fbcon.c:3302
 notifier_call_chain+0x108/0x1a0 kernel/notifier.c:93
 __blocking_notifier_call_chain kernel/notifier.c:317 [inline]
 __blocking_notifier_call_chain kernel/notifier.c:304 [inline]
 blocking_notifier_call_chain kernel/notifier.c:328 [inline]
 blocking_notifier_call_chain+0x79/0x90 kernel/notifier.c:325
 fb_set_var+0xac5/0xc90 drivers/video/fbdev/core/fbmem.c:1054
 do_fb_ioctl+0x36d/0xa70 drivers/video/fbdev/core/fbmem.c:1127
 fb_ioctl+0xdd/0x130 drivers/video/fbdev/core/fbmem.c:1242
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x4403d9
RSP: 002b:00007ffcc111aa98 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004403d9
RDX: 00000000200001c0 RSI: 0000000000004601 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401be0
R13: 0000000000401c70 R14: 0000000000000000 R15: 0000000000000000

The buggy address belongs to the variable:
 transl_h+0x3e/0x40

Memory state around the buggy address:
 ffffffff86e8d900: 02 fa fa fa fa fa fa fa 00 00 00 00 00 fa fa fa
 ffffffff86e8d980: fa fa fa fa 04 fa fa fa fa fa fa fa 00 00 00 00
>ffffffff86e8da00: fa fa fa fa 00 00 00 00 fa fa fa fa 00 01 fa fa
                            ^
 ffffffff86e8da80: fa fa fa fa 00 00 00 04 fa fa fa fa 00 00 04 fa
 ffffffff86e8db00: fa fa fa fa 00 00 00 00 00 00 02 fa fa fa fa fa
==================================================================

Crashes (723):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/02 04:16 linux-4.14.y d7e78d08fa77 abf9ba4f .config console log report syz C ci2-linux-4-14
2020/09/01 06:52 linux-4.14.y d7e78d08fa77 d5a3ae1f .config console log report syz C ci2-linux-4-14
2020/08/30 03:34 linux-4.14.y d7e78d08fa77 d5a3ae1f .config console log report syz C ci2-linux-4-14
2020/02/09 11:11 linux-4.14.y e0f8b8a65a47 6ece2ea5 .config console log report syz C ci2-linux-4-14
2020/01/15 09:11 linux-4.14.y c04fc6fa5c96 fa12bd3c .config console log report syz C ci2-linux-4-14
2019/12/16 18:00 linux-4.14.y a844dc4c5442 0ae38e44 .config console log report syz C ci2-linux-4-14
2019/12/03 08:49 linux-4.14.y fbc5fe7a54d0 ab342da3 .config console log report syz C ci2-linux-4-14
2019/12/03 06:34 linux-4.14.y fbc5fe7a54d0 ab342da3 .config console log report syz C ci2-linux-4-14
2019/12/02 23:54 linux-4.14.y fbc5fe7a54d0 ab342da3 .config console log report syz C ci2-linux-4-14
2020/07/04 06:23 linux-4.14.y b850307b279c 51095195 .config console log report syz ci2-linux-4-14
2020/10/21 05:39 linux-4.14.y cbfa1702aaf6 ff4a3345 .config console log report info ci2-linux-4-14
2020/10/20 03:23 linux-4.14.y cbfa1702aaf6 ff4a3345 .config console log report info ci2-linux-4-14
2020/10/20 01:30 linux-4.14.y cbfa1702aaf6 ff4a3345 .config console log report info ci2-linux-4-14
2020/10/20 00:53 linux-4.14.y cbfa1702aaf6 ff4a3345 .config console log report info ci2-linux-4-14
2020/10/19 07:35 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/19 05:46 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/18 21:40 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/18 19:39 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/18 15:20 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/18 12:28 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/18 11:24 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/18 02:01 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/17 18:02 linux-4.14.y cbfa1702aaf6 fea47c01 .config console log report info ci2-linux-4-14
2020/10/17 10:27 linux-4.14.y cbfa1702aaf6 6e262c73 .config console log report info ci2-linux-4-14
2020/10/17 03:45 linux-4.14.y cbfa1702aaf6 6e262c73 .config console log report info ci2-linux-4-14
2020/10/16 23:54 linux-4.14.y cbfa1702aaf6 6e262c73 .config console log report info ci2-linux-4-14
2020/10/16 20:48 linux-4.14.y cbfa1702aaf6 6e262c73 .config console log report info ci2-linux-4-14
2020/10/16 09:05 linux-4.14.y cbfa1702aaf6 6e262c73 .config console log report info ci2-linux-4-14
2020/10/16 07:44 linux-4.14.y cbfa1702aaf6 6e262c73 .config console log report info ci2-linux-4-14
2020/10/16 06:26 linux-4.14.y cbfa1702aaf6 6e262c73 .config console log report info ci2-linux-4-14
2020/10/16 04:19 linux-4.14.y cbfa1702aaf6 6e262c73 .config console log report info ci2-linux-4-14
2020/10/15 18:25 linux-4.14.y cbfa1702aaf6 63869021 .config console log report info ci2-linux-4-14
2020/10/15 16:10 linux-4.14.y cbfa1702aaf6 63869021 .config console log report info ci2-linux-4-14
2020/10/15 03:04 linux-4.14.y cbfa1702aaf6 fc7735a2 .config console log report info ci2-linux-4-14
2020/10/14 12:56 linux-4.14.y cbfa1702aaf6 fc7735a2 .config console log report info ci2-linux-4-14
2020/10/14 10:30 linux-4.14.y cbfa1702aaf6 fc7735a2 .config console log report info ci2-linux-4-14
2020/10/14 03:33 linux-4.14.y cbfa1702aaf6 fc7735a2 .config console log report info ci2-linux-4-14
2020/10/14 00:25 linux-4.14.y cbfa1702aaf6 fc7735a2 .config console log report info ci2-linux-4-14
2020/10/13 15:12 linux-4.14.y cbfa1702aaf6 bd69ee0d .config console log report info ci2-linux-4-14
2020/10/12 14:51 linux-4.14.y cbfa1702aaf6 4a77ae0b .config console log report info ci2-linux-4-14
2020/10/12 11:58 linux-4.14.y cbfa1702aaf6 4a77ae0b .config console log report info ci2-linux-4-14
2020/10/11 22:36 linux-4.14.y cbfa1702aaf6 4a77ae0b .config console log report info ci2-linux-4-14
2020/10/11 12:17 linux-4.14.y cbfa1702aaf6 4a77ae0b .config console log report info ci2-linux-4-14
2020/10/11 02:56 linux-4.14.y cbfa1702aaf6 4a77ae0b .config console log report info ci2-linux-4-14
2020/10/10 21:26 linux-4.14.y cbfa1702aaf6 4a77ae0b .config console log report info ci2-linux-4-14
2020/10/10 19:20 linux-4.14.y cbfa1702aaf6 b74c49a6 .config console log report info ci2-linux-4-14
2020/10/10 18:37 linux-4.14.y cbfa1702aaf6 b74c49a6 .config console log report info ci2-linux-4-14
2020/10/10 15:27 linux-4.14.y cbfa1702aaf6 b74c49a6 .config console log report info ci2-linux-4-14
2020/10/10 10:02 linux-4.14.y cbfa1702aaf6 b74c49a6 .config console log report info ci2-linux-4-14
2020/10/10 06:11 linux-4.14.y cbfa1702aaf6 93817d89 .config console log report info ci2-linux-4-14
2020/10/10 04:49 linux-4.14.y cbfa1702aaf6 93817d89 .config console log report info ci2-linux-4-14
2020/10/10 01:37 linux-4.14.y cbfa1702aaf6 93817d89 .config console log report info ci2-linux-4-14
2020/10/10 01:26 linux-4.14.y cbfa1702aaf6 93817d89 .config console log report info ci2-linux-4-14
* Struck through repros no longer work on HEAD.