panic: pool_do_get: shmpl free list modified: page 0xfffffd806697e000; item addr 0xfffffd806697ee80; offset 0x10=0xdead4000 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 7539 36563 32767 0x10 0 0 syz-executor.1 *337665 36563 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(ffffffff822fa008,1,ffff800020c5fa48) 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(ffff800020b49080,ffff800020c5fbe8,80,ffff800020c5fc50) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b49080,ffff800020c5fbe8,ffff800020c5fc50) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c5fcc0) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5fcc0) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,50f82cb6010) 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 0xfffffd806697e000; item addr 0xfffffd806697ee80; 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(ffffffff822fa008,1,ffff800020c5fa48) 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(ffff800020b49080,ffff800020c5fbe8,80,ffff800020c5fc50) at shmget_allocate_segment+0x15e sys/kern/sysv_shm.c:409 sys_shmget(ffff800020b49080,ffff800020c5fbe8,ffff800020c5fc50) at sys_shmget+0x13f sys/kern/sysv_shm.c:472 syscall(ffff800020c5fcc0) at syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5fcc0) at syscall+0x576 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,fffffffffffffff4,0,4,50f82cb6010) at Xsyscall+0x128 end of kernel end trace frame: 0x357, count: -8 ddb{1}> show registers rdi 0xffffffff813048c7 db_enter+0x17 rsi 0x3065 __ALIGN_SIZE+0x2065 rbp 0xffff800020c5f890 rbx 0xffff800020c5f940 rdx 0x3066 __ALIGN_SIZE+0x2066 rcx 0xffff800004b54000 rax 0xffff800004b54000 r8 0xffffffff8102a163 kprintf+0x173 r9 0x1 r10 0x25 r11 0x18f9db91f590cd04 r12 0x3000000008 r13 0xffff800020c5f8a0 r14 0x100 r15 0x1 rip 0xffffffff813048c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c5f880 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=337665 stat=onproc flags process=10 proc=4000000 pri=70, usrpri=70, nice=20 forw=0xffffffffffffffff, list=0xffff800020b48270,0xffffffff82334858 process=0xffff800020b4a9e8 user=0xffff800020c5a000, vmspace=0xfffffd807f00b708 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 36563 7539 94469 32767 7 0x10 syz-executor.1 *36563 337665 94469 32767 7 0x4000010 syz-executor.1 72739 87655 79435 32767 3 0x90 nanosleep syz-executor.0 79435 31600 97602 0 3 0x82 wait syz-executor.0 94469 490512 75729 32767 3 0x90 nanosleep syz-executor.1 75729 354960 97602 0 3 0x82 wait syz-executor.1 41407 126760 0 0 3 0x14200 bored sosplice 97602 324226 50393 0 3 0x82 thrsleep syz-fuzzer 97602 413969 50393 0 3 0x4000082 nanosleep syz-fuzzer 97602 21820 50393 0 3 0x4000082 thrsleep syz-fuzzer 97602 26728 50393 0 3 0x4000082 thrsleep syz-fuzzer 97602 148970 50393 0 3 0x4000082 thrsleep syz-fuzzer 97602 129385 50393 0 3 0x4000082 thrsleep syz-fuzzer 97602 255803 50393 0 3 0x4000082 thrsleep syz-fuzzer 97602 17594 50393 0 3 0x4000082 kqread syz-fuzzer 97602 165515 50393 0 3 0x4000082 thrsleep syz-fuzzer 97602 48498 50393 0 3 0x4000082 nanosleep syz-fuzzer 50393 134137 94803 0 3 0x10008a pause ksh 94803 412146 49181 0 3 0x92 select sshd 17657 204198 1 0 3 0x100083 ttyin getty 49181 84842 1 0 3 0x80 select sshd 3008 213451 92573 73 3 0x100010 ffs_fsync syslogd 92573 265188 1 0 3 0x100082 netio syslogd 18831 237892 1 77 3 0x100090 poll dhclient 64712 207110 1 0 3 0x80 poll dhclient 48615 315384 0 0 3 0x14200 pgzero zerothread 38137 87397 0 0 3 0x14200 aiodoned aiodoned 77997 291582 0 0 3 0x14200 syncer update 21348 485741 0 0 3 0x14200 cleaner cleaner 7622 241082 0 0 3 0x14200 reaper reaper 46653 268756 0 0 3 0x14200 pgdaemon pagedaemon 32452 378984 0 0 3 0x14200 bored crynlk 24409 2292 0 0 3 0x14200 bored crypto 2916 106710 0 0 3 0x40014200 acpi0 acpi0 39179 66367 0 0 3 0x40014200 idle1 86188 39355 0 0 3 0x14200 bored softnet 73525 169153 0 0 3 0x14200 bored systqmp 54841 193748 0 0 3 0x14200 bored systq 78644 66641 0 0 3 0x40014200 bored softclock 92227 512510 0 0 3 0x40014200 idle0 32042 243460 0 0 3 0x14200 bored smr 1 375575 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 (0xffffffff822fa018) 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 36563 (syz-executor.1) thread 0xffff800020b49080 (337665) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82337a50) 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 (0xffffffff822fa018) 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 3008 (syslogd) thread 0xffff800020b952d0 (213451) exclusive rrwlock inode r = 0 (0xfffffd806ec126f8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x5a4 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x43c sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 sys_fsync+0x114 sys/kern/vfs_syscalls.c:2704 #6 syscall+0x576 mi_syscall sys/sys/syscall_mi.h:99 [inline] #6 syscall+0x576 sys/arch/amd64/amd64/trap.c:574 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9459 6321K 6321K 78643K 10741 0 0 pcb 23 9K 11K 78643K 660 0 0 rtable 97 3K 3K 78643K 1422 0 0 ifaddr 36 11K 11K 78643K 279 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 62 0 0 iov 0 0K 16K 78643K 153 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 2154 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 29 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 199 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 33K 78643K 1340 0 0 sigio 0 0K 0K 78643K 40 0 0 proc 41 38K 58K 78643K 1205 0 0 subproc 68 69634K 69634K 78643K 1394 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 196 0 0 in_multi 33 2K 2K 78643K 508 0 0 ether_multi 1 0K 0K 78643K 14 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 425 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 21K 30K 78643K 4950 0 0 UVM aobj 71 3K 3K 78643K 83 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 64 0 0 NDP 5 0K 0K 78643K 126 0 0 temp 121 2378K 2446K 78643K 8363 0 0 kqueue 0 0K 0K 78643K 16 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 43 0 39 1 0 1 1 0 8 0 inpcbpl 280 679 0 670 1 0 1 1 0 8 0 plimitpl 152 157 0 148 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 392 0 352 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 272 0 267 1 0 1 1 0 8 0 nd6 48 82 0 78 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1858 0 1672 12 0 12 12 0 8 0 art_table 32 1859 0 1672 2 0 2 2 0 8 0 art_node 16 391 0 357 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 194 0 184 1 0 1 1 0 8 0 shmpl 112 81 0 12 3 0 3 3 0 8 1 shmpl: pool(0xffffffff822fa008:shmpl): page inconsistency: page 0xfffffd806697e000; item ordinal 0; addr 0x7d07189dff00421e dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2984 0 1539 47 0 47 47 0 8 0 ffsino 272 2984 0 1539 97 0 97 97 0 8 0 nchpl 144 4958 0 3345 61 1 60 61 0 8 0 uvmvnodes 72 3690 0 0 68 0 68 68 0 8 0 vnodes 200 3690 0 0 195 0 195 195 0 8 0 namei 1024 17117 0 17117 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 13936 0 13935 13 12 1 6 0 8 0 sigapl 432 1393 0 1378 4 2 2 3 0 8 0 futexpl 56 12841 0 12841 1 0 1 1 0 8 1 knotepl 112 1170 0 1151 1 0 1 1 0 8 0 kqueuepl 104 333 0 331 1 0 1 1 0 8 0 pipepl 112 1258 0 1239 4 3 1 2 0 8 0 fdescpl 488 1394 0 1378 3 0 3 3 0 8 0 filepl 152 9653 0 9555 7 2 5 7 0 8 1 lockfpl 104 406 0 406 2 1 1 1 0 8 1 lockfspl 32 777 0 777 2 1 1 1 0 8 1 sessionpl 112 56 0 46 1 0 1 1 0 8 0 pgrppl 48 66 0 56 1 0 1 1 0 8 0 ucredpl 96 2812 0 2803 1 0 1 1 0 8 0 zombiepl 144 1378 0 1377 2 1 1 1 0 8 0 processpl 840 1410 0 1377 4 0 4 4 0 8 0 procpl 600 3584 0 3541 4 0 4 4 0 8 0 srpgc 64 222 0 222 4 3 1 1 0 8 1 sosppl 128 19 0 19 5 4 1 1 0 8 1 sockpl 384 1360 0 1341 5 2 3 4 0 8 1 mcl64k 65536 15 0 0 2 0 2 2 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 11 0 0 2 0 2 2 0 8 0 mcl9k 9216 13 0 0 1 0 1 1 0 8 0 mcl8k 8192 10 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 127 0 0 15 3 12 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 187 0 0 9 0 9 9 0 8 0 bufpl 256 8094 0 1141 435 0 435 435 0 8 0 anonpl 16 181116 0 174306 68 35 33 46 0 125 2 amapchunkpl 152 10329 0 10239 27 18 9 11 0 158 5 amappl16 192 7167 0 6804 65 44 21 31 0 8 1 amappl15 184 58 0 58 3 3 0 1 0 8 0 amappl14 176 263 0 259 2 1 1 1 0 8 0 amappl13 168 171 0 169 6 5 1 1 0 8 0 amappl12 160 111 0 109 6 5 1 1 0 8 0 amappl11 152 250 0 236 1 0 1 1 0 8 0 amappl10 144 286 0 279 2 1 1 1 0 8 0 amappl9 136 895 0 890 1 0 1 1 0 8 0 amappl8 128 571 0 552 1 0 1 1 0 8 0 amappl7 120 294 0 287 1 0 1 1 0 8 0 amappl6 112 282 0 273 1 0 1 1 0 8 0 amappl5 104 383 0 373 1 0 1 1 0 8 0 amappl4 96 1585 0 1559 2 1 1 2 0 8 0 amappl3 88 404 0 398 1 0 1 1 0 8 0 amappl2 80 9772 0 9718 2 0 2 2 0 8 0 amappl1 72 42412 0 41960 23 13 10 19 0 8 0 amappl 72 4116 0 4081 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 82 0 12 2 0 2 2 0 8 0 uaddrrnd 24 1394 0 1378 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1394 0 1378 1 0 1 1 0 8 0 vmmpekpl 168 15152 0 15129 2 0 2 2 0 8 0 vmmpepl 168 167993 0 166572 109 37 72 78 0 357 6 vmsppl 360 1393 0 1378 2 0 2 2 0 8 0 pdppl 4096 2795 0 2756 6 0 6 6 0 8 1 pvpl 32 484378 0 474419 158 62 96 122 0 265 9 pmappl 232 1393 0 1378 7 6 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 591 0 6 17 0 17 17 0 8 0