panic: pool_do_get: shmpl free list modified: page 0xfffffd806779f000; item addr 0xfffffd806779f1d0; offset 0x10=0xdeaf4000 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *316488 3232 32767 0x10 0x4000000 1K syz-executor.1 88456 56531 0 0x14000 0x200 0 reaper 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(ffffffff82396740,1,ffff800020c51bd8) 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(ffff800020b05c28,ffff800020c51d78,10,ffff800020c51de0) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b05c28,ffff800020c51d78,ffff800020c51de0) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c51e50) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c51e50) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,28371c25010) 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 0xfffffd806779f000; item addr 0xfffffd806779f1d0; offset 0x10=0xdeaf4000 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(ffffffff82396740,1,ffff800020c51bd8) 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(ffff800020b05c28,ffff800020c51d78,10,ffff800020c51de0) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b05c28,ffff800020c51d78,ffff800020c51de0) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c51e50) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c51e50) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,28371c25010) at Xsyscall+0x128 end of kernel end trace frame: 0x357, count: -8 ddb{1}> show registers rdi 0xffffffff8187fd57 db_enter+0x17 rsi 0x2d83 __ALIGN_SIZE+0x1d83 rbp 0xffff800020c51a20 rbx 0xffff800020c51ad0 rdx 0x2d84 __ALIGN_SIZE+0x1d84 rcx 0xffff80000239e000 rax 0xffff80000239e000 r8 0xffffffff81c03f13 kprintf+0x173 r9 0x1 r10 0x25 r11 0xdf06a72ff2b66b63 r12 0x3000000008 r13 0xffff800020c51a30 r14 0x100 r15 0x1 rip 0xffffffff8187fd58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c51a10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=316488 stat=onproc flags process=10 proc=4000000 pri=78, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff800020b04710,0xffffffff823b10e8 process=0xffff800020b2b3c0 user=0xffff800020c4c000, vmspace=0xfffffd807effdb40 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 3232 246625 34356 32767 2 0x10 syz-executor.1 * 3232 316488 34356 32767 7 0x4000010 syz-executor.1 34356 10945 23354 32767 3 0x90 nanosleep syz-executor.1 23354 519151 94607 0 3 0x82 wait syz-executor.1 2757 89024 60073 32767 3 0x90 nanosleep syz-executor.0 60073 133948 94607 0 3 0x82 wait syz-executor.0 25480 76247 0 0 3 0x14200 bored sosplice 94607 391099 68968 0 3 0x82 kqread syz-fuzzer 94607 186030 68968 0 3 0x4000082 thrsleep syz-fuzzer 94607 410385 68968 0 3 0x4000082 thrsleep syz-fuzzer 94607 7461 68968 0 3 0x4000082 thrsleep syz-fuzzer 94607 474483 68968 0 3 0x4000082 thrsleep syz-fuzzer 94607 522728 68968 0 3 0x4000082 thrsleep syz-fuzzer 94607 332318 68968 0 3 0x4000082 thrsleep syz-fuzzer 94607 259504 68968 0 3 0x4000082 thrsleep syz-fuzzer 94607 226032 68968 0 3 0x4000082 thrsleep syz-fuzzer 94607 70052 68968 0 3 0x4000082 thrsleep syz-fuzzer 68968 416214 51099 0 3 0x10008a pause ksh 51099 49445 16444 0 3 0x92 select sshd 31294 109289 1 0 3 0x100083 ttyin getty 16444 227511 1 0 3 0x80 select sshd 21625 30603 41295 73 3 0x100090 kqread syslogd 41295 433320 1 0 3 0x100082 netio syslogd 90166 409218 1 77 3 0x100090 poll dhclient 61793 466480 1 0 3 0x80 poll dhclient 92551 112966 0 0 3 0x14200 pgzero zerothread 79462 114682 0 0 3 0x14200 aiodoned aiodoned 92716 521864 0 0 3 0x14200 syncer update 54608 153375 0 0 3 0x14200 cleaner cleaner 56531 88456 0 0 7 0x14200 reaper 86303 379497 0 0 3 0x14200 pgdaemon pagedaemon 10420 443892 0 0 3 0x14200 bored crynlk 71359 314741 0 0 3 0x14200 bored crypto 18298 263570 0 0 3 0x40014200 acpi0 acpi0 69197 183715 0 0 3 0x40014200 idle1 61843 497090 0 0 3 0x14200 bored softnet 72020 81419 0 0 3 0x14200 bored systqmp 47949 227210 0 0 3 0x14200 bored systq 65014 213127 0 0 3 0x40014200 bored softclock 52088 460582 0 0 3 0x40014200 idle0 17188 302091 0 0 3 0x14200 bored smr 1 206709 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 0: exclusive mutex pvpl r = 0 (0xffffffff823994a8) locked @ /syzkaller/managers/setuid/kernel/sys/kern/subr_pool.c:804 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 pool_put+0x70 sys/kern/subr_pool.c:806 #2 pmap_do_remove+0x63b sys/arch/amd64/amd64/pmap.c:1801 #3 uvm_map_teardown+0x195 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:206 [inline] #3 uvm_map_teardown+0x195 sys/uvm/uvm_map.c:2640 #4 uvmspace_free+0x86 sys/uvm/uvm_map.c:3509 #5 uvm_exit+0x29 sys/uvm/uvm_glue.c:297 #6 reaper+0x198 sys/kern/kern_exit.c:431 #7 proc_trampoline+0x1c CPU 1: exclusive mutex shmpl r = 0 (0xffffffff82396750) 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 3232 (syz-executor.1) thread 0xffff800020b05c28 (316488) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82396ff0) 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 (0xffffffff82396750) 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 9460 6321K 6321K 78643K 10772 0 0 pcb 23 9K 10K 78643K 872 0 0 rtable 97 3K 3K 78643K 1625 0 0 ifaddr 36 11K 11K 78643K 314 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 69 0 0 iov 0 0K 36K 78643K 183 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 2319 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 27 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 240 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 33K 78643K 1674 0 0 sigio 0 0K 0K 78643K 30 0 0 proc 41 38K 70K 78643K 1310 0 0 subproc 68 69634K 69634K 78643K 1598 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 223 0 0 in_multi 33 2K 2K 78643K 569 0 0 ether_multi 1 0K 0K 78643K 8 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 469 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 81 20K 29K 78643K 6094 0 0 UVM aobj 86 3K 3K 78643K 94 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 117 0 0 NDP 7 0K 0K 78643K 144 0 0 temp 121 2710K 2778K 78643K 9442 0 0 kqueue 0 0K 0K 78643K 15 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 49 0 45 1 0 1 1 0 8 0 inpcbpl 280 955 0 948 1 0 1 1 0 8 0 plimitpl 152 208 0 199 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 446 0 406 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 28 0 28 1 1 0 1 0 8 0 tcpcb 544 369 0 365 1 0 1 1 0 8 0 nd6 48 94 0 90 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2091 0 1903 12 0 12 12 0 8 0 art_table 32 2092 0 1903 2 0 2 2 0 8 0 art_node 16 445 0 411 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 5 2 1 1 1 0 8 0 semapl 112 238 0 228 1 0 1 1 0 8 0 shmpl 112 92 0 8 3 0 3 3 0 8 0 shmpl: pool(0xffffffff82396740:shmpl): page inconsistency: page 0xfffffd806779f000; item ordinal 0; addr 0xed236ab926325f2d dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3401 0 1924 48 0 48 48 0 8 0 ffsino 272 3401 0 1924 99 0 99 99 0 8 0 nchpl 144 5789 0 4138 63 1 62 62 0 8 0 uvmvnodes 72 4209 0 0 77 0 77 77 0 8 0 vnodes 200 4209 0 0 222 0 222 222 0 8 0 namei 1024 20286 0 20286 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 18032 0 18032 16 13 3 6 0 8 3 sigapl 432 1709 0 1694 3 1 2 3 0 8 0 futexpl 56 17011 0 17011 1 0 1 1 0 8 1 knotepl 112 1317 0 1298 1 0 1 1 0 8 0 kqueuepl 104 425 0 423 1 0 1 1 0 8 0 pipepl 112 1458 0 1439 5 4 1 2 0 8 0 fdescpl 488 1710 0 1694 3 0 3 3 0 8 0 filepl 152 11940 0 11843 8 3 5 7 0 8 0 lockfpl 104 451 0 451 2 1 1 1 0 8 1 lockfspl 32 905 0 905 2 1 1 1 0 8 1 sessionpl 112 62 0 52 1 0 1 1 0 8 0 pgrppl 48 88 0 78 1 0 1 1 0 8 0 ucredpl 96 3517 0 3508 1 0 1 1 0 8 0 zombiepl 144 1694 0 1693 1 0 1 1 0 8 0 processpl 840 1726 0 1693 4 0 4 4 0 8 0 procpl 600 4638 0 4595 4 0 4 4 0 8 0 srpgc 64 260 0 260 3 2 1 1 0 8 1 sosppl 128 38 0 38 9 8 1 1 0 8 1 sockpl 384 1864 0 1847 3 0 3 3 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 10 0 0 1 0 1 1 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 139 0 0 17 0 17 17 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 190 0 0 10 0 10 10 0 8 0 bufpl 256 9470 0 2454 439 0 439 439 0 8 0 anonpl 16 184695 0 178678 71 40 31 45 0 125 0 amapchunkpl 152 11539 0 11445 16 11 5 9 0 158 1 amappl16 192 7955 0 7590 55 35 20 31 0 8 0 amappl15 184 209 0 209 4 4 0 1 0 8 0 amappl14 176 626 0 621 1 0 1 1 0 8 0 amappl13 168 69 0 69 6 5 1 1 0 8 1 amappl12 160 62 0 61 2 1 1 1 0 8 0 amappl11 152 165 0 146 1 0 1 1 0 8 0 amappl10 144 152 0 148 1 0 1 1 0 8 0 amappl9 136 1101 0 1097 1 0 1 1 0 8 0 amappl8 128 703 0 687 1 0 1 1 0 8 0 amappl7 120 167 0 160 1 0 1 1 0 8 0 amappl6 112 211 0 203 1 0 1 1 0 8 0 amappl5 104 266 0 255 1 0 1 1 0 8 0 amappl4 96 1758 0 1730 2 1 1 2 0 8 0 amappl3 88 552 0 541 1 0 1 1 0 8 0 amappl2 80 12421 0 12354 2 0 2 2 0 8 0 amappl1 72 50921 0 50453 23 13 10 19 0 8 0 amappl 72 5196 0 5156 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 93 0 8 2 0 2 2 0 8 0 uaddrrnd 24 1710 0 1694 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1710 0 1694 1 0 1 1 0 8 0 vmmpekpl 168 17650 0 17625 2 0 2 2 0 8 0 vmmpepl 168 202979 0 201473 110 35 75 77 0 357 8 vmsppl 360 1709 0 1693 2 0 2 2 0 8 0 pdppl 4096 3428 0 3386 6 0 6 6 0 8 0 pvpl 32 548745 0 539660 174 71 103 120 0 265 18 pmappl 232 1709 0 1693 5 3 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 595 0 2 17 0 17 17 0 8 0