panic: pool_do_get: shmpl free list modified: page 0xfffffd80657da000; item addr 0xfffffd80657da550; offset 0x10=0xdead4000 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 382645 52101 32767 0x10 0 1 syz-executor.0 * 67341 52101 32767 0x10 0x4000000 0K 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(ffffffff823c2fb0,1,ffff800020c4b7a8) 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(ffff800020b28bd0,ffff800020c4b948,2,ffff800020c4b9b0) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b28bd0,ffff800020c4b948,ffff800020c4b9b0) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c4ba20) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c4ba20) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,fe732b1e010) 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 0xfffffd80657da000; item addr 0xfffffd80657da550; offset 0x10=0xdead4000 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(ffffffff823c2fb0,1,ffff800020c4b7a8) 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(ffff800020b28bd0,ffff800020c4b948,2,ffff800020c4b9b0) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b28bd0,ffff800020c4b948,ffff800020c4b9b0) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c4ba20) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c4ba20) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,fe732b1e010) at Xsyscall+0x128 end of kernel end trace frame: 0x357, count: -8 ddb{0}> show registers rdi 0xffffffff81c7c417 db_enter+0x17 rsi 0x2c99 __ALIGN_SIZE+0x1c99 rbp 0xffff800020c4b5f0 rbx 0xffff800020c4b6a0 rdx 0x2c9a __ALIGN_SIZE+0x1c9a rcx 0xffff80000219f000 rax 0xffff80000219f000 r8 0xffffffff8137fc73 kprintf+0x173 r9 0x1 r10 0x25 r11 0x3a0c74de54214e24 r12 0x3000000008 r13 0xffff800020c4b600 r14 0x100 r15 0x1 rip 0xffffffff81c7c418 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c4b5e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=67341 stat=onproc flags process=10 proc=4000000 pri=60, usrpri=60, nice=20 forw=0xffffffffffffffff, list=0xffff800020b29080,0xffff800020b28280 process=0xffff800020b2b078 user=0xffff800020c46000, vmspace=0xfffffd807f00c5a0 estcpu=10, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 17788 136258 98818 32767 2 0x10 syz-executor.1 17788 271968 98818 32767 2 0x4000010 syz-executor.1 17788 301316 98818 32767 2 0x4000010 syz-executor.1 52101 382645 52833 32767 7 0x10 syz-executor.0 *52101 67341 52833 32767 7 0x4000010 syz-executor.0 52101 469010 52833 32767 3 0x4000090 fsleep syz-executor.0 98818 136392 17893 32767 3 0x90 nanosleep syz-executor.1 17893 79404 41016 0 3 0x82 wait syz-executor.1 52833 134044 55844 32767 3 0x90 nanosleep syz-executor.0 55844 477753 41016 0 3 0x82 wait syz-executor.0 5485 267384 0 0 3 0x14200 bored sosplice 41016 153362 9818 0 3 0x82 thrsleep syz-fuzzer 41016 336945 9818 0 3 0x4000082 thrsleep syz-fuzzer 41016 267941 9818 0 3 0x4000082 thrsleep syz-fuzzer 41016 518626 9818 0 3 0x4000082 thrsleep syz-fuzzer 41016 137556 9818 0 3 0x4000082 kqread syz-fuzzer 41016 365812 9818 0 3 0x4000082 thrsleep syz-fuzzer 41016 192224 9818 0 3 0x4000082 thrsleep syz-fuzzer 41016 418676 9818 0 3 0x4000082 thrsleep syz-fuzzer 41016 158787 9818 0 3 0x4000082 thrsleep syz-fuzzer 41016 501824 9818 0 3 0x4000082 thrsleep syz-fuzzer 9818 137017 59453 0 3 0x10008a pause ksh 59453 7004 76395 0 3 0x92 select sshd 50818 379700 1 0 3 0x100083 ttyin getty 76395 421864 1 0 3 0x80 select sshd 12494 263002 25274 73 3 0x100090 kqread syslogd 25274 448224 1 0 3 0x100082 netio syslogd 31648 460324 1 77 3 0x100090 poll dhclient 28841 397291 1 0 3 0x80 poll dhclient 59582 246366 0 0 3 0x14200 pgzero zerothread 82920 142215 0 0 3 0x14200 aiodoned aiodoned 60071 270698 0 0 3 0x14200 syncer update 29766 381472 0 0 3 0x14200 cleaner cleaner 43559 509519 0 0 3 0x14200 reaper reaper 26660 115463 0 0 3 0x14200 pgdaemon pagedaemon 46940 286288 0 0 3 0x14200 bored crynlk 75100 300641 0 0 3 0x14200 bored crypto 32899 72553 0 0 3 0x40014200 acpi0 acpi0 14447 521272 0 0 3 0x40014200 idle1 4067 430679 0 0 3 0x14200 bored softnet 44375 511574 0 0 3 0x14200 bored systqmp 13681 43572 0 0 3 0x14200 bored systq 60019 16013 0 0 3 0x40014200 bored softclock 9418 478271 0 0 3 0x40014200 idle0 24398 212388 0 0 3 0x14200 bored smr 1 98058 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 (0xffffffff823c2fc0) 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 52101 (syz-executor.0) thread 0xffff800020b28bd0 (67341) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823b0150) 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 (0xffffffff823c2fc0) 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 9460 6321K 6321K 78643K 10897 0 0 pcb 25 9K 10K 78643K 786 0 0 rtable 97 3K 3K 78643K 2416 0 0 ifaddr 36 12K 12K 78643K 483 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 95 0 0 iov 0 0K 32K 78643K 148 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 75K 78643K 2728 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 33 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 229 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 8 25K 33K 78643K 1773 0 0 sigio 0 0K 0K 78643K 31 0 0 proc 41 38K 78K 78643K 1850 0 0 subproc 68 69634K 69634K 78643K 2448 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 198 0 0 in_multi 33 2K 2K 78643K 835 0 0 ether_multi 1 0K 0K 78643K 6 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 589 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 96 21K 30K 78643K 6267 0 0 UVM aobj 97 7K 7K 78643K 107 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 110 0 0 NDP 7 0K 0K 78643K 219 0 0 temp 121 2710K 2778K 78643K 11236 0 0 kqueue 0 0K 0K 78643K 12 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 74 0 70 1 0 1 1 0 8 0 inpcbpl 280 934 0 926 1 0 1 1 0 8 0 plimitpl 152 237 0 228 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 671 0 631 3 1 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 353 0 349 1 0 1 1 0 8 0 nd6 48 144 0 140 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 3299 0 3111 14 2 12 12 0 8 0 art_table 32 3300 0 3111 2 0 2 2 0 8 0 art_node 16 670 0 636 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 9 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 227 0 217 1 0 1 1 0 8 0 shmpl 112 105 0 10 3 0 3 3 0 8 0 shmpl: pool(0xffffffff823c2fb0:shmpl): page inconsistency: page 0xfffffd80657da000; item ordinal 0; addr 0xfe806d99b65bd4 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3309 0 1836 48 0 48 48 0 8 0 ffsino 272 3309 0 1836 99 0 99 99 0 8 0 nchpl 144 5769 0 4129 61 0 61 61 0 8 0 uvmvnodes 72 4542 0 0 83 0 83 83 0 8 0 vnodes 200 4542 0 0 240 0 240 240 0 8 0 namei 1024 20649 0 20649 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 15262 0 15262 11 10 1 6 0 8 1 sigapl 432 1733 0 1717 5 3 2 3 0 8 0 futexpl 56 15313 0 15312 1 0 1 1 0 8 0 knotepl 112 1847 0 1828 1 0 1 1 0 8 0 kqueuepl 104 354 0 352 1 0 1 1 0 8 0 pipepl 112 1508 0 1489 4 3 1 2 0 8 0 fdescpl 488 1734 0 1717 4 1 3 3 0 8 0 filepl 152 11745 0 11646 10 5 5 6 0 8 1 lockfpl 104 438 0 438 4 3 1 1 0 8 1 lockfspl 32 872 0 872 4 3 1 1 0 8 1 sessionpl 112 87 0 77 1 0 1 1 0 8 0 pgrppl 48 97 0 87 1 0 1 1 0 8 0 ucredpl 96 3226 0 3217 1 0 1 1 0 8 0 zombiepl 144 1717 0 1717 2 1 1 1 0 8 1 processpl 840 1750 0 1717 4 0 4 4 0 8 0 procpl 600 4370 0 4324 4 0 4 4 0 8 0 srpgc 64 374 0 374 4 3 1 1 0 8 1 sosppl 128 34 0 34 4 3 1 1 0 8 1 sockpl 384 1765 0 1745 4 1 3 3 0 8 1 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 10 0 0 1 0 1 1 0 8 0 mcl9k 9216 12 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 10 0 0 2 0 2 2 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 132 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 248 0 0 11 0 11 11 0 8 0 bufpl 256 8188 0 1172 439 0 439 439 0 8 0 anonpl 16 185105 0 179106 64 32 32 42 0 125 1 amapchunkpl 152 13103 0 13017 28 19 9 9 0 158 5 amappl16 192 6907 0 6545 52 32 20 31 0 8 0 amappl15 184 288 0 278 7 6 1 1 0 8 0 amappl14 176 276 0 272 2 1 1 1 0 8 0 amappl13 168 121 0 121 5 4 1 1 0 8 1 amappl12 160 252 0 249 1 0 1 1 0 8 0 amappl11 152 390 0 376 1 0 1 1 0 8 0 amappl10 144 386 0 383 1 0 1 1 0 8 0 amappl9 136 1003 0 999 1 0 1 1 0 8 0 amappl8 128 638 0 607 2 0 2 2 0 8 0 amappl7 120 445 0 438 1 0 1 1 0 8 0 amappl6 112 423 0 414 1 0 1 1 0 8 0 amappl5 104 419 0 409 1 0 1 1 0 8 0 amappl4 96 1913 0 1874 2 0 2 2 0 8 0 amappl3 88 324 0 319 1 0 1 1 0 8 0 amappl2 80 11540 0 11473 2 0 2 2 0 8 0 amappl1 72 51469 0 50999 26 16 10 19 0 8 1 amappl 72 5128 0 5092 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 106 0 10 2 0 2 2 0 8 0 uaddrrnd 24 1734 0 1717 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1734 0 1717 1 0 1 1 0 8 0 vmmpekpl 168 17344 0 17318 2 0 2 2 0 8 0 vmmpepl 168 211661 0 210132 108 35 73 77 0 357 6 vmsppl 360 1733 0 1717 2 0 2 2 0 8 0 pdppl 4096 3475 0 3434 7 1 6 6 0 8 0 pvpl 32 545591 0 536324 166 74 92 114 0 265 4 pmappl 232 1733 0 1717 5 4 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 598 0 5 17 0 17 17 0 8 0