panic: pool_do_get: shmpl free list modified: page 0xfffffd8066f46000; item addr 0xfffffd8066f46c48; offset 0x10=0xdead4000 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 237223 13876 32767 0x10 0 0 syz-executor.0 *213667 99051 32767 0x10 0x4000000 1K 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(ffffffff823682b8,1,ffff800020c2b644) at pool_do_get+0x4bf sys/kern/subr_pool.c:750 pool_get() at pool_get+0x106 sys/kern/subr_pool.c:587 shmget_allocate_segment(ffff800020b75530,ffff800020c2b828,3,ffff800020c2b810) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b75530,ffff800020c2b828,ffff800020c2b810) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c2b8c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c2b8c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,63663c65010) at Xsyscall+0x128 end of kernel end trace frame: 0x6388cac5f70, 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 0xfffffd8066f46000; item addr 0xfffffd8066f46c48; offset 0x10=0xdead4000 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(ffffffff823682b8,1,ffff800020c2b644) at pool_do_get+0x4bf sys/kern/subr_pool.c:750 pool_get() at pool_get+0x106 sys/kern/subr_pool.c:587 shmget_allocate_segment(ffff800020b75530,ffff800020c2b828,3,ffff800020c2b810) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b75530,ffff800020c2b828,ffff800020c2b810) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c2b8c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c2b8c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,63663c65010) at Xsyscall+0x128 end of kernel end trace frame: 0x6388cac5f70, count: -8 ddb{1}> show registers rdi 0xffffffff81454e67 db_enter+0x17 rsi 0x3a73 __ALIGN_SIZE+0x2a73 rbp 0xffff800020c2b480 rbx 0xffff800020c2b530 rdx 0x3a74 __ALIGN_SIZE+0x2a74 rcx 0xffff80000094a000 rax 0xffff80000094a000 r8 0xffffffff81cae0b3 kprintf+0x183 r9 0x1 r10 0x25 r11 0x89cb42f0580b4586 r12 0x3000000008 r13 0xffff800020c2b490 r14 0x100 r15 0x1 rip 0xffffffff81454e68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c2b470 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=213667 stat=onproc flags process=10 proc=4000000 pri=74, usrpri=74, nice=20 forw=0xffffffffffffffff, list=0xffff800020b74720,0xffff800020b74028 process=0xffff800020b3a6a0 user=0xffff800020c26000, vmspace=0xfffffd807f00c2d0 estcpu=36, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 13876 237223 34272 32767 7 0x10 syz-executor.0 13876 103842 34272 32767 2 0x4000010 syz-executor.0 99051 114535 79494 32767 2 0x10 syz-executor.1 *99051 213667 79494 32767 7 0x4000010 syz-executor.1 99051 388639 79494 32767 3 0x4000090 fsleep syz-executor.1 99051 486215 79494 32767 3 0x4000090 fsleep syz-executor.1 99051 312208 79494 32767 3 0x4000090 fsleep syz-executor.1 99051 92077 79494 32767 3 0x4000090 fsleep syz-executor.1 34272 150690 24166 32767 3 0x90 nanosleep syz-executor.0 24166 169833 75036 0 3 0x82 wait syz-executor.0 79494 171269 91222 32767 3 0x90 nanosleep syz-executor.1 91222 355136 75036 0 3 0x82 wait syz-executor.1 9441 62139 0 0 3 0x14200 bored sosplice 75036 387527 86 0 3 0x82 thrsleep syz-fuzzer 75036 68890 86 0 3 0x4000082 nanosleep syz-fuzzer 75036 230510 86 0 3 0x4000082 thrsleep syz-fuzzer 75036 95621 86 0 3 0x4000082 thrsleep syz-fuzzer 75036 246713 86 0 3 0x4000082 thrsleep syz-fuzzer 75036 284741 86 0 3 0x4000082 kqread syz-fuzzer 75036 358958 86 0 3 0x4000082 thrsleep syz-fuzzer 75036 349313 86 0 3 0x4000082 thrsleep syz-fuzzer 75036 434925 86 0 3 0x4000082 nanosleep syz-fuzzer 75036 290268 86 0 3 0x4000082 thrsleep syz-fuzzer 86 116607 89720 0 3 0x10008a pause ksh 89720 523741 75851 0 3 0x92 select sshd 60547 498024 1 0 3 0x100083 ttyin getty 75851 78206 1 0 3 0x80 select sshd 5796 211404 93241 73 3 0x100090 kqread syslogd 93241 8866 1 0 3 0x100082 netio syslogd 75682 31786 1 77 3 0x100090 poll dhclient 85810 252237 1 0 3 0x80 poll dhclient 98467 55937 0 0 2 0x14200 zerothread 27039 146484 0 0 3 0x14200 aiodoned aiodoned 75930 323193 0 0 3 0x14200 syncer update 89787 31562 0 0 3 0x14200 cleaner cleaner 72901 381538 0 0 3 0x14200 reaper reaper 49011 190068 0 0 3 0x14200 pgdaemon pagedaemon 44941 444506 0 0 3 0x14200 bored crynlk 60660 171635 0 0 3 0x14200 bored crypto 77271 439633 0 0 3 0x40014200 acpi0 acpi0 92574 108707 0 0 3 0x40014200 idle1 44202 496047 0 0 3 0x14200 bored softnet 24804 500726 0 0 3 0x14200 bored systqmp 15605 410227 0 0 3 0x14200 bored systq 28885 387777 0 0 3 0x40014200 bored softclock 32744 291576 0 0 3 0x40014200 idle0 22746 94850 0 0 3 0x14200 bored smr 1 279245 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 (0xffffffff823682c8) locked @ /syzkaller/managers/setuid/kernel/sys/kern/subr_pool.c:583 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 pool_get+0xda 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+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #4 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #5 Xsyscall+0x128 Process 99051 (syz-executor.1) thread 0xffff800020b75530 (213667) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82347588) locked @ /syzkaller/managers/setuid/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff823682c8) locked @ /syzkaller/managers/setuid/kernel/sys/kern/subr_pool.c:583 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 pool_get+0xda 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+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #4 syscall+0x5b8 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 9461 6321K 6321K 78643K 10658 0 0 pcb 23 9K 11K 78643K 307 0 0 rtable 97 3K 3K 78643K 875 0 0 ifaddr 36 10K 10K 78643K 175 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 37 0 0 iov 0 0K 20K 78643K 52 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1735 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 8 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 87 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 8 25K 29K 78643K 718 0 0 sigio 0 0K 0K 78643K 12 0 0 proc 41 38K 58K 78643K 774 0 0 subproc 68 69634K 69634K 78643K 816 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 98 0 0 in_multi 33 2K 2K 78643K 288 0 0 ether_multi 1 0K 0K 78643K 3 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 299 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 88 21K 29K 78643K 2994 0 0 UVM aobj 39 2K 2K 78643K 50 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 46 0 0 NDP 5 0K 0K 78643K 75 0 0 temp 106 2374K 2438K 78643K 5869 0 0 kqueue 0 0K 0K 78643K 9 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 26 0 22 1 0 1 1 0 8 0 inpcbpl 280 373 0 365 1 0 1 1 0 8 0 plimitpl 152 96 0 87 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 239 0 199 3 1 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 149 0 145 1 0 1 1 0 8 0 nd6 48 48 0 44 2 1 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1129 0 941 18 6 12 12 0 8 0 art_table 32 1130 0 941 3 1 2 2 0 8 0 art_node 16 238 0 204 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 1 2 1 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 83 0 73 1 0 1 1 0 8 0 shmpl 112 48 0 11 2 0 2 2 0 8 0 shmpl: pool(0xffffffff823682b8:shmpl): page inconsistency: page 0xfffffd8066f46000; item ordinal 0; addr 0xce4c175da77848a9 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2258 0 808 47 0 47 47 0 8 0 ffsino 272 2258 0 808 97 0 97 97 0 8 0 nchpl 144 3376 0 1748 62 1 61 61 0 8 0 uvmvnodes 72 2675 0 0 49 0 49 49 0 8 0 vnodes 200 2675 0 0 141 0 141 141 0 8 0 namei 1024 11102 0 11102 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 8711 0 8711 10 9 1 6 0 8 1 sigapl 432 822 0 806 2 0 2 2 0 8 0 futexpl 56 6520 0 6516 3 2 1 1 0 8 0 knotepl 112 624 0 605 1 0 1 1 0 8 0 kqueuepl 104 141 0 138 1 0 1 1 0 8 0 pipepl 112 626 0 607 3 2 1 2 0 8 0 fdescpl 488 823 0 806 4 1 3 3 0 8 0 filepl 152 5360 0 5256 9 4 5 7 0 8 0 lockfpl 104 154 0 154 3 2 1 1 0 8 1 lockfspl 32 385 0 385 3 2 1 1 0 8 1 sessionpl 112 39 0 29 1 0 1 1 0 8 0 pgrppl 48 45 0 35 1 0 1 1 0 8 0 ucredpl 96 1522 0 1513 1 0 1 1 0 8 0 zombiepl 144 806 0 806 2 1 1 1 0 8 1 processpl 840 839 0 806 4 0 4 4 0 8 0 procpl 600 2002 0 1954 5 1 4 5 0 8 0 srpgc 64 122 0 122 4 3 1 1 0 8 1 sosppl 128 19 0 19 2 1 1 1 0 8 1 sockpl 384 687 0 669 6 3 3 4 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 202 0 0 9 0 9 9 0 8 0 bufpl 256 6560 0 1122 340 0 340 340 0 8 0 anonpl 16 97087 0 90934 65 25 40 41 0 125 12 amapchunkpl 152 5508 0 5414 19 10 9 9 0 158 5 amappl16 192 3107 0 2751 45 20 25 29 0 8 7 amappl15 184 284 0 280 1 0 1 1 0 8 0 amappl14 176 162 0 156 2 1 1 1 0 8 0 amappl13 168 103 0 100 1 0 1 1 0 8 0 amappl12 160 164 0 160 1 0 1 1 0 8 0 amappl11 152 192 0 175 1 0 1 1 0 8 0 amappl10 144 124 0 123 2 1 1 1 0 8 0 amappl9 136 647 0 644 1 0 1 1 0 8 0 amappl8 128 278 0 258 1 0 1 1 0 8 0 amappl7 120 121 0 113 1 0 1 1 0 8 0 amappl6 112 140 0 131 1 0 1 1 0 8 0 amappl5 104 310 0 300 1 0 1 1 0 8 0 amappl4 96 973 0 946 2 1 1 2 0 8 0 amappl3 88 239 0 226 1 0 1 1 0 8 0 amappl2 80 5505 0 5442 3 1 2 2 0 8 0 amappl1 72 28333 0 27862 23 13 10 19 0 8 0 amappl 72 2380 0 2340 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 49 0 11 1 0 1 1 0 8 0 uaddrrnd 24 823 0 806 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 823 0 806 1 0 1 1 0 8 0 vmmpekpl 168 10151 0 10126 2 0 2 2 0 8 0 vmmpepl 168 100359 0 98839 128 52 76 76 0 357 9 vmsppl 360 822 0 806 2 0 2 2 0 8 0 pdppl 4096 1654 0 1612 7 1 6 6 0 8 0 pvpl 32 293824 0 283768 173 62 111 111 0 265 29 pmappl 224 822 0 806 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 502 0 12 14 0 14 14 0 8 0