panic: kernel diagnostic assertion "cmd != NULL" failed: file "/syzkaller/jobs/openbsd/kernel/sys/dev/ic/pckbc.c", line 794 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 522266 77852 0 0 0 1 syz-executor.1 *242183 77852 0 0 0x4000000 0K syz-executor.1 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(ffffffff81f9dc0b,ffffffff81f5c19b,31a,ffffffff81f7a0da) at __assert+0x2e sys/kern/subr_prf.c:159 pckbc_start(ffff800000026e00,1) at pckbc_start+0x2e8 sys/dev/ic/pckbc.c:794 pckbc_enqueue_cmd(ffff800000026e00,1,ffff800020c4136e,2,0,1) at pckbc_enqueue_cmd+0x25a sys/dev/ic/pckbc.c:925 pms_ioctl_mouse(ffff80000066c200,80045721,ffff800020c41710,42,ffff800020b38e28) at pms_ioctl_mouse+0x137 wsmouse_do_ioctl(ffff80000064dc00,80045721,ffff800020c41710,42,ffff800020b38e28) at wsmouse_do_ioctl+0x2e3 sys/dev/wscons/wsmouse.c:527 wsmousedoioctl(ffff80000064dc00,80045721,ffff800020c41710,42,ffff800020b38e28) at wsmousedoioctl+0x51 sys/dev/wscons/wsmouse.c:429 wsmux_do_ioctl(ffff800000026d00,80045721,ffff800020c41710,42,ffff800020b38e28) at wsmux_do_ioctl+0x5b3 sys/dev/wscons/wsmux.c:546 VOP_IOCTL(fffffd806852f170,80045721,ffff800020c41710,42,fffffd807f7c68a0,ffff800020b38e28) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806fdb5440,80045721,ffff800020c41710,ffff800020b38e28) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b38e28,ffff800020c41838,ffff800020c418a0) at sys_ioctl+0x5b8 syscall(ffff800020c41910) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c41910) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff39,0,3,c6798f9c0d8) at Xsyscall+0x128 end of kernel end trace frame: 0xc6a2552d590, 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 794 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(ffffffff81f9dc0b,ffffffff81f5c19b,31a,ffffffff81f7a0da) at __assert+0x2e sys/kern/subr_prf.c:159 pckbc_start(ffff800000026e00,1) at pckbc_start+0x2e8 sys/dev/ic/pckbc.c:794 pckbc_enqueue_cmd(ffff800000026e00,1,ffff800020c4136e,2,0,1) at pckbc_enqueue_cmd+0x25a sys/dev/ic/pckbc.c:925 pms_ioctl_mouse(ffff80000066c200,80045721,ffff800020c41710,42,ffff800020b38e28) at pms_ioctl_mouse+0x137 wsmouse_do_ioctl(ffff80000064dc00,80045721,ffff800020c41710,42,ffff800020b38e28) at wsmouse_do_ioctl+0x2e3 sys/dev/wscons/wsmouse.c:527 wsmousedoioctl(ffff80000064dc00,80045721,ffff800020c41710,42,ffff800020b38e28) at wsmousedoioctl+0x51 sys/dev/wscons/wsmouse.c:429 wsmux_do_ioctl(ffff800000026d00,80045721,ffff800020c41710,42,ffff800020b38e28) at wsmux_do_ioctl+0x5b3 sys/dev/wscons/wsmux.c:546 VOP_IOCTL(fffffd806852f170,80045721,ffff800020c41710,42,fffffd807f7c68a0,ffff800020b38e28) at VOP_IOCTL+0x88 sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806fdb5440,80045721,ffff800020c41710,ffff800020b38e28) at vn_ioctl+0xb6 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b38e28,ffff800020c41838,ffff800020c418a0) at sys_ioctl+0x5b8 syscall(ffff800020c41910) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c41910) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff39,0,3,c6798f9c0d8) at Xsyscall+0x128 end of kernel end trace frame: 0xc6a2552d590, count: -14 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c41170 rbx 0xffff800020c41220 rdx 0xffff800020b38e28 rcx 0 rax 0 r8 0xffffffff817645e3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x775288b39ed5715 r12 0x3000000008 r13 0xffff800020c41180 r14 0x100 r15 0x1 rip 0xffffffff81138968 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c41160 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=242183 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b39530,0xffffffff82355700 process=0xffff800020b8c018 user=0xffff800020c3c000, vmspace=0xfffffd806e7d7e18 estcpu=36, cpticks=15, pctcpu=0.0 user=0, sys=15, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 77852 522266 96671 0 7 0 syz-executor.1 77852 436406 96671 0 2 0x4000080 syz-executor.1 *77852 242183 96671 0 7 0x4000000 syz-executor.1 96671 397795 18444 0 3 0x82 nanosleep syz-executor.1 66629 270766 18444 0 3 0x82 nanosleep syz-executor.0 18444 15747 23385 0 3 0x82 thrsleep syz-execprog 18444 231441 23385 0 3 0x4000082 thrsleep syz-execprog 18444 408244 23385 0 3 0x4000082 thrsleep syz-execprog 18444 240014 23385 0 3 0x4000082 kqread syz-execprog 18444 407454 23385 0 3 0x4000082 thrsleep syz-execprog 18444 379241 23385 0 3 0x4000082 thrsleep syz-execprog 18444 334496 23385 0 3 0x4000082 thrsleep syz-execprog 18444 328220 23385 0 3 0x4000082 thrsleep syz-execprog 18444 438902 23385 0 3 0x4000082 thrsleep syz-execprog 18444 196899 23385 0 3 0x4000082 thrsleep syz-execprog 23385 96749 44664 0 3 0x10008a pause ksh 44664 58157 25142 0 3 0x92 select sshd 78405 407017 1 0 3 0x100083 ttyin getty 25142 441026 1 0 3 0x80 select sshd 199 158009 34222 74 3 0x100092 bpf pflogd 34222 4472 1 0 3 0x80 netio pflogd 8098 470343 64502 73 2 0x100090 syslogd 64502 42712 1 0 3 0x100082 netio syslogd 78643 437138 1 77 3 0x100090 poll dhclient 42432 245065 1 0 3 0x80 poll dhclient 86090 295179 0 0 3 0x14200 pgzero zerothread 47818 406645 0 0 3 0x14200 aiodoned aiodoned 47104 24198 0 0 3 0x14200 syncer update 19181 327883 0 0 3 0x14200 cleaner cleaner 88811 66106 0 0 3 0x14200 reaper reaper 31635 150283 0 0 3 0x14200 pgdaemon pagedaemon 12201 143702 0 0 3 0x14200 bored crynlk 22305 66411 0 0 3 0x14200 bored crypto 5944 387425 0 0 3 0x40014200 acpi0 acpi0 52652 357581 0 0 3 0x40014200 idle1 11350 521639 0 0 3 0x14200 bored softnet 73894 446821 0 0 3 0x14200 bored systqmp 40894 334529 0 0 3 0x14200 bored systq 97544 409964 0 0 3 0x40014200 bored softclock 70286 49166 0 0 3 0x40014200 idle0 71491 253151 0 0 3 0x14200 bored smr 1 302998 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 77852 (syz-executor.1) thread 0xffff800020b38e28 (242183) 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 (0xffffffff8237b060) #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 2688 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 5 13K 25K 78643K 1037 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 79 20K 20K 78643K 4073 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 5462 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 36 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 1 1 0 1 0 8 0 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 544 14 0 10 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 5 1 0 1 1 0 8 0 pfstkey 112 15 0 5 1 0 1 1 0 8 0 pfstate 328 15 0 5 2 0 2 2 0 8 1 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 4941 0 3514 47 0 47 47 0 8 0 ffsino 272 4941 0 3514 96 0 96 96 0 8 0 nchpl 144 6163 0 4520 62 1 61 61 0 8 0 uvmvnodes 72 4968 0 0 91 0 91 91 0 8 0 vnodes 200 4968 0 0 262 0 262 262 0 8 0 namei 1024 16280 0 16280 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 13678 0 13678 8 7 1 6 0 8 1 sigapl 432 1258 0 1243 3 1 2 3 0 8 0 futexpl 56 4873 0 4873 2 1 1 1 0 8 1 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 1259 0 1243 3 0 3 3 0 8 0 filepl 152 5568 0 5500 4 1 3 3 0 8 0 lockfpl 104 3978 0 3976 2 1 1 1 0 8 0 lockfspl 48 1001 0 1000 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 1243 0 1242 2 1 1 1 0 8 0 processpl 840 1274 0 1242 4 0 4 4 0 8 0 procpl 600 3193 0 3150 4 0 4 4 0 8 0 sockpl 384 103 0 84 3 0 3 3 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 97 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 152 0 0 9 0 9 9 0 8 0 bufpl 256 6997 0 1188 364 0 364 364 0 8 0 anonpl 16 86844 0 84379 20 9 11 13 0 125 0 amapchunkpl 152 6032 0 5952 9 5 4 6 0 158 0 amappl16 192 4493 0 4405 6 1 5 5 0 8 0 amappl15 184 2 0 2 1 1 0 1 0 8 0 amappl14 176 60 0 55 2 1 1 1 0 8 0 amappl13 168 1002 0 999 2 1 1 1 0 8 0 amappl12 160 19 0 19 1 1 0 1 0 8 0 amappl11 152 97 0 79 1 0 1 1 0 8 0 amappl10 144 98 0 96 1 0 1 1 0 8 0 amappl9 136 819 0 813 1 0 1 1 0 8 0 amappl8 128 176 0 163 1 0 1 1 0 8 0 amappl7 120 47 0 45 1 0 1 1 0 8 0 amappl6 112 85 0 79 1 0 1 1 0 8 0 amappl5 104 186 0 173 1 0 1 1 0 8 0 amappl4 96 2002 0 1980 1 0 1 1 0 8 0 amappl3 88 247 0 237 1 0 1 1 0 8 0 amappl2 80 9641 0 9567 4 2 2 3 0 8 0 amappl1 72 36173 0 35728 30 20 10 20 0 8 0 amappl 80 3467 0 3433 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 1259 0 1243 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1259 0 1243 1 0 1 1 0 8 0 vmmpekpl 168 14969 0 14947 2 0 2 2 0 8 0 vmmpepl 168 119206 0 118126 94 35 59 77 0 357 9 vmsppl 360 1258 0 1243 2 0 2 2 0 8 0 pdppl 4096 2526 0 2486 6 0 6 6 0 8 0 pvpl 32 304937 0 299794 112 22 90 108 0 265 47 pmappl 232 1258 0 1243 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 512 0 4 15 0 15 15 0 8 0