syzbot


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

Status: fixed on 2021/06/24 08:01
Reported-by: syzbot+ad860af63ebefdb5ee25@syzkaller.appspotmail.com
Fix commit: 8c5ec4a731e1 vt: Fix character height handling with VT_RESIZEX
First crash: 941d, last: 404d

Fix bisection: fixed by (bisect log) :
commit 8c5ec4a731e1e2d9b6906bcde62de57a609a9b86
Author: Maciej W. Rozycki <macro@orcam.me.uk>
Date: Thu May 13 09:51:50 2021 +0000

  vt: Fix character height handling with VT_RESIZEX

similar bugs (8):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: global-out-of-bounds Read in bit_putcs (2) 13 628d 644d 0/22 auto-closed as invalid on 2021/02/09 16:38
linux-4.14 KASAN: global-out-of-bounds Read in bit_putcs C 241 18d 938d 0/1 upstream: reported C repro on 2019/12/07 16:26
upstream KASAN: global-out-of-bounds Read in bit_putcs C done 262 647d 940d 17/22 fixed on 2020/09/25 01:17
linux-4.14 KASAN: slab-out-of-bounds Read in bit_putcs C 95 20d 942d 0/1 upstream: reported C repro on 2019/12/03 16:38
linux-4.19 KASAN: slab-out-of-bounds Read in bit_putcs C inconclusive 138 407d 942d 0/1 upstream: reported C repro on 2019/12/03 12:47
upstream KASAN: use-after-free Read in bit_putcs C 12 640d 860d 17/22 fixed on 2020/11/16 12:12
linux-4.14 KASAN: use-after-free Read in bit_putcs 17 653d 939d 0/1 auto-closed as invalid on 2021/01/15 05:05
linux-4.19 KASAN: use-after-free Read in bit_putcs 18 703d 937d 0/1 auto-closed as invalid on 2020/11/26 07:35

Sample crash report:
==================================================================
BUG: KASAN: global-out-of-bounds in __fb_pad_aligned_buffer include/linux/fb.h:674 [inline]
BUG: KASAN: global-out-of-bounds in bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:96 [inline]
BUG: KASAN: global-out-of-bounds in bit_putcs+0xbaf/0xd10 drivers/video/fbdev/core/bitblit.c:185
Read of size 1 at addr ffffffff88b659ad by task syz-executor071/8126

CPU: 1 PID: 8126 Comm: syz-executor071 Not tainted 4.19.166-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_load1_noabort+0x88/0x90 mm/kasan/report.c:430
 __fb_pad_aligned_buffer include/linux/fb.h:674 [inline]
 bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:96 [inline]
 bit_putcs+0xbaf/0xd10 drivers/video/fbdev/core/bitblit.c:185
 fbcon_putcs+0x336/0x4f0 drivers/video/fbdev/core/fbcon.c:1269
 con_flush drivers/tty/vt/vt.c:2559 [inline]
 do_con_write+0xbcd/0x1d90 drivers/tty/vt/vt.c:2809
 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3145
 process_output_block drivers/tty/n_tty.c:593 [inline]
 n_tty_write+0x3c0/0xff0 drivers/tty/n_tty.c:2331
 do_tty_write drivers/tty/tty_io.c:960 [inline]
 tty_write+0x496/0x810 drivers/tty/tty_io.c:1044
 __vfs_write+0xf7/0x770 fs/read_write.c:485
 vfs_write+0x1f3/0x540 fs/read_write.c:549
 ksys_write+0x12b/0x2a0 fs/read_write.c:599
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4413a9
Code: e8 3c ad 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 1b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcce6d4338 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004413a9
RDX: 0000000000000018 RSI: 0000000020001340 RDI: 0000000000000004
RBP: 0000000000008a24 R08: 00000000004002c8 R09: 00000000004002c8
R10: 00000000004002c8 R11: 0000000000000246 R12: 0000000000402150
R13: 00000000004021e0 R14: 0000000000000000 R15: 0000000000000000

The buggy address belongs to the variable:
 oid_index+0x2ed/0xa60

Memory state around the buggy address:
 ffffffff88b65880: fa fa fa fa 05 fa fa fa fa fa fa fa 00 06 fa fa
 ffffffff88b65900: fa fa fa fa 07 fa fa fa fa fa fa fa 00 01 fa fa
>ffffffff88b65980: fa fa fa fa 00 05 fa fa fa fa fa fa 03 fa fa fa
                                  ^
 ffffffff88b65a00: fa fa fa fa 03 fa fa fa fa fa fa fa 03 fa fa fa
 ffffffff88b65a80: fa fa fa fa 00 07 fa fa fa fa fa fa 00 07 fa fa
==================================================================

