panic: pool_do_get: semupl free list modified: page 0xfffffd80734b2000; item addr 0xfffffd80734b2e00; offset 0x10=0xdead4111 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 122676 12540 0 0 0 0 syz-executor0 *415189 12540 0 0 0x4000000 1K syz-executor0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x16c sys/kern/subr_prf.c:208 pool_do_get(d77ebbf91832fde4,2,ffffffff822fbb50) at pool_do_get+0x4bc sys/kern/subr_pool.c:750 pool_get() at pool_get+0x104 sys/kern/subr_pool.c:587 semundo_adjust(9794528c462aae17,0,ffff800020cdbcd8,3,ffff800020cdbcde) at semundo_adjust+0xee semu_alloc sys/kern/sysv_sem.c:92 [inline] semundo_adjust(9794528c462aae17,0,ffff800020cdbcd8,3,ffff800020cdbcde) at semundo_adjust+0xee sys/kern/sysv_sem.c:135 sys_semop(d80da3b88f955d98,0,ffff800020bbabd0) at sys_semop+0x797 sys/kern/sysv_sem.c:703 syscall(cf21f223496a2716) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(cf21f223496a2716) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffffd2,0,3,2d647b5e268) at Xsyscall+0x128 end of kernel end trace frame: 0x2d8e2ae0290, count: 7 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{1}> ddb{1}> set $lines = 0 ddb{1}> show panic pool_do_get: semupl free list modified: page 0xfffffd80734b2000; item addr 0xfffffd80734b2e00; offset 0x10=0xdead4111 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x16c sys/kern/subr_prf.c:208 pool_do_get(d77ebbf91832fde4,2,ffffffff822fbb50) at pool_do_get+0x4bc sys/kern/subr_pool.c:750 pool_get() at pool_get+0x104 sys/kern/subr_pool.c:587 semundo_adjust(9794528c462aae17,0,ffff800020cdbcd8,3,ffff800020cdbcde) at semundo_adjust+0xee semu_alloc sys/kern/sysv_sem.c:92 [inline] semundo_adjust(9794528c462aae17,0,ffff800020cdbcd8,3,ffff800020cdbcde) at semundo_adjust+0xee sys/kern/sysv_sem.c:135 sys_semop(d80da3b88f955d98,0,ffff800020bbabd0) at sys_semop+0x797 sys/kern/sysv_sem.c:703 syscall(cf21f223496a2716) at syscall+0x5a0 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(cf21f223496a2716) at syscall+0x5a0 sys/arch/amd64/amd64/trap.c:583 Xsyscall(6,0,ffffffffffffffd2,0,3,2d647b5e268) at Xsyscall+0x128 end of kernel end trace frame: 0x2d8e2ae0290, count: -8 ddb{1}> show registers rdi 0xffffffff8135b537 db_enter+0x17 rsi 0x2b81 __ALIGN_SIZE+0x1b81 rbp 0xffff800020cdba20 rbx 0xffff800020cdbac0 rdx 0x2b82 __ALIGN_SIZE+0x1b82 rcx 0xffff800000f47000 rax 0xffff800000f47000 r8 0xffffffff81b488b4 kprintf+0x174 r9 0x1 r10 0xc1abaa5eaf3ce9d1 r11 0xb30642402264572f r12 0x3000000008 r13 0xffff800020cdba30 r14 0x100 r15 0x1 rip 0xffffffff8135b538 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020cdba10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor0) pid=415189 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020bbb9e0,0xffffffff822fd4d8 process=0xffff800020b946a0 user=0xffff800020cd6000, vmspace=0xfffffd807f00d870 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 12540 122676 58053 0 7 0 syz-executor0 12540 516508 58053 0 3 0x4000080 fsleep syz-executor0 12540 474994 58053 0 3 0x4000080 fsleep syz-executor0 12540 29606 58053 0 3 0x4000080 fsleep syz-executor0 *12540 415189 58053 0 7 0x4000000 syz-executor0 78672 85834 38610 0 3 0x80 nanosleep syz-executor1 78672 188816 38610 0 3 0x4000080 msgwait syz-executor1 78672 46327 38610 0 3 0x4000080 fsleep syz-executor1 78672 40436 38610 0 3 0x4000080 msgwait syz-executor1 78672 187464 38610 0 3 0x4000080 fsleep syz-executor1 20623 92985 0 0 3 0x14200 bored sosplice 66423 447285 1 0 3 0x100083 ttyin getty 38610 176583 8617 0 3 0x82 nanosleep syz-executor1 58053 107341 8617 0 3 0x82 nanosleep syz-executor0 8617 501815 58919 0 3 0x82 thrsleep syz-fuzzer 8617 171597 58919 0 3 0x4000082 thrsleep syz-fuzzer 8617 138098 58919 0 3 0x4000082 thrsleep syz-fuzzer 8617 312922 58919 0 3 0x4000082 thrsleep syz-fuzzer 8617 409514 58919 0 3 0x4000082 thrsleep syz-fuzzer 8617 371468 58919 0 3 0x4000082 thrsleep syz-fuzzer 8617 481433 58919 0 3 0x4000082 thrsleep syz-fuzzer 8617 272424 58919 0 3 0x4000082 thrsleep syz-fuzzer 8617 17389 58919 0 3 0x4000082 kqread syz-fuzzer 8617 15286 58919 0 3 0x4000082 thrsleep syz-fuzzer 58919 497265 15925 0 3 0x10008a pause ksh 15925 105405 92697 0 3 0x92 select sshd 92697 159348 1 0 3 0x80 select sshd 80145 416436 67788 73 3 0x100090 kqread syslogd 67788 440512 1 0 3 0x100082 netio syslogd 65525 276347 1 77 3 0x100090 poll dhclient 26410 200798 1 0 3 0x80 poll dhclient 70148 325994 0 0 3 0x14200 pgzero zerothread 39572 103536 0 0 3 0x14200 aiodoned aiodoned 26152 8832 0 0 3 0x14200 syncer update 71015 83000 0 0 3 0x14200 cleaner cleaner 96949 384918 0 0 3 0x14200 reaper reaper 22374 69374 0 0 3 0x14200 pgdaemon pagedaemon 64155 225737 0 0 3 0x14200 bored crynlk 88760 211732 0 0 3 0x14200 bored crypto 49244 509720 0 0 3 0x40014200 acpi0 acpi0 48753 163293 0 0 3 0x40014200 idle1 33748 133738 0 0 3 0x14200 bored softnet 81010 150703 0 0 3 0x14200 bored systqmp 79418 249737 0 0 3 0x14200 bored systq 22057 152960 0 0 3 0x40014200 bored softclock 27773 393881 0 0 3 0x40014200 idle0 1 299707 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive mutex semupl r = 0 (0xffffffff822fbb60) locked @ /syzkaller/managers/multicore/kernel/sys/kern/subr_pool.c:583 Process 12540 (syz-executor0) thread 0xffff800020bbabd0 (415189) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff822d88a8) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 exclusive mutex semupl r = 0 (0xffffffff822fbb60) locked @ /syzkaller/managers/multicore/kernel/sys/kern/subr_pool.c:583 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9478 6331K 6338K 78643K 10601 0 0 pcb 23 9K 10K 78643K 165 0 0 rtable 100 3K 4K 78643K 186 0 0 ifaddr 42 11K 11K 78643K 50 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 16 0 0 iov 0 0K 16K 78643K 17 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 76K 78643K 1337 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 6 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 11 0K 0K 78643K 12 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 6 17K 25K 78643K 218 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 42 38K 70K 78643K 273 0 0 subproc 64 65538K 67586K 78643K 68 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 28 0 0 in_multi 33 2K 2K 78643K 45 0 0 ether_multi 1 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 170 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 86 20K 29K 78643K 1427 0 0 UVM aobj 11 2K 2K 78643K 11 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 19 0 0 NDP 7 0K 0K 78643K 13 0 0 temp 114 2361K 2433K 78643K 3295 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 132 0 125 1 0 1 1 0 8 0 plimitpl 152 18 0 11 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 54 0 50 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 186 0 0 12 0 12 12 0 8 0 art_table 32 187 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 5 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 pool(0xffffffff822fbb50:semupl): page inconsistency: page 0xfffffd80734b2000; 34 on list, 0 missing, 35 items per page semapl 112 10 0 1 1 0 1 1 0 8 0 shmpl 112 9 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1803 0 421 45 0 45 45 0 8 0 ffsino 272 1803 0 421 93 0 93 93 0 8 0 nchpl 144 2306 0 719 59 0 59 59 0 8 0 uvmvnodes 72 1859 0 0 34 0 34 34 0 8 0 vnodes 200 1859 0 0 98 0 98 98 0 8 0 namei 1024 5754 0 5754 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 6226 0 6226 8 7 1 6 0 8 1 sigapl 432 386 0 372 2 0 2 2 0 8 0 futexpl 56 2572 0 2567 1 0 1 1 0 8 0 knotepl 112 134 0 107 2 1 1 2 0 8 0 kqueuepl 104 83 0 81 1 0 1 1 0 8 0 pipepl 112 278 0 253 3 1 2 2 0 8 1 fdescpl 488 387 0 372 3 1 2 3 0 8 0 filepl 152 2287 0 2187 7 2 5 5 0 8 1 lockfpl 104 69 0 69 3 2 1 1 0 8 1 lockfspl 32 107 0 107 3 2 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 557 0 550 1 0 1 1 0 8 0 zombiepl 144 372 0 372 3 2 1 1 0 8 1 processpl 840 402 0 372 4 0 4 4 0 8 0 procpl 600 853 0 806 4 0 4 4 0 8 0 sosppl 128 2 0 2 1 0 1 1 0 8 1 sockpl 384 273 0 256 4 1 3 3 0 8 1 mcl64k 65536 257 0 0 33 1 32 33 0 8 1 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 110 0 0 13 0 13 13 0 8 0 mtagpl 80 2 0 0 1 0 1 1 0 8 0 mbufpl 256 379 0 0 24 0 24 24 0 8 0 bufpl 256 5370 0 967 276 0 276 276 0 8 0 anonpl 16 54619 0 47367 44 7 37 43 0 125 7 amapchunkpl 152 2117 0 2016 9 0 9 9 0 158 5 amappl16 192 1969 0 1595 29 7 22 29 0 8 3 amappl15 184 202 0 197 1 0 1 1 0 8 0 amappl14 176 3 0 2 2 1 1 1 0 8 0 amappl13 168 19 0 16 1 0 1 1 0 8 0 amappl12 160 17 0 15 1 0 1 1 0 8 0 amappl11 152 183 0 174 1 0 1 1 0 8 0 amappl10 144 63 0 59 1 0 1 1 0 8 0 amappl9 136 340 0 339 1 0 1 1 0 8 0 amappl8 128 149 0 127 1 0 1 1 0 8 0 amappl7 120 33 0 28 1 0 1 1 0 8 0 amappl6 112 50 0 39 1 0 1 1 0 8 0 amappl5 104 221 0 207 1 0 1 1 0 8 0 amappl4 96 283 0 260 2 1 1 2 0 8 0 amappl3 88 135 0 129 1 0 1 1 0 8 0 amappl2 80 2746 0 2681 2 0 2 2 0 8 0 amappl1 72 16405 0 15951 24 14 10 19 0 8 0 amappl 72 1065 0 1024 1 0 1 1 0 75 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 10 0 0 1 0 1 1 0 8 0 uaddrrnd 24 387 0 372 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 387 0 372 1 0 1 1 0 8 0 vmmpekpl 168 6900 0 6879 2 0 2 2 0 8 0 vmmpepl 168 48998 0 47561 89 26 63 71 0 357 0 vmsppl 360 386 0 372 2 0 2 2 0 8 0 pdppl 4096 781 0 744 6 1 5 6 0 8 0 pvpl 32 175580 0 164768 123 15 108 116 0 265 20 pmappl 224 386 0 372 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 469 0 6 14 0 14 14 0 8 0