panic: kernel diagnostic assertion "cmd != NULL" failed: file "/syzkaller/jobs/openbsd/kernel/sys/dev/ic/pckbc.c", line 790 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 229026 48338 0 0 0 1 syz-executor.0 *373008 48338 0 0 0x4000000 0K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 __assert(ffffffff81f9f588,ffffffff81f5c29c,316,ffffffff81f7a536) at __assert+0x2e sys/kern/subr_prf.c:159 pckbc_start(ffff800000026e00,1) at pckbc_start+0x2e3 sys/dev/ic/pckbc.c:790 pckbc_enqueue_cmd(ffff800000026e00,1,ffff800020c42c2e,2,0,1) at pckbc_enqueue_cmd+0x25a sys/dev/ic/pckbc.c:920 pms_ioctl_mouse(ffff80000066c200,80045721,ffff800020c42fd0,42,ffff800020b38270) at pms_ioctl_mouse+0x137 wsmouse_do_ioctl(ffff80000064dc00,80045721,ffff800020c42fd0,42,ffff800020b38270) at wsmouse_do_ioctl+0x2e3 sys/dev/wscons/wsmouse.c:527 wsmousedoioctl(ffff80000064dc00,80045721,ffff800020c42fd0,42,ffff800020b38270) at wsmousedoioctl+0x51 sys/dev/wscons/wsmouse.c:429 wsmux_do_ioctl(ffff800000026d00,80045721,ffff800020c42fd0,42,ffff800020b38270) at wsmux_do_ioctl+0x5b3 sys/dev/wscons/wsmux.c:546 VOP_IOCTL(fffffd8069345770,80045721,ffff800020c42fd0,42,fffffd807f7c69c0,ffff800020b38270) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8068f4e7d0,80045721,ffff800020c42fd0,ffff800020b38270) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b38270,ffff800020c430f8,ffff800020c43160) at sys_ioctl+0x5b8 syscall(ffff800020c431d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c431d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff39,0,3,7fcb8d90d8) at Xsyscall+0x128 end of kernel end trace frame: 0x82908cefc0, count: 1 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic kernel diagnostic assertion "cmd != NULL" failed: file "/syzkaller/jobs/openbsd/kernel/sys/dev/ic/pckbc.c", line 790 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 __assert(ffffffff81f9f588,ffffffff81f5c29c,316,ffffffff81f7a536) at __assert+0x2e sys/kern/subr_prf.c:159 pckbc_start(ffff800000026e00,1) at pckbc_start+0x2e3 sys/dev/ic/pckbc.c:790 pckbc_enqueue_cmd(ffff800000026e00,1,ffff800020c42c2e,2,0,1) at pckbc_enqueue_cmd+0x25a sys/dev/ic/pckbc.c:920 pms_ioctl_mouse(ffff80000066c200,80045721,ffff800020c42fd0,42,ffff800020b38270) at pms_ioctl_mouse+0x137 wsmouse_do_ioctl(ffff80000064dc00,80045721,ffff800020c42fd0,42,ffff800020b38270) at wsmouse_do_ioctl+0x2e3 sys/dev/wscons/wsmouse.c:527 wsmousedoioctl(ffff80000064dc00,80045721,ffff800020c42fd0,42,ffff800020b38270) at wsmousedoioctl+0x51 sys/dev/wscons/wsmouse.c:429 wsmux_do_ioctl(ffff800000026d00,80045721,ffff800020c42fd0,42,ffff800020b38270) at wsmux_do_ioctl+0x5b3 sys/dev/wscons/wsmux.c:546 VOP_IOCTL(fffffd8069345770,80045721,ffff800020c42fd0,42,fffffd807f7c69c0,ffff800020b38270) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8068f4e7d0,80045721,ffff800020c42fd0,ffff800020b38270) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b38270,ffff800020c430f8,ffff800020c43160) at sys_ioctl+0x5b8 syscall(ffff800020c431d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c431d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff39,0,3,7fcb8d90d8) at Xsyscall+0x128 end of kernel end trace frame: 0x82908cefc0, count: -14 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c42a30 rbx 0xffff800020c42ae0 rdx 0xffff800020b38270 rcx 0 rax 0 r8 0xffffffff8114f173 kprintf+0x173 r9 0x1 r10 0x25 r11 0x9bbc2d7a1bcfca43 r12 0x3000000008 r13 0xffff800020c42a40 r14 0x100 r15 0x1 rip 0xffffffff819db7c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c42a20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=373008 stat=onproc flags process=0 proc=4000000 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b38018,0xffffffff8238a678 process=0xffff800020b8c018 user=0xffff800020c3e000, vmspace=0xfffffd806e7e2440 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 48338 229026 42146 0 7 0 syz-executor.0 48338 36281 42146 0 3 0x4000080 fsleep syz-executor.0 *48338 373008 42146 0 7 0x4000000 syz-executor.0 29438 442166 89523 0 3 0x82 nanosleep syz-executor.1 42146 181938 89523 0 3 0x82 nanosleep syz-executor.0 89523 12984 7641 0 3 0x82 thrsleep syz-execprog 89523 427735 7641 0 3 0x4000082 thrsleep syz-execprog 89523 483812 7641 0 3 0x4000082 thrsleep syz-execprog 89523 315113 7641 0 3 0x4000082 thrsleep syz-execprog 89523 473437 7641 0 3 0x4000082 thrsleep syz-execprog 89523 17176 7641 0 3 0x4000082 thrsleep syz-execprog 89523 455033 7641 0 3 0x4000082 thrsleep syz-execprog 89523 340498 7641 0 3 0x4000082 thrsleep syz-execprog 89523 154335 7641 0 3 0x4000082 kqread syz-execprog 7641 453599 40514 0 3 0x10008a pause ksh 40514 228479 4009 0 3 0x92 select sshd 38586 335452 1 0 3 0x100083 ttyin getty 4009 68036 1 0 3 0x80 select sshd 24725 40700 31916 74 3 0x100092 bpf pflogd 31916 70617 1 0 3 0x80 netio pflogd 97948 250626 22270 73 3 0x100090 kqread syslogd 22270 48630 1 0 3 0x100082 netio syslogd 54264 200322 1 77 3 0x100090 poll dhclient 97183 207439 1 0 3 0x80 poll dhclient 15282 97497 0 0 2 0x14200 zerothread 48979 190405 0 0 3 0x14200 aiodoned aiodoned 18656 280245 0 0 3 0x14200 syncer update 13773 338294 0 0 3 0x14200 cleaner cleaner 79689 512581 0 0 3 0x14200 reaper reaper 31327 137724 0 0 3 0x14200 pgdaemon pagedaemon 71712 200341 0 0 3 0x14200 bored crynlk 21340 348574 0 0 3 0x14200 bored crypto 73353 365911 0 0 3 0x40014200 acpi0 acpi0 75375 406758 0 0 3 0x40014200 idle1 76203 479889 0 0 3 0x14200 bored softnet 71389 498542 0 0 3 0x14200 bored systqmp 78180 387374 0 0 3 0x14200 bored systq 24254 305252 0 0 3 0x40014200 bored softclock 98842 428796 0 0 3 0x40014200 idle0 18400 313325 0 0 3 0x14200 bored smr 1 428965 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 48338 (syz-executor.0) thread 0xffff800020b38270 (373008) shared rwlock wsmuxlk r = 0 (0xffff800000026dd0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 wsmux_do_ioctl+0x521 #2 VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 #3 vn_ioctl+0xb6 sys/kern/vfs_vnops.c:512 #4 sys_ioctl+0x5b8 #5 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #5 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #6 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823802e0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 syscall+0x43a mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x43a sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9461 6395K 6395K 78643K 10548 0 0 pcb 25 9K 9K 78643K 73 0 0 rtable 105 3K 3K 78643K 201 0 0 ifaddr 38 10K 10K 78643K 39 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1469 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1193 75K 75K 78643K 1259 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 2 0K 0K 78643K 2 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 12K 24K 78643K 76 0 0 proc 52 50K 83K 78643K 359 0 0 subproc 0 0K 1K 78643K 17 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 in_multi 33 2K 2K 78643K 33 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 18 79K 79K 78643K 18 0 0 exec 0 0K 1K 78643K 230 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 82 20K 20K 78643K 1317 0 0 UVM aobj 2 2K 2K 78643K 2 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 6 0K 0K 78643K 10 0 0 temp 55 2714K 2778K 78643K 3542 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 0 1 0 1 1 0 8 0 inpcbpl 280 43 0 37 1 0 1 1 0 8 0 plimitpl 152 20 0 12 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 syncache 264 8 0 8 2 1 1 1 0 8 1 tcpcb 544 14 0 11 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 15 0 2 1 0 1 1 0 8 0 pfstkey 112 15 0 2 1 0 1 1 0 8 0 pfstate 328 15 0 2 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1592 0 165 47 0 47 47 0 8 0 ffsino 272 1592 0 165 96 0 96 96 0 8 0 nchpl 144 1874 0 231 62 1 61 61 0 8 0 uvmvnodes 72 1619 0 0 30 0 30 30 0 8 0 vnodes 200 1619 0 0 86 0 86 86 0 8 0 namei 1024 5543 0 5543 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 5012 0 5012 7 6 1 6 0 8 1 sigapl 432 298 0 283 3 0 3 3 0 8 1 futexpl 56 219 0 218 2 1 1 1 0 8 0 knotepl 112 107 0 90 1 0 1 1 0 8 0 kqueuepl 104 3 0 1 1 0 1 1 0 8 0 pipepl 112 226 0 207 2 1 1 1 0 8 0 fdescpl 488 299 0 283 5 2 3 3 0 8 0 filepl 152 1551 0 1483 4 1 3 3 0 8 0 lockfpl 104 156 0 154 2 1 1 1 0 8 0 lockfspl 48 41 0 40 2 1 1 1 0 8 0 sessionpl 112 27 0 16 1 0 1 1 0 8 0 pgrppl 48 27 0 16 1 0 1 1 0 8 0 ucredpl 96 73 0 64 1 0 1 1 0 8 0 zombiepl 144 283 0 282 2 1 1 1 0 8 0 processpl 840 314 0 282 4 0 4 4 0 8 0 procpl 600 400 0 358 4 0 4 4 0 8 0 sockpl 384 103 0 85 4 1 3 3 0 8 1 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 88 0 0 10 0 10 10 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 154 0 0 9 0 9 9 0 8 0 bufpl 256 6036 0 1188 303 0 303 303 0 8 0 anonpl 16 33767 0 32102 19 6 13 13 0 125 5 amapchunkpl 152 1315 0 1242 7 2 5 5 0 158 1 amappl16 192 364 0 323 4 1 3 3 0 8 0 amappl15 184 9 0 8 2 1 1 1 0 8 0 amappl14 176 55 0 52 2 1 1 1 0 8 0 amappl13 168 8 0 7 1 0 1 1 0 8 0 amappl12 160 29 0 28 1 0 1 1 0 8 0 amappl11 152 84 0 66 1 0 1 1 0 8 0 amappl10 144 112 0 107 1 0 1 1 0 8 0 amappl9 136 842 0 838 1 0 1 1 0 8 0 amappl8 128 190 0 178 1 0 1 1 0 8 0 amappl7 120 64 0 58 1 0 1 1 0 8 0 amappl6 112 80 0 74 1 0 1 1 0 8 0 amappl5 104 162 0 149 1 0 1 1 0 8 0 amappl4 96 545 0 521 2 1 1 2 0 8 0 amappl3 88 247 0 236 1 0 1 1 0 8 0 amappl2 80 1463 0 1390 4 1 3 3 0 8 1 amappl1 72 18122 0 17682 30 12 18 20 0 8 8 amappl 80 706 0 672 1 0 1 1 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 1 0 0 1 0 1 1 0 8 0 uaddrrnd 24 299 0 283 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 299 0 283 1 0 1 1 0 8 0 vmmpekpl 168 9261 0 9237 2 0 2 2 0 8 0 vmmpepl 168 42182 0 41160 90 13 77 78 0 357 30 vmsppl 360 298 0 283 2 0 2 2 0 8 0 pdppl 4096 606 0 566 8 2 6 6 0 8 0 pvpl 32 159222 0 155017 114 6 108 108 0 265 71 pmappl 232 298 0 283 2 0 2 2 0 8 1 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 450 0 6 13 0 13 13 0 8 0