panic: pool_do_get: shmpl free list modified: page 0xfffffd80695fd000; item addr 0xfffffd80695fd238; offset 0x10=0xdeafbe00 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 411439 98482 32767 0x10 0 0 syz-executor.0 *185017 98482 32767 0x10 0x4000000 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 pool_do_get(ffffffff8232fa50,1,ffff800020c75798) at pool_do_get+0x4a3 sys/kern/subr_pool.c:750 pool_get() at pool_get+0xf7 sys/kern/subr_pool.c:587 shmget_allocate_segment(ffff800020b7f788,ffff800020c75938,0,ffff800020c759a0) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b7f788,ffff800020c75938,ffff800020c759a0) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c75a10) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c75a10) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,fe8e0e570d8) at Xsyscall+0x128 end of kernel end trace frame: 0x357, 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}> set $maxwidth = 0 ddb{1}> show panic pool_do_get: shmpl free list modified: page 0xfffffd80695fd000; item addr 0xfffffd80695fd238; offset 0x10=0xdeafbe00 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 pool_do_get(ffffffff8232fa50,1,ffff800020c75798) at pool_do_get+0x4a3 sys/kern/subr_pool.c:750 pool_get() at pool_get+0xf7 sys/kern/subr_pool.c:587 shmget_allocate_segment(ffff800020b7f788,ffff800020c75938,0,ffff800020c759a0) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b7f788,ffff800020c75938,ffff800020c759a0) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c75a10) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c75a10) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,fe8e0e570d8) at Xsyscall+0x128 end of kernel end trace frame: 0x357, count: -8 ddb{1}> show registers rdi 0xffffffff81b33437 db_enter+0x17 rsi 0x2d95 __ALIGN_SIZE+0x1d95 rbp 0xffff800020c755e0 rbx 0xffff800020c75690 rdx 0x2d96 __ALIGN_SIZE+0x1d96 rcx 0xffff80000174a000 rax 0xffff80000174a000 r8 0xffffffff818bd5e3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x1d624308a41502ac r12 0x3000000008 r13 0xffff800020c755f0 r14 0x100 r15 0x1 rip 0xffffffff81b33438 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c755d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=185017 stat=onproc flags process=10 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b7e978,0xffff800020b7f540 process=0xffff800020b9da58 user=0xffff800020c70000, vmspace=0xfffffd807f00b708 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 98482 411439 84038 32767 7 0x10 syz-executor.0 98482 415733 84038 32767 2 0x4000010 syz-executor.0 *98482 185017 84038 32767 7 0x4000010 syz-executor.0 98482 362943 84038 32767 3 0x4000090 fsleep syz-executor.0 98482 103696 84038 32767 3 0x4000090 fsleep syz-executor.0 40431 324994 29857 32767 3 0x90 nanosleep syz-executor.1 40431 354314 29857 32767 3 0x4000090 lockf syz-executor.1 40431 434407 29857 32767 3 0x4000090 fsleep syz-executor.1 84038 117722 555 32767 3 0x90 nanosleep syz-executor.0 555 257617 12527 0 3 0x82 wait syz-executor.0 29857 350372 8031 32767 3 0x90 nanosleep syz-executor.1 8031 81349 12527 0 3 0x82 wait syz-executor.1 57737 397957 0 0 3 0x14200 bored sosplice 12527 106 20092 0 3 0x82 thrsleep syz-fuzzer 12527 92749 20092 0 3 0x4000082 thrsleep syz-fuzzer 12527 245975 20092 0 3 0x4000082 thrsleep syz-fuzzer 12527 314535 20092 0 3 0x4000082 thrsleep syz-fuzzer 12527 477789 20092 0 3 0x4000082 thrsleep syz-fuzzer 12527 88572 20092 0 3 0x4000082 thrsleep syz-fuzzer 12527 228190 20092 0 3 0x4000082 thrsleep syz-fuzzer 12527 23484 20092 0 3 0x4000082 kqread syz-fuzzer 12527 273485 20092 0 3 0x4000082 thrsleep syz-fuzzer 12527 220930 20092 0 3 0x4000082 thrsleep syz-fuzzer 20092 137763 4193 0 3 0x10008a pause ksh 4193 337137 90129 0 3 0x92 select sshd 73396 121087 1 0 3 0x100083 ttyin getty 90129 39137 1 0 3 0x80 select sshd 64924 9673 21637 73 3 0x100090 kqread syslogd 21637 147896 1 0 3 0x100082 netio syslogd 33503 118459 1 77 3 0x100090 poll dhclient 6582 42482 1 0 3 0x80 poll dhclient 75412 345676 0 0 3 0x14200 pgzero zerothread 68934 390929 0 0 3 0x14200 aiodoned aiodoned 33199 162790 0 0 3 0x14200 syncer update 99895 331484 0 0 3 0x14200 cleaner cleaner 7548 131769 0 0 3 0x14200 reaper reaper 62001 36957 0 0 3 0x14200 pgdaemon pagedaemon 57248 287137 0 0 3 0x14200 bored crynlk 40968 492796 0 0 3 0x14200 bored crypto 18039 386203 0 0 3 0x40014200 acpi0 acpi0 72062 183422 0 0 3 0x40014200 idle1 95351 250086 0 0 3 0x14200 bored softnet 34697 306097 0 0 3 0x14200 bored systqmp 88987 168475 0 0 3 0x14200 bored systq 74182 308023 0 0 3 0x40014200 bored softclock 37052 84598 0 0 3 0x40014200 idle0 10492 354235 0 0 3 0x14200 bored smr 1 32244 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive mutex shmpl r = 0 (0xffffffff8232fa60) locked @ /syzkaller/managers/setuid/kernel/sys/kern/subr_pool.c:583 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 pool_get+0xcb sys/kern/subr_pool.c:584 #2 shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 #3 sys_shmget+0x13f sys/kern/sysv_shm.c:472 #4 syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] #4 syscall+0x576 sys/arch/amd64/amd64/trap.c:574 #5 Xsyscall+0x128 Process 98482 (syz-executor.0) thread 0xffff800020b7f788 (185017) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82339f80) locked @ /syzkaller/managers/setuid/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 syscall+0x45e mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x45e sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff8232fa60) locked @ /syzkaller/managers/setuid/kernel/sys/kern/subr_pool.c:583 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 pool_get+0xcb sys/kern/subr_pool.c:584 #2 shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 #3 sys_shmget+0x13f sys/kern/sysv_shm.c:472 #4 syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] #4 syscall+0x576 sys/arch/amd64/amd64/trap.c:574 #5 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9459 6321K 6321K 78643K 10726 0 0 pcb 25 9K 11K 78643K 523 0 0 rtable 97 3K 3K 78643K 1327 0 0 ifaddr 36 11K 11K 78643K 262 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 61 0 0 iov 0 0K 32K 78643K 103 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1996 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 3 5K 5K 78643K 12 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 141 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 8 25K 33K 78643K 1046 0 0 sigio 0 0K 0K 78643K 15 0 0 proc 41 38K 70K 78643K 1118 0 0 subproc 68 69634K 69634K 78643K 1292 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 145 0 0 in_multi 33 2K 2K 78643K 459 0 0 ether_multi 1 0K 0K 78643K 9 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 406 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 98 21K 30K 78643K 4005 0 0 UVM aobj 54 2K 2K 78643K 59 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 42 0 0 NDP 7 0K 0K 78643K 117 0 0 temp 121 2378K 2446K 78643K 7479 0 0 kqueue 0 0K 0K 78643K 6 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 40 0 36 1 0 1 1 0 8 0 inpcbpl 280 527 0 519 1 0 1 1 0 8 0 plimitpl 152 135 0 126 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 365 0 325 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 544 204 0 200 1 0 1 1 0 8 0 nd6 48 76 0 72 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1734 0 1547 12 0 12 12 0 8 0 art_table 32 1735 0 1547 2 0 2 2 0 8 0 art_node 16 364 0 330 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 6 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 139 0 129 1 0 1 1 0 8 0 shmpl 112 57 0 5 2 0 2 2 0 8 0 shmpl: pool(0xffffffff8232fa50:shmpl): page inconsistency: page 0xfffffd80695fd000; item ordinal 0; addr 0xf1c64601031cab69 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2531 0 1087 47 0 47 47 0 8 0 ffsino 272 2531 0 1087 97 0 97 97 0 8 0 nchpl 144 4035 0 2405 62 1 61 61 0 8 0 uvmvnodes 72 3186 0 0 58 0 58 58 0 8 0 vnodes 200 3186 0 0 168 0 168 168 0 8 0 namei 1024 13781 0 13781 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 10941 0 10941 9 8 1 6 0 8 1 sigapl 432 1108 0 1092 3 1 2 3 0 8 0 futexpl 56 9371 0 9368 2 1 1 1 0 8 0 knotepl 112 1020 0 1001 2 1 1 2 0 8 0 kqueuepl 104 293 0 291 1 0 1 1 0 8 0 pipepl 112 970 0 951 4 3 1 2 0 8 0 fdescpl 488 1109 0 1092 3 0 3 3 0 8 0 filepl 152 7205 0 7102 10 5 5 7 0 8 1 lockfpl 104 221 0 217 5 4 1 1 0 8 0 lockfspl 32 526 0 524 5 4 1 1 0 8 0 sessionpl 112 53 0 43 1 0 1 1 0 8 0 pgrppl 48 71 0 61 1 0 1 1 0 8 0 ucredpl 96 1834 0 1825 1 0 1 1 0 8 0 zombiepl 144 1092 0 1092 3 2 1 1 0 8 1 processpl 840 1125 0 1092 4 0 4 4 0 8 0 procpl 600 2754 0 2706 5 1 4 5 0 8 0 srpgc 64 202 0 202 4 3 1 1 0 8 1 sosppl 128 19 0 19 5 4 1 1 0 8 1 sockpl 384 1049 0 1029 6 3 3 4 0 8 1 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 6 0 0 1 0 1 1 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 148 0 0 18 1 17 18 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 210 0 0 10 0 10 10 0 8 0 bufpl 256 7134 0 1141 375 0 375 375 0 8 0 anonpl 16 130308 0 124260 59 22 37 42 0 125 6 amapchunkpl 152 8163 0 8065 23 14 9 9 0 158 5 amappl16 192 4974 0 4590 49 29 20 30 0 8 0 amappl15 184 220 0 218 3 2 1 1 0 8 0 amappl14 176 249 0 247 2 1 1 1 0 8 0 amappl13 168 84 0 82 5 4 1 1 0 8 0 amappl12 160 115 0 113 5 4 1 1 0 8 0 amappl11 152 199 0 185 1 0 1 1 0 8 0 amappl10 144 149 0 145 2 1 1 1 0 8 0 amappl9 136 839 0 833 1 0 1 1 0 8 0 amappl8 128 458 0 433 1 0 1 1 0 8 0 amappl7 120 169 0 159 1 0 1 1 0 8 0 amappl6 112 234 0 226 1 0 1 1 0 8 0 amappl5 104 264 0 254 1 0 1 1 0 8 0 amappl4 96 1307 0 1274 2 1 1 2 0 8 0 amappl3 88 334 0 328 1 0 1 1 0 8 0 amappl2 80 7445 0 7382 3 1 2 2 0 8 0 amappl1 72 35428 0 34948 24 14 10 19 0 8 0 amappl 72 3230 0 3189 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 58 0 5 1 0 1 1 0 8 0 uaddrrnd 24 1109 0 1092 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1109 0 1092 1 0 1 1 0 8 0 vmmpekpl 168 12587 0 12560 2 0 2 2 0 8 0 vmmpepl 168 135142 0 133584 112 40 72 77 0 357 4 vmsppl 360 1108 0 1092 2 0 2 2 0 8 0 pdppl 4096 2225 0 2184 6 0 6 6 0 8 0 pvpl 32 373328 0 363490 159 55 104 112 0 265 19 pmappl 232 1108 0 1092 4 3 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 532 0 5 16 0 16 16 0 8 0