syzbot


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

Status: upstream: reported C repro on 2019/12/07 22:52
Reported-by: syzbot+d18e3321e4e1384d4441@syzkaller.appspotmail.com
First crash: 1810d, last: 1535d
Fix bisection the fix commit could be any of (bisect log):
  a844dc4c5442 Linux 4.14.158
  56dfe6252c68 Linux 4.14.188
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: global-out-of-bounds Read in fb_pad_aligned_buffer C done 5 1485d 1810d 1/1 fixed on 2020/11/28 11:57
upstream KASAN: global-out-of-bounds Read in fb_pad_aligned_buffer fbdev C done error 12 1503d 1810d 0/28 auto-obsoleted due to no activity on 2022/09/25 23:58
Last patch testing requests (4)
Created Duration User Patch Repo Result
2023/01/31 23:32 12m retest repro linux-4.14.y report log
2023/01/31 17:32 9m retest repro linux-4.14.y report log
2022/09/11 05:27 8m retest repro linux-4.14.y report log
2022/09/11 04:27 8m retest repro linux-4.14.y report log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2020/07/09 13:36 31m bisect fix linux-4.14.y OK (2) job log
2020/05/31 11:11 22m bisect fix linux-4.14.y OK (0) job log log
2020/05/01 10:46 24m bisect fix linux-4.14.y OK (0) job log log
2020/03/06 23:41 24m bisect fix linux-4.14.y OK (0) job log log
2020/02/05 23:15 25m bisect fix linux-4.14.y OK (0) job log log
2020/01/06 22:52 23m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
audit: type=1400 audit(1575758976.688:36): avc:  denied  { map } for  pid=7036 comm="syz-executor540" path="/root/syz-executor540613663" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
==================================================================
BUG: KASAN: global-out-of-bounds in __fb_pad_aligned_buffer include/linux/fb.h:663 [inline]
BUG: KASAN: global-out-of-bounds in fb_pad_aligned_buffer+0x102/0x120 drivers/video/fbdev/core/fbmem.c:122
Read of size 1 at addr ffffffff87064ff6 by task syz-executor540/7036

CPU: 1 PID: 7036 Comm: syz-executor540 Not tainted 4.14.158-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+0x142/0x197 lib/dump_stack.c:58
 print_address_description.cold+0x5/0x1dc mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427
 __fb_pad_aligned_buffer include/linux/fb.h:663 [inline]
 fb_pad_aligned_buffer+0x102/0x120 drivers/video/fbdev/core/fbmem.c:122
 bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:99 [inline]
 bit_putcs+0xbc4/0xdb0 drivers/video/fbdev/core/bitblit.c:185
 fbcon_putcs+0x3c2/0x480 drivers/video/fbdev/core/fbcon.c:1298
 do_update_region+0x3b3/0x650 drivers/tty/vt/vt.c:373
 redraw_screen+0x589/0x7c0 drivers/tty/vt/vt.c:704
 fbcon_do_set_font+0x6d1/0x9a0 drivers/video/fbdev/core/fbcon.c:2561
 fbcon_copy_font+0x12c/0x190 drivers/video/fbdev/core/fbcon.c:2576
 con_font_copy drivers/tty/vt/vt.c:4218 [inline]
 con_font_op+0x5c6/0x1060 drivers/tty/vt/vt.c:4233
 vt_ioctl+0x179f/0x2170 drivers/tty/vt/vt_ioctl.c:979
 tty_ioctl+0x841/0x1320 drivers/tty/tty_io.c:2661
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440269
RSP: 002b:00007ffc87e75d78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440269
RDX: 0000000020000000 RSI: 0000000000004b72 RDI: 0000000000000004
RBP: 00000000006cb018 R08: 000000000000000d R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401b50
R13: 0000000000401be0 R14: 0000000000000000 R15: 0000000000000000

The buggy address belongs to the variable:
 oid_index+0x76/0x9a0

Memory state around the buggy address:
 ffffffff87064e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffff87064f00: 00 00 00 00 00 00 00 00 00 00 00 05 fa fa fa fa
>ffffffff87064f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 fa
                                                             ^
 ffffffff87065000: fa fa fa fa 00 02 fa fa fa fa fa fa 00 01 fa fa
 ffffffff87065080: fa fa fa fa 00 00 02 fa fa fa fa fa 00 03 fa fa
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/07 22:52 linux-4.14.y a844dc4c5442 1508f453 .config console log report syz C ci2-linux-4-14
2020/04/01 10:18 linux-4.14.y 01364dad1d45 a34e2c33 .config console log report syz ci2-linux-4-14
2020/09/08 05:58 linux-4.14.y 2f166cdcf8a9 abf9ba4f .config console log report ci2-linux-4-14
2020/08/17 16:35 linux-4.14.y 14b58326976d 5ce13532 .config console log report ci2-linux-4-14
2020/07/16 12:02 linux-4.14.y b850307b279c b090c643 .config console log report ci2-linux-4-14
2020/06/09 13:36 linux-4.14.y c6db52a88798 092934c1 .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.