syzbot


UBSAN: shift-out-of-bounds in fbcon_set_font

Status: fixed on 2023/06/08 14:41
Subsystems: fbdev
[Documentation on labels]
Reported-by: syzbot+ac877d1de3aa7263e7f4@syzkaller.appspotmail.com
Fix commit: 2b09d5d36498 fbcon: Check font dimension limits
First crash: 653d, last: 649d
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] UBSAN: shift-out-of-bounds in fbcon_set_font 0 (1) 2023/01/29 03:03
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/05/09 19:43 20m retest repro linux-next error

Sample crash report:
================================================================================
UBSAN: shift-out-of-bounds in drivers/video/fbdev/core/fbcon.c:2489:33
shift exponent 38 is too large for 32-bit type 'int'
CPU: 0 PID: 5087 Comm: syz-executor580 Not tainted 6.2.0-rc5-next-20230123-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106
 ubsan_epilogue+0xa/0x31 lib/ubsan.c:151
 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x187 lib/ubsan.c:321
 fbcon_set_font.cold+0x19/0x3c drivers/video/fbdev/core/fbcon.c:2489
 con_font_set drivers/tty/vt/vt.c:4624 [inline]
 con_font_op+0xb52/0xf10 drivers/tty/vt/vt.c:4671
 vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline]
 vt_ioctl+0x620/0x2df0 drivers/tty/vt/vt_ioctl.c:752
 tty_ioctl+0x762/0x1670 drivers/tty/tty_io.c:2777
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fadea3c92c9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffeb231fd88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fadea3c92c9
RDX: 0000000020000040 RSI: 0000000000004b72 RDI: 0000000000000003
RBP: 00007fadea38d0b0 R08: 000000000000000d R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fadea38d140
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
================================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/25 03:14 linux-next 691781f561e9 9dfcf09c .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in fbcon_set_font
2023/01/29 19:41 linux-next e2f86c02fdc9 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in fbcon_set_font
2023/01/25 02:59 linux-next 691781f561e9 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root UBSAN: shift-out-of-bounds in fbcon_set_font
* Struck through repros no longer work on HEAD.