syzbot


KASAN: null-ptr-deref Read in insert_char

Status: upstream: reported C repro on 2020/01/09 20:28
Reported-by: syzbot+cef65baabf55554f7e26@syzkaller.appspotmail.com
First crash: 1777d, last: 1627d
Fix bisection the fix commit could be any of (bisect log):
  b0cdffaa546e Linux 4.14.163
  4139fb08c05f Linux 4.14.187
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: null-ptr-deref Read in insert_char serial C done error 12 1650d 1778d 0/28 closed as dup on 2020/08/16 01:43
linux-4.19 KASAN: null-ptr-deref Read in insert_char C done 3 1593d 1788d 1/1 fixed on 2020/08/11 22:51
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/01/23 13:32 13m retest repro linux-4.14.y report log
2022/09/06 08:27 10m retest repro linux-4.14.y report log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2020/07/07 23:27 31m bisect fix linux-4.14.y OK (2) job log
2020/06/07 23:02 24m bisect fix linux-4.14.y OK (0) job log log
2020/05/08 22:36 25m bisect fix linux-4.14.y OK (0) job log log
2020/04/08 22:11 24m bisect fix linux-4.14.y OK (0) job log log
2020/03/09 21:45 25m bisect fix linux-4.14.y OK (0) job log log
2020/02/08 21:16 24m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
audit: type=1400 audit(1578601437.033:36): avc:  denied  { map } for  pid=7239 comm="syz-executor327" path="/root/syz-executor327922673" 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: null-ptr-deref in memmove include/linux/string.h:362 [inline]
BUG: KASAN: null-ptr-deref in scr_memmovew include/linux/vt_buffer.h:68 [inline]
BUG: KASAN: null-ptr-deref in insert_char+0xce/0x290 drivers/tty/vt/vt.c:534
Read of size 4294967294 at addr 0000000000000010 by task syz-executor327/7239

CPU: 1 PID: 7239 Comm: syz-executor327 Not tainted 4.14.163-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
 kasan_report_error mm/kasan/report.c:349 [inline]
 kasan_report mm/kasan/report.c:409 [inline]
 kasan_report.cold+0x127/0x2af mm/kasan/report.c:393
 check_memory_region_inline mm/kasan/kasan.c:260 [inline]
 check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
 memmove+0x24/0x50 mm/kasan/kasan.c:293
 memmove include/linux/string.h:362 [inline]
 scr_memmovew include/linux/vt_buffer.h:68 [inline]
 insert_char+0xce/0x290 drivers/tty/vt/vt.c:534
 csi_at drivers/tty/vt/vt.c:1627 [inline]
 do_con_trol+0x35bd/0x5b40 drivers/tty/vt/vt.c:2074
 do_con_write.part.0+0xcc7/0x1b50 drivers/tty/vt/vt.c:2434
 do_con_write drivers/tty/vt/vt.c:2205 [inline]
 con_write+0x38/0xc0 drivers/tty/vt/vt.c:2787
 process_output_block drivers/tty/n_tty.c:595 [inline]
 n_tty_write+0x38b/0xf20 drivers/tty/n_tty.c:2333
 do_tty_write drivers/tty/tty_io.c:959 [inline]
 tty_write+0x3f6/0x700 drivers/tty/tty_io.c:1043
 __vfs_write+0x105/0x6b0 fs/read_write.c:480
 vfs_write+0x198/0x500 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xfd/0x230 fs/read_write.c:582
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4404f9
RSP: 002b:00007ffc36b28ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004404f9
RDX: 0000000000000078 RSI: 0000000020000000 RDI: 0000000000000004
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401de0
R13: 0000000000401e70 R14: 0000000000000000 R15: 0000000000000000
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/01/09 20:27 linux-4.14.y b0cdffaa546e 4de4e9f0 .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.