syzbot


BUG: unable to handle kernel NULL pointer dereference in mem16_serial_out

Status: upstream: reported C repro on 2019/12/08 23:15
Reported-by: syzbot+4c7f1a69dfe24c6b3aeb@syzkaller.appspotmail.com
First crash: 1599d, last: 1408d
Fix bisection the fix commit could be any of (bisect log):
  bfb9e5c03076 Linux 4.14.159
  56dfe6252c68 Linux 4.14.188
  
Discussions (1)
Title Replies (including bot) Last reply
[PATCH] serial: 8250: fix NULL pointer dereference in serial8250_do_startup() 4 (5) 2021/05/13 14:24
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 BUG: unable to handle kernel NULL pointer dereference in mem16_serial_out C error 2 1318d 1599d 0/1 upstream: reported C repro on 2019/12/08 23:44
upstream BUG: unable to handle kernel NULL pointer dereference in mem16_serial_out serial C done 4 1588d 1598d 0/26 closed as dup on 2019/12/13 09:05
Last patch testing requests (6)
Created Duration User Patch Repo Result
2023/01/26 20:32 15m retest repro linux-4.14.y report log
2023/01/26 19:32 10m retest repro linux-4.14.y report log
2022/09/08 10:27 13m retest repro linux-4.14.y report log
2022/09/08 09:27 9m retest repro linux-4.14.y report log
2021/04/27 11:47 18m vegard.nossum@oracle.com patch http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master error OK
2021/04/26 16:33 0m vegard.nossum@oracle.com git://repo/address.git commit-hash error OK
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2020/07/17 01:45 32m bisect fix linux-4.14.y job log (2)
2020/06/17 01:21 23m bisect fix linux-4.14.y job log (0) log
2020/05/18 00:55 26m bisect fix linux-4.14.y job log (0) log
2020/04/18 00:31 23m bisect fix linux-4.14.y job log (0) log
2020/03/19 00:05 25m bisect fix linux-4.14.y job log (0) log
2020/02/17 23:41 24m bisect fix linux-4.14.y job log (0) log
2020/01/18 20:24 24m bisect fix linux-4.14.y job log (0) 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(1576772808.464:36): avc:  denied  { map } for  pid=7166 comm="syz-executor990" path="/root/syz-executor990896443" 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: unable to handle kernel NULL pointer dereference at 0000000000000002
IP: writew arch/x86/include/asm/io.h:66 [inline]
IP: mem16_serial_out+0x6c/0x90 drivers/tty/serial/8250/8250_port.c:414
PGD 9f96a067 P4D 9f96a067 PUD a8a6a067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7166 Comm: syz-executor990 Not tainted 4.14.159-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880998de680 task.stack: ffff888095460000
RIP: 0010:writew arch/x86/include/asm/io.h:66 [inline]
RIP: 0010:mem16_serial_out+0x6c/0x90 drivers/tty/serial/8250/8250_port.c:414
RSP: 0018:ffff888095467968 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: 1ffffffff14911c2 RSI: 0000000000000002 RDI: ffffffff8a488e10
RBP: ffff888095467980 R08: ffff8880998de680 R09: ffff8880998def48
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
R13: ffffffff8a488dd0 R14: ffffffff8a488f10 R15: ffff8880a4410ef8
FS:  0000000001526880(0000) GS:ffff8880aed00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000002 CR3: 000000007f2e3000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 serial_out drivers/tty/serial/8250/8250.h:120 [inline]
 serial8250_clear_fifos.part.0+0x3a/0xb0 drivers/tty/serial/8250/8250_port.c:557
 serial8250_clear_fifos drivers/tty/serial/8250/8250_port.c:556 [inline]
 serial8250_do_startup+0x3bb/0x1d20 drivers/tty/serial/8250/8250_port.c:2198
 serial8250_startup+0x5c/0x80 drivers/tty/serial/8250/8250_port.c:2411
 uart_port_startup drivers/tty/serial/serial_core.c:231 [inline]
 uart_startup.part.0+0x2e0/0x710 drivers/tty/serial/serial_core.c:270
 uart_startup drivers/tty/serial/serial_core.c:267 [inline]
 uart_set_info drivers/tty/serial/serial_core.c:1010 [inline]
 uart_set_info_user drivers/tty/serial/serial_core.c:1038 [inline]
 uart_ioctl+0x12e9/0x2600 drivers/tty/serial/serial_core.c:1361
 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:0x440219
RSP: 002b:00007ffee4d30d28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440219
RDX: 0000000020000240 RSI: 000000000000541f RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000401b30 R11: 0000000000000246 R12: 0000000000401aa0
R13: 0000000000401b30 R14: 0000000000000000 R15: 0000000000000000
Code: 0f b6 8d d1 00 00 00 49 8d 7d 40 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 d3 e3 80 3c 02 00 75 19 48 63 db 49 03 5d 40 <66> 44 89 23 5b 41 5c 41 5d 5d c3 e8 d4 54 37 fe eb c2 e8 2d 55 
RIP: writew arch/x86/include/asm/io.h:66 [inline] RSP: ffff888095467968
RIP: mem16_serial_out+0x6c/0x90 drivers/tty/serial/8250/8250_port.c:414 RSP: ffff888095467968
CR2: 0000000000000002
---[ end trace 119d5d25b4f8be82 ]---

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/19 16:29 linux-4.14.y bfb9e5c03076 36650b4b .config console log report syz C ci2-linux-4-14
2019/12/08 23:14 linux-4.14.y a844dc4c5442 1508f453 .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.