panic: pool_do_get: shmpl free list modified: page 0xfffffd80678e0000; item addr 0xfffffd80678e0b00; offset 0x10=0xdeadbe00 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 319929 8505 32767 0x10 0 0 syz-executor.0 * 13419 8505 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(ffffffff8231f688,1,ffff800020c03878) 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(ffff800020b48bd0,ffff800020c03a18,3,ffff800020c03a80) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b48bd0,ffff800020c03a18,ffff800020c03a80) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c03af0) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c03af0) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,c4d7e90010) 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 0xfffffd80678e0000; item addr 0xfffffd80678e0b00; offset 0x10=0xdeadbe00 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(ffffffff8231f688,1,ffff800020c03878) 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(ffff800020b48bd0,ffff800020c03a18,3,ffff800020c03a80) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b48bd0,ffff800020c03a18,ffff800020c03a80) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c03af0) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c03af0) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,c4d7e90010) at Xsyscall+0x128 end of kernel end trace frame: 0x357, count: -8 ddb{1}> show registers rdi 0xffffffff8150caf7 db_enter+0x17 rsi 0x2bc1 __ALIGN_SIZE+0x1bc1 rbp 0xffff800020c036c0 rbx 0xffff800020c03770 rdx 0x2bc2 __ALIGN_SIZE+0x1bc2 rcx 0xffff800001d4b000 rax 0xffff800001d4b000 r8 0xffffffff81136d63 kprintf+0x173 r9 0x1 r10 0x25 r11 0x42bd25219d8ba20c r12 0x3000000008 r13 0xffff800020c036d0 r14 0x100 r15 0x1 rip 0xffffffff8150caf8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c036b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=13419 stat=onproc flags process=10 proc=4000000 pri=76, usrpri=76, nice=20 forw=0xffffffffffffffff, list=0xffff800020b48720,0xffff800020b492e8 process=0xffff800020b9da58 user=0xffff800020bfe000, vmspace=0xfffffd806e986710 estcpu=26, cpticks=1, pctcpu=0.2 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 8505 319929 80494 32767 7 0x10 syz-executor.0 * 8505 13419 80494 32767 7 0x4000010 syz-executor.0 8505 94252 80494 32767 3 0x4000090 fsleep syz-executor.0 8505 77627 80494 32767 3 0x4000090 fsleep syz-executor.0 8505 298570 80494 32767 3 0x4000090 fsleep syz-executor.0 8505 113732 80494 32767 3 0x4000090 fsleep syz-executor.0 8505 362369 80494 32767 3 0x4000090 fsleep syz-executor.0 80494 393011 95730 32767 3 0x90 nanosleep syz-executor.0 95730 15522 46945 0 3 0x82 wait syz-executor.0 21993 316500 0 0 3 0x14200 bored sosplice 46945 73528 81330 0 3 0x82 thrsleep syz-fuzzer 46945 102494 81330 0 3 0x4000082 thrsleep syz-fuzzer 46945 17970 81330 0 3 0x4000082 thrsleep syz-fuzzer 46945 89297 81330 0 3 0x4000082 thrsleep syz-fuzzer 46945 431370 81330 0 3 0x4000082 kqread syz-fuzzer 46945 516955 81330 0 3 0x4000082 thrsleep syz-fuzzer 46945 196403 81330 0 3 0x4000082 thrsleep syz-fuzzer 46945 326060 81330 0 3 0x4000082 thrsleep syz-fuzzer 46945 175459 81330 0 3 0x4000082 thrsleep syz-fuzzer 46945 468912 81330 0 3 0x4000082 thrsleep syz-fuzzer 81330 401738 67835 0 3 0x10008a pause ksh 67835 285908 68794 0 3 0x92 select sshd 68099 380687 1 0 3 0x100083 ttyin getty 68794 494547 1 0 3 0x80 select sshd 38632 402988 38078 73 3 0x100090 kqread syslogd 38078 266976 1 0 3 0x100082 netio syslogd 97943 476917 1 77 3 0x100090 poll dhclient 51600 159640 1 0 3 0x80 poll dhclient 42982 492461 0 0 3 0x14200 pgzero zerothread 97525 461595 0 0 3 0x14200 aiodoned aiodoned 99377 149801 0 0 3 0x14200 syncer update 58062 460950 0 0 3 0x14200 cleaner cleaner 18646 338788 0 0 3 0x14200 reaper reaper 55495 382813 0 0 3 0x14200 pgdaemon pagedaemon 2290 355825 0 0 3 0x14200 bored crynlk 98999 423018 0 0 3 0x14200 bored crypto 45349 398863 0 0 3 0x40014200 acpi0 acpi0 96222 425727 0 0 3 0x40014200 idle1 21815 299633 0 0 3 0x14200 bored softnet 75852 477144 0 0 3 0x14200 bored systqmp 46112 523685 0 0 3 0x14200 bored systq 70436 519057 0 0 3 0x40014200 bored softclock 11232 128050 0 0 3 0x40014200 idle0 77448 478618 0 0 3 0x14200 bored smr 1 466740 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 (0xffffffff8231f698) 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 8505 (syz-executor.0) thread 0xffff800020b48bd0 (13419) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82322138) 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 (0xffffffff8231f698) 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 9455 6318K 6321K 78643K 10957 0 0 pcb 23 9K 11K 78643K 873 0 0 rtable 79 2K 3K 78643K 2820 0 0 ifaddr 30 11K 12K 78643K 545 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 101 0 0 iov 0 0K 32K 78643K 206 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 3048 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 31 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 281 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 29K 78643K 2304 0 0 sigio 0 0K 0K 78643K 36 0 0 proc 41 38K 58K 78643K 2103 0 0 subproc 34 34817K 69634K 78643K 2856 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 291 0 0 in_multi 22 1K 2K 78643K 983 0 0 ether_multi 1 0K 0K 78643K 13 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 713 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 91 13K 30K 78643K 7987 0 0 UVM aobj 102 3K 3K 78643K 119 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 124 0 0 NDP 4 0K 0K 78643K 255 0 0 temp 97 2377K 2450K 78643K 13184 0 0 kqueue 0 0K 0K 78643K 20 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 86 0 83 1 0 1 1 0 8 0 inpcbpl 280 1153 0 1145 1 0 1 1 0 8 0 plimitpl 152 307 0 300 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 779 0 748 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 438 0 434 1 0 1 1 0 8 0 nd6 48 168 0 166 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 3701 0 3554 12 0 12 12 0 8 0 art_table 32 3702 0 3554 2 0 2 2 0 8 0 art_node 16 778 0 750 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 3 1 0 1 1 0 8 0 semapl 112 279 0 269 1 0 1 1 0 8 0 shmpl 112 117 0 17 3 0 3 3 0 8 0 shmpl: pool(0xffffffff8231f688:shmpl): page inconsistency: page 0xfffffd80678e0000; item ordinal 0; addr 0xfc5715dda2a12af6 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3964 0 2457 49 0 49 49 0 8 0 ffsino 272 3964 0 2457 101 0 101 101 0 8 0 nchpl 144 7113 0 5457 62 0 62 62 0 8 0 uvmvnodes 72 5401 0 0 99 0 99 99 0 8 0 vnodes 200 5401 0 0 285 0 285 285 0 8 0 namei 1024 26224 0 26224 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 19996 0 19996 16 15 1 6 0 8 1 sigapl 432 2228 0 2215 2 0 2 2 0 8 0 futexpl 56 20191 0 20186 1 0 1 1 0 8 0 knotepl 112 2230 0 2217 1 0 1 1 0 8 0 kqueuepl 104 548 0 545 1 0 1 1 0 8 0 pipepl 112 1980 0 1967 4 2 2 2 0 8 1 fdescpl 488 2229 0 2215 3 0 3 3 0 8 1 filepl 152 15099 0 15023 12 5 7 7 0 8 3 lockfpl 104 535 0 534 5 4 1 1 0 8 0 lockfspl 32 1048 0 1047 5 4 1 1 0 8 0 sessionpl 112 99 0 90 1 0 1 1 0 8 0 pgrppl 48 127 0 118 1 0 1 1 0 8 0 ucredpl 96 4330 0 4322 1 0 1 1 0 8 0 zombiepl 144 2215 0 2215 2 1 1 1 0 8 1 processpl 840 2245 0 2215 4 0 4 4 0 8 0 procpl 600 5834 0 5789 5 1 4 5 0 8 0 srpgc 64 472 0 472 7 6 1 1 0 8 1 sosppl 128 32 0 32 9 9 0 1 0 8 0 sockpl 384 2053 0 2035 6 2 4 4 0 8 2 mcl64k 65536 5 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 9 0 0 1 0 1 1 0 8 0 mcl8k 8192 10 0 0 2 0 2 2 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 130 0 0 15 1 14 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 282 0 0 11 0 11 11 0 8 0 bufpl 256 9451 0 2433 439 0 439 439 0 8 0 anonpl 16 236442 0 230491 98 57 41 45 0 125 11 amapchunkpl 152 16133 0 16040 34 29 5 9 0 158 1 amappl16 192 9901 0 9534 79 52 27 31 0 8 8 amappl15 184 429 0 429 8 7 1 1 0 8 1 amappl14 176 512 0 506 2 1 1 1 0 8 0 amappl13 168 94 0 94 6 6 0 1 0 8 0 amappl12 160 406 0 404 1 0 1 1 0 8 0 amappl11 152 288 0 274 1 0 1 1 0 8 0 amappl10 144 330 0 327 3 2 1 1 0 8 0 amappl9 136 1100 0 1098 1 0 1 1 0 8 0 amappl8 128 981 0 948 2 0 2 2 0 8 0 amappl7 120 387 0 380 1 0 1 1 0 8 0 amappl6 112 339 0 327 1 0 1 1 0 8 0 amappl5 104 679 0 669 1 0 1 1 0 8 0 amappl4 96 2252 0 2221 2 1 1 2 0 8 0 amappl3 88 518 0 512 1 0 1 1 0 8 0 amappl2 80 15584 0 15530 3 1 2 2 0 8 0 amappl1 72 64050 0 63613 24 14 10 19 0 8 0 amappl 72 6673 0 6636 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 118 0 17 2 0 2 2 0 8 0 uaddrrnd 24 2229 0 2215 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2229 0 2215 1 0 1 1 0 8 0 vmmpekpl 168 21296 0 21271 2 0 2 2 0 8 0 vmmpepl 168 268235 0 266876 131 54 77 78 0 357 13 vmsppl 360 2228 0 2215 2 0 2 2 0 8 0 pdppl 4096 4465 0 4430 6 0 6 6 0 8 1 pvpl 32 697748 0 688198 230 121 109 121 0 265 24 pmappl 232 2228 0 2215 8 7 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 598 0 4 17 0 17 17 0 8 0