syzbot


KASAN: use-after-free Read in fbcon_cursor

Status: upstream: reported syz repro on 2019/12/15 04:16
Reported-by: syzbot+835180215fcdeedc3384@syzkaller.appspotmail.com
First crash: 1804d, last: 1627d
Fix bisection the fix commit could be any of (bisect log):
  a844dc4c5442 Linux 4.14.158
  4139fb08c05f Linux 4.14.187
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in fbcon_cursor fbdev syz done error 10 1559d 1803d 15/28 fixed on 2020/09/25 01:17
linux-4.19 KASAN: use-after-free Read in fbcon_cursor syz done 4 1544d 1804d 1/1 fixed on 2020/09/30 06:27
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/01/23 17:32 14m retest repro linux-4.14.y report log
2022/09/06 12:27 13m retest repro linux-4.14.y report log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2020/07/08 17:51 32m bisect fix linux-4.14.y OK (2) job log
2020/06/08 17:26 25m bisect fix linux-4.14.y OK (0) job log log
2020/05/09 16:58 27m bisect fix linux-4.14.y OK (0) job log log
2020/02/13 04:58 24m bisect fix linux-4.14.y OK (0) job log log
2020/01/14 04:31 26m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
kobject: 'loop1' (ffff8880a41073e0): kobject_uevent_env
kobject: 'loop1' (ffff8880a41073e0): fill_kobj_path: path = '/devices/virtual/block/loop1'
kobject: 'loop4' (ffff8880a41e2420): kobject_uevent_env
kobject: 'loop4' (ffff8880a41e2420): fill_kobj_path: path = '/devices/virtual/block/loop4'
==================================================================
BUG: KASAN: use-after-free in fbcon_cursor+0x5c6/0x6f0 drivers/video/fbdev/core/fbcon.c:1325
Read of size 2 at addr ffff8880a14f580c by task syz-executor.3/8047

CPU: 1 PID: 8047 Comm: syz-executor.3 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+0x7c/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_load2_noabort+0x14/0x20 mm/kasan/report.c:428
 fbcon_cursor+0x5c6/0x6f0 drivers/video/fbdev/core/fbcon.c:1325
 fbcon_scrolldelta+0x5a4/0x1100 drivers/video/fbdev/core/fbcon.c:2832
 fbcon_set_origin+0x39/0x50 drivers/video/fbdev/core/fbcon.c:2883
 set_origin+0x2d8/0x3c0 drivers/tty/vt/vt.c:613
 vc_do_resize+0x686/0xec0 drivers/tty/vt/vt.c:934
 vc_resize+0x4d/0x60 drivers/tty/vt/vt.c:974
 vt_ioctl+0x1282/0x2170 drivers/tty/vt/vt_ioctl.c:840
 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:0x45a909
RSP: 002b:00007f0b23d9ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a909
RDX: 0000000020000000 RSI: 0000000000005609 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0b23d9b6d4
R13: 00000000004c7009 R14: 00000000004dd670 R15: 00000000ffffffff

Allocated by task 7985:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
 save_stack+0x45/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc mm/kasan/kasan.c:551 [inline]
 kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529
 __do_kmalloc mm/slab.c:3720 [inline]
 __kmalloc+0x15d/0x7a0 mm/slab.c:3729
 kmalloc include/linux/slab.h:493 [inline]
 kzalloc include/linux/slab.h:661 [inline]
 vc_do_resize+0x1da/0xec0 drivers/tty/vt/vt.c:872
 vc_resize+0x4d/0x60 drivers/tty/vt/vt.c:974
 vt_ioctl+0x1282/0x2170 drivers/tty/vt/vt_ioctl.c:840
 tty_ioctl+0x841/0x1320 drivers/tty/tty_io.c:2661
 do

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/15 04:15 linux-4.14.y a844dc4c5442 eef6e580 .config console log report syz ci2-linux-4-14
2020/04/09 16:58 linux-4.14.y 4520f06b03ae a8c6a3f8 .config console log report ci2-linux-4-14
2020/03/11 22:39 linux-4.14.y 12cd844a39ed e103bc9e .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.