syzbot


KASAN: null-ptr-deref Read in do_con_trol

Status: upstream: reported C repro on 2020/02/15 00:04
Reported-by: syzbot+19b3be1e1d860fcc6f31@syzkaller.appspotmail.com
First crash: 1741d, last: 1621d
Fix bisection the fix commit could be any of (bisect log):
  98db2bf27b9e Linux 4.14.171
  56dfe6252c68 Linux 4.14.188
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: null-ptr-deref Read in do_con_trol C done 1 1592d 1742d 1/1 fixed on 2020/08/12 22:58
upstream KASAN: null-ptr-deref Read in do_con_trol serial C done error 6 1679d 1743d 0/28 closed as dup on 2020/07/20 22:49
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/01/26 05:32 10m retest repro linux-4.14.y report log
2022/09/08 02:27 8m retest repro linux-4.14.y report log
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2020/07/14 05:36 31m bisect fix linux-4.14.y OK (2) job log
2020/06/14 05:12 24m bisect fix linux-4.14.y OK (0) job log log
2020/05/15 04:44 28m bisect fix linux-4.14.y OK (0) job log log
2020/04/15 04:20 24m bisect fix linux-4.14.y OK (0) job log log
2020/03/16 03:55 24m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
audit: type=1400 audit(1581724839.850:36): avc:  denied  { map } for  pid=7271 comm="syz-executor966" path="/root/syz-executor966765308" dev="sda1" ino=16484 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 memcpy include/linux/string.h:347 [inline]
BUG: KASAN: null-ptr-deref in scr_memcpyw include/linux/vt_buffer.h:49 [inline]
BUG: KASAN: null-ptr-deref in delete_char drivers/tty/vt/vt.c:546 [inline]
BUG: KASAN: null-ptr-deref in csi_P drivers/tty/vt/vt.c:1648 [inline]
BUG: KASAN: null-ptr-deref in do_con_trol+0x3188/0x5b40 drivers/tty/vt/vt.c:2022
Read of size 4294967294 at addr 0000000000000012 by task syz-executor966/7271

CPU: 1 PID: 7271 Comm: syz-executor966 Not tainted 4.14.171-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
 memcpy+0x24/0x50 mm/kasan/kasan.c:302
 memcpy include/linux/string.h:347 [inline]
 scr_memcpyw include/linux/vt_buffer.h:49 [inline]
 delete_char drivers/tty/vt/vt.c:546 [inline]
 csi_P drivers/tty/vt/vt.c:1648 [inline]
 do_con_trol+0x3188/0x5b40 drivers/tty/vt/vt.c:2022
 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:00007ffd13d27c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004404f9
RDX: 0000000000000078 RSI: 0000000020000140 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/02/15 00:03 linux-4.14.y 98db2bf27b9e 5d7b90f1 .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.