panic: pool_do_get: shmpl free list modified: page 0xfffffd807ba39000; item addr 0xfffffd807ba39e08; offset 0x10=0xdeafbe00 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *513845 39351 32767 0x10 0x4000000 0 syz-executor.0 269116 30396 32767 0x10 0x480 1 syz-executor.1 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,ffff800020c1f2e8) 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(ffff800020b7e270,ffff800020c1f488,3,ffff800020c1f4f0) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b7e270,ffff800020c1f488,ffff800020c1f4f0) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c1f560) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c1f560) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,6c9259130d8) 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic pool_do_get: shmpl free list modified: page 0xfffffd807ba39000; item addr 0xfffffd807ba39e08; offset 0x10=0xdeafbe00 ddb{0}> 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,ffff800020c1f2e8) 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(ffff800020b7e270,ffff800020c1f488,3,ffff800020c1f4f0) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b7e270,ffff800020c1f488,ffff800020c1f4f0) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c1f560) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c1f560) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,6c9259130d8) at Xsyscall+0x128 end of kernel end trace frame: 0x357, count: -8 ddb{0}> show registers rdi 0xffffffff81b33437 db_enter+0x17 rsi 0x2cea __ALIGN_SIZE+0x1cea rbp 0xffff800020c1f130 rbx 0xffff800020c1f1e0 rdx 0x2ceb __ALIGN_SIZE+0x1ceb rcx 0xffff80000234d000 rax 0xffff80000234d000 r8 0xffffffff818bd5e3 kprintf+0x173 r9 0x1 r10 0x25 r11 0xff6fc34c2308ae1d r12 0x3000000008 r13 0xffff800020c1f140 r14 0x100 r15 0x1 rip 0xffffffff81b33438 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c1f120 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=513845 stat=onproc flags process=10 proc=4000000 pri=85, usrpri=85, nice=20 forw=0xffffffffffffffff, list=0xffff800020b25778,0xffff800020b7f9f0 process=0xffff800020b4a358 user=0xffff800020c1a000, vmspace=0xfffffd807f00b5a0 estcpu=35, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 39351 103732 47397 32767 2 0x10 syz-executor.0 39351 162419 47397 32767 3 0x4000090 fsleep syz-executor.0 *39351 513845 47397 32767 7 0x4000010 syz-executor.0 39351 83047 47397 32767 3 0x4000090 fsleep syz-executor.0 39351 54146 47397 32767 3 0x4000090 fsleep syz-executor.0 39351 41530 47397 32767 3 0x4000090 fsleep syz-executor.0 30396 269116 16514 32767 7 0x490 syz-executor.1 16514 142725 76268 0 3 0x82 wait syz-executor.1 47397 217903 47866 32767 3 0x90 nanosleep syz-executor.0 47866 470072 76268 0 3 0x82 wait syz-executor.0 71246 81842 0 0 3 0x14200 bored sosplice 76268 423005 34100 0 3 0x82 thrsleep syz-fuzzer 76268 507289 34100 0 3 0x4000082 thrsleep syz-fuzzer 76268 283463 34100 0 3 0x4000082 thrsleep syz-fuzzer 76268 195334 34100 0 3 0x4000082 thrsleep syz-fuzzer 76268 428792 34100 0 3 0x4000082 kqread syz-fuzzer 76268 490774 34100 0 2 0x4000002 syz-fuzzer 76268 498211 34100 0 3 0x4000082 thrsleep syz-fuzzer 76268 313440 34100 0 3 0x4000082 thrsleep syz-fuzzer 76268 301167 34100 0 3 0x4000082 thrsleep syz-fuzzer 76268 329301 34100 0 3 0x4000082 thrsleep syz-fuzzer 34100 54357 8190 0 3 0x10008a pause ksh 8190 19771 42529 0 3 0x92 select sshd 61488 269353 1 0 3 0x100083 ttyin getty 42529 417826 1 0 3 0x80 select sshd 89942 251195 90039 73 3 0x100090 kqread syslogd 90039 134022 1 0 3 0x100082 netio syslogd 74864 447979 1 77 3 0x100090 poll dhclient 47323 442739 1 0 3 0x80 poll dhclient 68354 137320 0 0 3 0x14200 pgzero zerothread 67697 168110 0 0 3 0x14200 aiodoned aiodoned 49355 355874 0 0 3 0x14200 syncer update 77177 71536 0 0 3 0x14200 cleaner cleaner 58467 307349 0 0 3 0x14200 reaper reaper 1669 294160 0 0 3 0x14200 pgdaemon pagedaemon 44758 156795 0 0 3 0x14200 bored crynlk 86543 428141 0 0 3 0x14200 bored crypto 73184 363003 0 0 3 0x40014200 acpi0 acpi0 82478 150630 0 0 3 0x40014200 idle1 97988 292136 0 0 3 0x14200 bored softnet 860 346137 0 0 3 0x14200 bored systqmp 30695 376417 0 0 3 0x14200 bored systq 28645 499367 0 0 3 0x40014200 bored softclock 67547 430438 0 0 3 0x40014200 idle0 97151 309081 0 0 3 0x14200 bored smr 1 407001 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: 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 39351 (syz-executor.0) thread 0xffff800020b7e270 (513845) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9461 6321K 6321K 78643K 10728 0 0 pcb 23 9K 11K 78643K 555 0 0 rtable 97 3K 3K 78643K 1336 0 0 ifaddr 35 10K 10K 78643K 260 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 51 0 0 iov 0 0K 24K 78643K 98 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 2012 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 14 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 154 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 33K 78643K 1054 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 41 38K 70K 78643K 1088 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 130 0 0 in_multi 33 2K 2K 78643K 470 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 394 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 87 21K 29K 78643K 4052 0 0 UVM aobj 38 2K 2K 78643K 47 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 77 0 0 NDP 5 0K 0K 78643K 117 0 0 temp 120 2374K 2440K 78643K 7490 0 0 kqueue 0 0K 0K 78643K 7 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 40 0 36 1 0 1 1 0 8 0 inpcbpl 280 560 0 552 1 0 1 1 0 8 0 plimitpl 152 149 0 140 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 tcpcb 544 235 0 231 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 1725 0 1536 12 0 12 12 0 8 0 art_table 32 1726 0 1536 2 0 2 2 0 8 0 art_node 16 364 0 330 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 5 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 152 0 142 1 0 1 1 0 8 0 shmpl 112 45 0 9 2 0 2 2 0 8 0 shmpl: pool(0xffffffff8232fa50:shmpl): page inconsistency: page 0xfffffd807ba39000; item ordinal 0; addr 0x691d06e2efe519fa dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2562 0 1099 48 0 48 48 0 8 0 ffsino 272 2562 0 1099 98 0 98 98 0 8 0 nchpl 144 4129 0 2483 63 1 62 62 0 8 0 uvmvnodes 72 3217 0 0 59 0 59 59 0 8 0 vnodes 200 3217 0 0 170 0 170 170 0 8 0 namei 1024 13978 0 13978 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 11333 0 11333 13 12 1 6 0 8 1 sigapl 432 1116 0 1101 4 2 2 3 0 8 0 futexpl 56 9882 0 9878 1 0 1 1 0 8 0 knotepl 112 1013 0 994 1 0 1 1 0 8 0 kqueuepl 104 275 0 272 1 0 1 1 0 8 0 pipepl 112 994 0 975 4 3 1 2 0 8 0 fdescpl 488 1117 0 1101 3 0 3 3 0 8 0 filepl 152 7713 0 7613 10 5 5 7 0 8 1 lockfpl 104 209 0 208 4 3 1 1 0 8 0 lockfspl 32 483 0 482 4 3 1 1 0 8 0 sessionpl 112 53 0 43 1 0 1 1 0 8 0 pgrppl 48 67 0 57 1 0 1 1 0 8 0 ucredpl 96 2089 0 2080 1 0 1 1 0 8 0 zombiepl 144 1101 0 1100 2 1 1 1 0 8 0 processpl 840 1133 0 1100 4 0 4 4 0 8 0 procpl 600 2813 0 2766 4 0 4 4 0 8 0 srpgc 64 204 0 204 3 2 1 1 0 8 1 sosppl 128 18 0 18 5 5 0 1 0 8 0 sockpl 384 1121 0 1103 5 2 3 4 0 8 1 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 8 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 121 0 0 14 1 13 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 166 0 0 10 1 9 9 0 8 0 bufpl 256 7388 0 1142 391 0 391 391 0 8 0 anonpl 16 131942 0 125984 62 30 32 46 0 125 2 amapchunkpl 152 8072 0 7978 17 11 6 9 0 158 2 amappl16 192 4720 0 4331 50 29 21 31 0 8 1 amappl15 184 354 0 353 4 3 1 1 0 8 0 amappl14 176 159 0 156 2 1 1 1 0 8 0 amappl13 168 115 0 111 1 0 1 1 0 8 0 amappl12 160 127 0 125 1 0 1 1 0 8 0 amappl11 152 102 0 88 1 0 1 1 0 8 0 amappl10 144 222 0 219 2 1 1 1 0 8 0 amappl9 136 891 0 886 1 0 1 1 0 8 0 amappl8 128 515 0 494 1 0 1 1 0 8 0 amappl7 120 208 0 199 1 0 1 1 0 8 0 amappl6 112 143 0 133 1 0 1 1 0 8 0 amappl5 104 307 0 296 1 0 1 1 0 8 0 amappl4 96 1239 0 1203 2 0 2 2 0 8 0 amappl3 88 281 0 276 1 0 1 1 0 8 0 amappl2 80 7648 0 7596 2 0 2 2 0 8 0 amappl1 72 35811 0 35360 24 14 10 19 0 8 0 amappl 72 3289 0 3250 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 46 0 9 1 0 1 1 0 8 0 uaddrrnd 24 1117 0 1101 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1117 0 1101 1 0 1 1 0 8 0 vmmpekpl 168 12965 0 12935 3 1 2 2 0 8 0 vmmpepl 168 136735 0 135281 117 44 73 78 0 357 5 vmsppl 360 1116 0 1101 2 0 2 2 0 8 0 pdppl 4096 2241 0 2202 6 0 6 6 0 8 0 pvpl 32 381142 0 371491 158 61 97 123 0 265 13 pmappl 232 1116 0 1101 5 4 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 545 0 5 16 0 16 16 0 8 0