Crashes (214):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-19 2021/01/11 10:28 linux-4.19.y 610bdbf6a174 2c1f2513 .config log report syz C
ci2-linux-4-19 2020/12/27 05:54 linux-4.19.y 13d2ce42de8c 821e0b09 .config log report syz C
ci2-linux-4-19 2020/06/06 16:51 linux-4.19.y 4707d8e57273 e6b89e4e .config log report syz C
ci2-linux-4-19 2020/01/11 22:12 linux-4.19.y cb1f9a169a0e 4c04afaa .config log report syz C
ci2-linux-4-19 2020/01/08 19:53 linux-4.19.y 3d40d7117e35 ddc3e859 .config log report syz C
ci2-linux-4-19 2019/12/19 00:33 linux-4.19.y 7d120bf21c05 79b211f7 .config log report syz C
ci2-linux-4-19 2019/12/04 22:21 linux-4.19.y 174651bdf802 b2088328 .config log report syz C
ci2-linux-4-19 2020/07/25 06:36 linux-4.19.y 20b3a3dfdf6c 0a13649c .config log report syz
ci2-linux-4-19 2021/05/24 23:46 linux-4.19.y 1e986fe9ad15 3c7fef33 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/05/23 15:54 linux-4.19.y 1e986fe9ad15 3c7fef33 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/05/15 10:05 linux-4.19.y 3c8c23092588 93f844de .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/05/15 05:10 linux-4.19.y 3c8c23092588 8bdd5343 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/05/10 15:00 linux-4.19.y 3c8c23092588 ca873091 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/05/10 12:42 linux-4.19.y 3c8c23092588 ca873091 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/05/04 00:00 linux-4.19.y 97a8651cadce ad61f371 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/04/19 12:43 linux-4.19.y 2965db2e004c 50f523d7 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/04/18 16:10 linux-4.19.y 2965db2e004c 7e2b734b .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/04/09 15:53 linux-4.19.y b4454811f122 6a81331a .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/04/03 17:08 linux-4.19.y 2034d6f0838e 6a81331a .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/04/01 04:28 linux-4.19.y 2034d6f0838e 6a81331a .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/03/20 18:19 linux-4.19.y 125222814e7b e45f5621 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/03/19 10:59 linux-4.19.y ac3af4beac43 2af9d324 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/03/10 13:32 linux-4.19.y 2cae3e25b706 26967e35 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/03/04 03:13 linux-4.19.y 2d19be4653f5 06ed56cd .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/02/23 09:21 linux-4.19.y 255b58a2b3af fcc6d71b .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/02/22 18:50 linux-4.19.y 255b58a2b3af c26fb06b .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/02/21 13:37 linux-4.19.y 255b58a2b3af 3e5ed8b4 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/02/11 21:06 linux-4.19.y 811218eceeaa a5f86b15 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/02/08 13:38 linux-4.19.y 811218eceeaa 2ce644fc .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/02/03 12:51 linux-4.19.y 811218eceeaa 624dad51 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/02/02 05:55 linux-4.19.y 811218eceeaa e6b95f32 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/02/01 04:11 linux-4.19.y 811218eceeaa fc9fd31e .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/01/31 08:57 linux-4.19.y 811218eceeaa fc9fd31e .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/01/28 21:00 linux-4.19.y c4ff839de17f 7df34f59 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/01/22 20:11 linux-4.19.y 43d555d83c3f 52e37319 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/01/21 07:14 linux-4.19.y 43d555d83c3f d4f4eca5 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/01/17 17:20 linux-4.19.y c110fed0e606 fd103621 .config log report info KASAN: global-out-of-bounds Read in bit_putcs
ci2-linux-4-19 2021/03/28 05:56 linux-4.19.y 78fec1611cbf a8529b82 .config log report info KASAN: use-after-free Read in bit_putcs
ci2-linux-4-19 2021/02/21 17:44 linux-4.19.y 255b58a2b3af a659b3f1 .config log report info KASAN: use-after-free Read in bit_putcs
ci2-linux-4-19 2021/01/17 11:11 linux-4.19.y 675cc038067f 813be542 .config log report info
ci2-linux-4-19 2021/01/05 04:47 linux-4.19.y 3207316b3bee 2a28ff1f .config log report info
ci2-linux-4-19 2021/01/05 00:47 linux-4.19.y 3207316b3bee 2a28ff1f .config log report info
ci2-linux-4-19 2020/12/31 11:29 linux-4.19.y 3207316b3bee 5cc121d6 .config log report info
ci2-linux-4-19 2020/12/30 08:16 linux-4.19.y 13d2ce42de8c 0fa352f2 .config log report info
ci2-linux-4-19 2020/12/27 05:07 linux-4.19.y 13d2ce42de8c 821e0b09 .config log report info
ci2-linux-4-19 2020/12/25 07:01 linux-4.19.y 13d2ce42de8c c2c1d1dd .config log report info
ci2-linux-4-19 2020/12/21 00:11 linux-4.19.y 13d2ce42de8c 04201c06 .config log report info
ci2-linux-4-19 2020/12/19 09:16 linux-4.19.y 13d2ce42de8c 04201c06 .config log report info
ci2-linux-4-19 2020/12/16 04:06 linux-4.19.y 13d2ce42de8c f213e07e .config log report info
ci2-linux-4-19 2020/12/06 20:04 linux-4.19.y daefdc9eb24b c521566d .config log report info
ci2-linux-4-19 2020/12/01 19:08 linux-4.19.y 0c88e405c97e 07bfe8a5 .config log report info
ci2-linux-4-19 2020/12/01 01:26 linux-4.19.y 0c88e405c97e b3a34598 .config log report info
ci2-linux-4-19 2020/11/30 22:14 linux-4.19.y 0c88e405c97e 76831598 .config log report info
ci2-linux-4-19 2020/11/28 07:37 linux-4.19.y 0c88e405c97e 486f93ef .config log report info
ci2-linux-4-19 2020/11/21 00:38 linux-4.19.y 2c746135a12e 68068804 .config log report info