pool: free list modified: fdescpl (2)

1 view
Skip to first unread message

syzbot

unread,
May 7, 2022, 2:20:30 PM5/7/22
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a7a028b08355 Rewrite asn1_d2i_ex_primitive() with CBS.
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1363a12af00000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf87b6915a88cd0d
dashboard link: https://syzkaller.appspot.com/bug?extid=fca7e4fa773c90886819

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fca7e4...@syzkaller.appspotmail.com

panic: pool_do_get: fdescpl free list modified: page 0xfffffd8068eb1000; item addr 0xfffffd8068eb11f8; offset 0x48=0xdeafbeaf
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
517950 8702 32767 0x10 0 0 syz-executor.4
*353647 58896 32767 0x10 0 1K syz-executor.7
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825fbce3) at panic+0x177 sys/kern/subr_prf.c:202
pool_do_get(ffffffff82b53fb8,9,ffff80002af5e728) at pool_do_get+0x474 sys/kern/subr_pool.c:741
pool_get(ffffffff82b53fb8,9) at pool_get+0xe9 sys/kern/subr_pool.c:584
fdcopy(ffff8000fffe8440) at fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
fdcopy(ffff8000fffe8440) at fdcopy+0x44 sys/kern/kern_descrip.c:1111
process_new(ffff8000fffec7e8,ffff8000fffe8440,1) at process_new+0x13b sys/kern/kern_fork.c:259
fork1(ffff8000fffe7cf0,1,ffffffff8245ee00,0,ffff80002af5e960,0) at fork1+0x30b sys/kern/kern_fork.c:383
syscall(ffff80002af5e9d0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002af5e9d0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7fffff8ad0, count: 6
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
*cpu1: pool_do_get: fdescpl free list modified: page 0xfffffd8068eb1000; item addr 0xfffffd8068eb11f8; offset 0x48=0xdeafbeaf
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825fbce3) at panic+0x177 sys/kern/subr_prf.c:202
pool_do_get(ffffffff82b53fb8,9,ffff80002af5e728) at pool_do_get+0x474 sys/kern/subr_pool.c:741
pool_get(ffffffff82b53fb8,9) at pool_get+0xe9 sys/kern/subr_pool.c:584
fdcopy(ffff8000fffe8440) at fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
fdcopy(ffff8000fffe8440) at fdcopy+0x44 sys/kern/kern_descrip.c:1111
process_new(ffff8000fffec7e8,ffff8000fffe8440,1) at process_new+0x13b sys/kern/kern_fork.c:259
fork1(ffff8000fffe7cf0,1,ffffffff8245ee00,0,ffff80002af5e960,0) at fork1+0x30b sys/kern/kern_fork.c:383
syscall(ffff80002af5e9d0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002af5e9d0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7fffff8ad0, count: -9
ddb{1}> show registers
rdi 0
rsi 0x1
rbp 0xffff80002af5e570
rbx 0xffff800020ce9c5f
rdx 0
rcx 0
rax 0xffff8000fffe7cf0
r8 0x101010101010101
r9 0x8080808080808080
r10 0xf7dbe6335a3624d6
r11 0xcc929b7d57edcc76
r12 0xffff800020ce9a60
r13 0
r14 0
r15 0x1
rip 0xffffffff8217c168 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff80002af5e560
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor.7) pid=353647 stat=onproc
flags process=10<SUGID> proc=0
pri=59, usrpri=59, nice=20
forw=0xffffffffffffffff, list=0xffff8000fffefa40,0xffff8000fffe6d40
process=0xffff8000fffe8440 user=0xffff80002af59000, vmspace=0xfffffd8068f02748
estcpu=36, cpticks=1, pctcpu=0.1
user=0, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
22352 85274 83600 32767 2 0x10 syz-executor.6
22352 456573 83600 32767 3 0x4000090 fsleep syz-executor.6
60148 312332 20780 32767 2 0x10 syz-executor.0
60148 475463 20780 32767 3 0x4000090 fsleep syz-executor.0
60148 200067 20780 32767 3 0x4000090 fsleep syz-executor.0
8888 322885 54091 32767 2 0x10 syz-executor.1
8888 381733 54091 32767 3 0x4000090 fsleep syz-executor.1
8888 47088 54091 32767 3 0x4000090 fsleep syz-executor.1
8888 447586 54091 32767 3 0x4000090 fsleep syz-executor.1
8702 517950 28315 32767 7 0x10 syz-executor.4
8702 413600 28315 32767 3 0x4000090 kqread syz-executor.4
34614 486486 0 0 3 0x14200 bored sosplice
83600 502971 43881 32767 3 0x90 nanoslp syz-executor.6
*58896 353647 71915 32767 7 0x10 syz-executor.7
71915 505823 27977 0 3 0x82 wait syz-executor.7
1668 121533 76539 32767 2 0x10 syz-executor.3
43881 331576 27977 0 3 0x82 wait syz-executor.6
71536 153337 35630 32767 3 0x90 nanoslp syz-executor.5
28315 315475 67540 32767 3 0x90 nanoslp syz-executor.4
67540 362392 27977 0 3 0x82 wait syz-executor.4
39255 256914 71927 32767 3 0x90 nanoslp syz-executor.2
35630 382996 27977 0 3 0x82 wait syz-executor.5
76539 146619 27977 0 3 0x82 wait syz-executor.3
71927 427912 27977 0 3 0x82 wait syz-executor.2
54091 195988 42789 32767 3 0x90 nanoslp syz-executor.1
20780 397661 42457 32767 3 0x90 nanoslp syz-executor.0
42789 327756 27977 0 3 0x82 wait syz-executor.1
42457 305690 27977 0 3 0x82 wait syz-executor.0
27977 271620 96672 0 3 0x82 thrsleep syz-fuzzer
27977 195146 96672 0 3 0x4000082 nanoslp syz-fuzzer
27977 223936 96672 0 3 0x4000082 thrsleep syz-fuzzer
27977 8268 96672 0 3 0x4000082 thrsleep syz-fuzzer
27977 486315 96672 0 3 0x4000082 thrsleep syz-fuzzer
27977 221789 96672 0 3 0x4000082 thrsleep syz-fuzzer
27977 340560 96672 0 3 0x4000082 kqread syz-fuzzer
27977 296095 96672 0 3 0x4000082 thrsleep syz-fuzzer
27977 78938 96672 0 3 0x4000082 thrsleep syz-fuzzer
96672 224016 49697 0 3 0x10008a sigsusp ksh
49697 390144 59574 0 3 0x9a kqread sshd
10097 492831 1 0 3 0x100083 ttyin getty
59574 382224 1 0 3 0x88 kqread sshd
17722 257184 59183 73 3 0x1100090 kqread syslogd
59183 414244 1 0 3 0x100082 netio syslogd
64725 451714 1 0 3 0x100080 kqread resolvd
48516 169162 87679 77 3 0x100092 kqread dhcpleased
23879 234896 87679 77 3 0x100092 kqread dhcpleased
87679 246183 1 0 3 0x80 kqread dhcpleased
13145 349229 0 0 3 0x14200 bored smr
16379 62592 0 0 2 0x14200 zerothread
97256 116049 0 0 3 0x14200 aiodoned aiodoned
81604 376150 0 0 3 0x14200 syncer update
2673 255639 0 0 3 0x14200 cleaner cleaner
93681 115366 0 0 3 0x14200 reaper reaper
49358 118659 0 0 3 0x14200 pgdaemon pagedaemon
71150 132054 0 0 3 0x14200 bored viomb
295 465706 0 0 3 0x40014200 acpi0 acpi0
25376 484992 0 0 3 0x40014200 idle1
26751 55213 0 0 3 0x14200 bored softnet
57791 288700 0 0 3 0x14200 bored softnet
99728 437644 0 0 3 0x14200 bored softnet
99963 376168 0 0 3 0x14200 bored softnet
7138 18203 0 0 3 0x14200 fdlock systqmp
96711 405317 0 0 3 0x14200 bored systq
62207 253248 0 0 3 0x40014200 bored softclock
87219 29012 0 0 3 0x40014200 idle0
1 186325 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
CPU 1:
exclusive mutex fdescpl r = 0 (0xffffffff82b53fc8)
#0 witness_lock+0x44d
#1 mtx_enter_try+0x100
#2 mtx_enter+0x4b sys/kern/kern_lock.c:266
#3 pool_get+0xbd sys/kern/subr_pool.c:581
#4 fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
#4 fdcopy+0x44 sys/kern/kern_descrip.c:1111
#5 process_new+0x13b sys/kern/kern_fork.c:259
#6 fork1+0x30b sys/kern/kern_fork.c:383
#7 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#7 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#8 Xsyscall+0x128
Process 58896 (syz-executor.7) thread 0xffff8000fffe7cf0 (353647)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff829d8990)
#0 witness_lock+0x44d
#1 syscall+0x3ef mi_syscall sys/sys/syscall_mi.h:93 [inline]
#1 syscall+0x3ef sys/arch/amd64/amd64/trap.c:585
#2 Xsyscall+0x128
exclusive mutex fdescpl r = 0 (0xffffffff82b53fc8)
#0 witness_lock+0x44d
#1 mtx_enter_try+0x100
#2 mtx_enter+0x4b sys/kern/kern_lock.c:266
#3 pool_get+0xbd sys/kern/subr_pool.c:581
#4 fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
#4 fdcopy+0x44 sys/kern/kern_descrip.c:1111
#5 process_new+0x13b sys/kern/kern_fork.c:259
#6 fork1+0x30b sys/kern/kern_fork.c:383
#7 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#7 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#8 Xsyscall+0x128
Process 7138 (systqmp) thread 0xffff8000210f8d20 (18203)
shared rwlock systqmp r = 0 (0xffffffff829994d0)
#0 witness_lock+0x44d
#1 taskq_thread+0xca sys/kern/kern_task.c:445
#2 proc_trampoline+0x1c
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10215 6413K 6420K 78643K 11307 0
pcb 13 10K 12K 78643K 15 0
rtable 234 6K 6K 78643K 351 0
ifaddr 81 16K 16K 78643K 82 0
counters 56 35K 35K 78643K 56 0
ioctlops 0 0K 2K 78643K 36 0
iov 0 0K 12K 78643K 146 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 5 0
vnodes 1270 79K 79K 78643K 1405 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 5K 78643K 6 0
VM map 2 1K 1K 78643K 2 0
sem 12 0K 0K 78643K 123 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 22 81K 121K 78643K 776 0
proc 56 78K 103K 78643K 511 0
subproc 104 6K 6K 78643K 104 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 16 0
in_multi 99 6K 6K 78643K 102 0
ether_multi 1 0K 0K 78643K 1 0
mrt 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 289 1288K 1288K 78643K 289 0
exec 0 0K 2K 78643K 637 0
tdb 3 0K 0K 78643K 3 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 220 80K 83K 78643K 6117 0
UVM aobj 131 4K 4K 78643K 137 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 10 0
NDP 11 0K 2K 78643K 27 0
temp 119 4728K 4792K 78643K 4848 0
kqueue 15 22K 25K 78643K 106 0
SYN cache 2 16K 16K 78643K 2 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 22 0 0 1 0 1 1 0 8 0
rtpcb 120 73 0 70 2 1 1 2 0 8 0
rtentry 112 113 0 3 4 0 4 4 0 8 0
unpcb 136 643 0 630 10 6 4 6 0 8 3
syncache 296 14 0 14 4 3 1 1 0 8 1
tcpqe 32 33 0 33 2 1 1 1 0 8 1
tcpcb 736 381 0 373 23 9 14 14 0 8 13
arp 120 18 0 0 1 0 1 1 0 8 0
inpcb 312 733 0 723 19 10 9 9 0 8 8
nd6 48 26 0 2 1 0 1 1 0 8 0
kcovpl 48 8 0 0 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 479 0 26 30 1 29 30 0 8 0
art_table 32 480 0 26 4 0 4 4 0 8 0
art_node 16 112 0 12 1 0 1 1 0 8 0
sysvmsgpl 40 47 0 7 2 1 1 1 0 8 0
semapl 112 121 0 111 1 0 1 1 0 8 0
shmpl 112 134 0 6 4 0 4 4 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 2378 0 947 90 0 90 90 0 8 0
ffsino 272 2378 0 947 96 0 96 96 0 8 0
nchpl 144 3691 0 2015 63 0 63 63 0 8 0
uvmvnodes 80 2491 0 0 51 0 51 51 0 8 0
vnodes 224 2491 0 0 147 0 147 147 0 8 0
namei 1024 13441 0 13441 2 1 1 2 0 8 1
percpumem 16 40 0 0 1 0 1 1 0 8 0
kstatmem 264 22 0 0 2 0 2 2 0 8 0
scxspl 216 10818 0 10818 9 8 1 8 0 8 1
plimitpl 152 344 0 322 3 1 2 2 0 8 1
sigapl 424 1054 0 1001 7 0 7 7 0 8 0
futexpl 64 6230 0 6224 1 0 1 1 0 8 0
knotepl 120 111 0 0 4 0 4 4 0 8 0
kqueuepl 216 418 0 407 9 8 1 7 0 8 0
pipepl 336 279 0 250 8 5 3 8 0 8 0
fdescpl 496 1036 0 1003 6 1 5 6 0 8 0
pool(0xffffffff82b53fb8:fdescpl): page inconsistency: page 0xfffffd8068eb1000; 2 on list, 5 missing, 8 items per page
filepl 152 7257 0 7019 27 11 16 19 0 8 6
lockfpl 104 251 0 248 1 0 1 1 0 8 0
lockfspl 48 48 0 45 1 0 1 1 0 8 0
sessionpl 144 23 0 7 1 0 1 1 0 8 0
pgrppl 48 23 0 7 1 0 1 1 0 8 0
ucredpl 96 1528 0 1510 1 0 1 1 0 8 0
zombiepl 144 1003 0 1001 1 0 1 1 0 8 0
processpl 1064 1055 0 1001 5 1 4 5 0 8 0
procpl 672 2429 0 2360 8 1 7 8 0 8 0
sosppl 168 17 0 17 3 2 1 1 0 8 1
sockpl 480 1460 0 1434 42 30 12 21 0 8 8
mcl64k 65536 9 0 0 2 0 2 2 0 8 0
mcl16k 16384 5 0 0 1 0 1 1 0 8 0
mcl12k 12288 5 0 0 1 0 1 1 0 8 0
mcl9k 9216 3 0 0 1 0 1 1 0 8 0
mcl8k 8192 6 0 0 1 0 1 1 0 8 0
mcl4k 4096 10 0 0 2 0 2 2 0 8 0
mcl2k2 2112 3 0 0 1 0 1 1 0 8 0
mcl2k 2048 152 0 0 18 0 18 18 0 8 0
mtagpl 96 3 0 0 1 0 1 1 0 8 0
mbufpl 256 408 0 0 25 0 25 25 0 8 0
bufpl 288 4567 0 144 316 0 316 316 0 8 0
anonpl 24 191896 0 179848 116 15 101 114 0 186 20
amapchunkpl 152 16112 0 15543 26 1 25 25 0 158 0
amappl16 200 2981 0 2625 39 19 20 39 0 8 0
amappl15 192 83 0 80 1 0 1 1 0 8 0
amappl14 184 8 0 5 2 1 1 1 0 8 0
amappl13 176 169 0 165 1 0 1 1 0 8 0
amappl12 168 99 0 91 1 0 1 1 0 8 0
amappl11 160 78 0 64 1 0 1 1 0 8 0
amappl10 152 112 0 106 1 0 1 1 0 8 0
amappl9 144 759 0 749 1 0 1 1 0 8 0
amappl8 136 637 0 589 2 0 2 2 0 8 0
amappl7 128 208 0 193 1 0 1 1 0 8 0
amappl6 120 467 0 446 2 1 1 2 0 8 0
amappl5 112 653 0 631 1 0 1 1 0 8 0
amappl4 104 787 0 761 2 0 2 2 0 8 0
amappl3 96 2675 0 2620 2 0 2 2 0 8 0
amappl2 88 1470 0 1402 3 1 2 3 0 8 0
amappl1 80 26337 0 25663 20 4 16 19 0 8 0
amappl 88 5671 0 5513 5 0 5 5 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 253 0 253 1 1 0 1 0 8 0
dma64 64 6 0 6 1 1 0 1 0 8 0
dma32 32 7 0 7 1 1 0 1 0 8 0
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 136 0 6 3 0 3 3 0 8 0
uaddrrnd 24 1036 0 1003 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 1036 0 1003 1 0 1 1 0 8 0
vmmpekpl 168 12964 0 12918 3 0 3 3 0 8 0
vmmpepl 168 103039 0 100548 145 21 124 136 0 357 4
vmsppl 368 1035 0 1003 4 0 4 4 0 8 0
rwobjpl 56 29410 0 25481 57 0 57 57 0 8 0
pdppl 4096 2079 0 2006 116 35 81 93 0 8 8
pvpl 32 475095 0 458144 258 36 222 256 0 265 76
pmappl 248 1035 0 1003 3 0 3 3 0 8 0
extentpl 40 58 0 38 1 0 1 1 0 8 0
phpool 112 760 0 63 20 0 20 20 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffffffff829b2ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x2f kd_curproc sys/dev/kcov.c:578 [inline]
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x2f sys/dev/kcov.c:148
__mp_lock(ffffffff829d8788) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff829d8788) at __mp_lock+0x133 sys/kern/kern_lock.c:147
softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88
Xsoftclock() at Xsoftclock+0x1f
end of kernel
end trace frame: 0x7f7fffff8710, count: 8
ddb{0}> trace
x86_ipi_db(ffffffff829b2ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x2f kd_curproc sys/dev/kcov.c:578 [inline]
__sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x2f sys/dev/kcov.c:148
__mp_lock(ffffffff829d8788) at __mp_lock+0x133 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff829d8788) at __mp_lock+0x133 sys/kern/kern_lock.c:147
softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88
Xsoftclock() at Xsoftclock+0x1f
end of kernel
end trace frame: 0x7f7fffff8710, count: -7
ddb{0}> machine ddbcpu 1
Stopped at db_enter+0x18: addq $0x8,%rsp
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825fbce3) at panic+0x177 sys/kern/subr_prf.c:202
pool_do_get(ffffffff82b53fb8,9,ffff80002af5e728) at pool_do_get+0x474 sys/kern/subr_pool.c:741
pool_get(ffffffff82b53fb8,9) at pool_get+0xe9 sys/kern/subr_pool.c:584
fdcopy(ffff8000fffe8440) at fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
fdcopy(ffff8000fffe8440) at fdcopy+0x44 sys/kern/kern_descrip.c:1111
process_new(ffff8000fffec7e8,ffff8000fffe8440,1) at process_new+0x13b sys/kern/kern_fork.c:259
fork1(ffff8000fffe7cf0,1,ffffffff8245ee00,0,ffff80002af5e960,0) at fork1+0x30b sys/kern/kern_fork.c:383
syscall(ffff80002af5e9d0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002af5e9d0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7fffff8ad0, count: 6
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825fbce3) at panic+0x177 sys/kern/subr_prf.c:202
pool_do_get(ffffffff82b53fb8,9,ffff80002af5e728) at pool_do_get+0x474 sys/kern/subr_pool.c:741
pool_get(ffffffff82b53fb8,9) at pool_get+0xe9 sys/kern/subr_pool.c:584
fdcopy(ffff8000fffe8440) at fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
fdcopy(ffff8000fffe8440) at fdcopy+0x44 sys/kern/kern_descrip.c:1111
process_new(ffff8000fffec7e8,ffff8000fffe8440,1) at process_new+0x13b sys/kern/kern_fork.c:259
fork1(ffff8000fffe7cf0,1,ffffffff8245ee00,0,ffff80002af5e960,0) at fork1+0x30b sys/kern/kern_fork.c:383
syscall(ffff80002af5e9d0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff80002af5e9d0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7fffff8ad0, count: -9


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 19, 2022, 10:18:29 AM6/19/22
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 75a44452e183 Quick regression test that checks that BN_is_..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=11dde1c3f00000
kernel config: https://syzkaller.appspot.com/x/.config?x=7058272de1526588
dashboard link: https://syzkaller.appspot.com/bug?extid=fca7e4fa773c90886819
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17c7f24bf00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12f68528080000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fca7e4...@syzkaller.appspotmail.com

panic: pool_do_get: fdescpl free list modified: page 0xfffffd807f7d5000; item addr 0xfffffd807f7d57c0; offset 0x48=0xdeafbeaf
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*512364 30825 0 0x2 0 1K syz-executor2970415296
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82602af8) at panic+0x177 sys/kern/subr_prf.c:202
pool_do_get(ffffffff82b766e0,9,ffff8000211be508) at pool_do_get+0x474 sys/kern/subr_pool.c:741
pool_get(ffffffff82b766e0,9) at pool_get+0xe9 sys/kern/subr_pool.c:584
fdcopy(ffff8000ffff0010) at fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
fdcopy(ffff8000ffff0010) at fdcopy+0x44 sys/kern/kern_descrip.c:1111
process_new(ffff8000ffff7a50,ffff8000ffff0010,1) at process_new+0x13b sys/kern/kern_fork.c:259
fork1(ffff800021132fc8,1,ffffffff814b49c0,0,ffff8000211be740,0) at fork1+0x30b sys/kern/kern_fork.c:383
syscall(ffff8000211be7b0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000211be7b0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffed970, count: 6
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
*cpu1: pool_do_get: fdescpl free list modified: page 0xfffffd807f7d5000; item addr 0xfffffd807f7d57c0; offset 0x48=0xdeafbeaf
ddb{1}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82602af8) at panic+0x177 sys/kern/subr_prf.c:202
pool_do_get(ffffffff82b766e0,9,ffff8000211be508) at pool_do_get+0x474 sys/kern/subr_pool.c:741
pool_get(ffffffff82b766e0,9) at pool_get+0xe9 sys/kern/subr_pool.c:584
fdcopy(ffff8000ffff0010) at fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
fdcopy(ffff8000ffff0010) at fdcopy+0x44 sys/kern/kern_descrip.c:1111
process_new(ffff8000ffff7a50,ffff8000ffff0010,1) at process_new+0x13b sys/kern/kern_fork.c:259
fork1(ffff800021132fc8,1,ffffffff814b49c0,0,ffff8000211be740,0) at fork1+0x30b sys/kern/kern_fork.c:383
syscall(ffff8000211be7b0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000211be7b0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffed970, count: -9
ddb{1}> show registers
rdi 0
rsi 0x1
rbp 0xffff8000211be350
rbx 0xffff800020cd9c5f
rdx 0x3fd
rcx 0
rax 0x7e
r8 0x101010101010101
r9 0x8080808080808080
r10 0x62a06b729b9b1a9d
r11 0xcf40283f726f2a7b
r12 0xffff800020cd9a60
r13 0
r14 0
r15 0x1
rip 0xffffffff81995478 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff8000211be340
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{1}> show proc
PROC (syz-executor2970415296) pid=512364 stat=onproc
flags process=2<EXEC> proc=0
pri=17, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff8000211337a8,0xffffffff82b7abc8
process=0xffff8000ffff0010 user=0xffff8000211b9000, vmspace=0xfffffd807effd730
estcpu=36, cpticks=3, pctcpu=0.1
user=0, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
*30825 512364 97626 0 7 0x2 syz-executor2970415296
97626 508814 22923 0 3 0x10008a sigsusp ksh
22923 341307 93770 0 3 0x9a kqread sshd
84207 150102 1 0 3 0x100083 ttyin getty
93770 364531 1 0 3 0x88 kqread sshd
14175 287577 34806 73 3 0x1100090 kqread syslogd
34806 314123 1 0 3 0x100082 netio syslogd
70881 308436 1 0 3 0x100080 kqread resolvd
43833 189038 90895 77 3 0x100092 kqread dhcpleased
73923 304225 90895 77 3 0x100092 kqread dhcpleased
90895 28238 1 0 3 0x80 kqread dhcpleased
89758 432654 0 0 3 0x14200 bored smr
68338 411667 0 0 3 0x14200 pgzero zerothread
39311 152099 0 0 3 0x14200 aiodoned aiodoned
73560 3058 0 0 3 0x14200 syncer update
5666 129954 0 0 3 0x14200 cleaner cleaner
95815 475287 0 0 3 0x14200 reaper reaper
87660 256744 0 0 3 0x14200 pgdaemon pagedaemon
33875 301582 0 0 3 0x14200 bored viomb
705 326943 0 0 3 0x40014200 acpi0 acpi0
48456 485291 0 0 3 0x40014200 idle1
2772 80490 0 0 3 0x14200 bored softnet
15102 492063 0 0 3 0x14200 bored softnet
46594 37378 0 0 3 0x14200 bored softnet
84943 322056 0 0 3 0x14200 bored softnet
83563 267552 0 0 3 0x14200 fdlock systqmp
48604 402692 0 0 3 0x14200 bored systq
94836 232884 0 0 3 0x40014200 bored softclock
17075 374451 0 0 7 0x40014200 idle0
1 75789 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
CPU 1:
exclusive mutex fdescpl r = 0 (0xffffffff82b766f0)
#0 witness_lock+0x44d
#1 mtx_enter_try+0x100
#2 mtx_enter+0x4b sys/kern/kern_lock.c:266
#3 pool_get+0xbd sys/kern/subr_pool.c:581
#4 fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
#4 fdcopy+0x44 sys/kern/kern_descrip.c:1111
#5 process_new+0x13b sys/kern/kern_fork.c:259
#6 fork1+0x30b sys/kern/kern_fork.c:383
#7 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#7 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#8 Xsyscall+0x128
Process 30825 (syz-executor2970415296) thread 0xffff800021132fc8 (512364)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82b9f538)
#0 witness_lock+0x44d
#1 syscall+0x3ef mi_syscall sys/sys/syscall_mi.h:93 [inline]
#1 syscall+0x3ef sys/arch/amd64/amd64/trap.c:585
#2 Xsyscall+0x128
exclusive mutex fdescpl r = 0 (0xffffffff82b766f0)
#0 witness_lock+0x44d
#1 mtx_enter_try+0x100
#2 mtx_enter+0x4b sys/kern/kern_lock.c:266
#3 pool_get+0xbd sys/kern/subr_pool.c:581
#4 fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
#4 fdcopy+0x44 sys/kern/kern_descrip.c:1111
#5 process_new+0x13b sys/kern/kern_fork.c:259
#6 fork1+0x30b sys/kern/kern_fork.c:383
#7 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
#7 syscall+0x489 sys/arch/amd64/amd64/trap.c:585
#8 Xsyscall+0x128
Process 83563 (systqmp) thread 0xffff8000210e82a0 (267552)
shared rwlock systqmp r = 0 (0xffffffff829b2810)
#0 witness_lock+0x44d
#1 taskq_thread+0xca sys/kern/kern_task.c:445
#2 proc_trampoline+0x1c
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10146 6388K 6420K 78643K 11236 0
pcb 13 8K 8K 78643K 13 0
rtable 58 1K 2K 78643K 104 0
ifaddr 24 7K 7K 78643K 24 0
counters 40 33K 33K 78643K 40 0
ioctlops 0 0K 2K 78643K 25 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 5 0
vnodes 1166 73K 73K 78643K 1179 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 2 0K 0K 78643K 2 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 1 0K 3K 78643K 20701 0
proc 55 78K 79K 78643K 226 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 11 0K 0K 78643K 11 0
ether_multi 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 25 122K 122K 78643K 25 0
exec 0 0K 2K 78643K 391 0
tdb 3 0K 0K 78643K 3 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 55 11K 11K 78643K 15226 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 3 0K 0K 78643K 3 0
temp 18 4713K 4777K 78643K 16069 0
kqueue 18 30K 30K 78643K 6924 0
SYN cache 2 16K 16K 78643K 2 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 22 0 0 1 0 1 1 0 8 0
rtpcb 120 17 0 14 1 0 1 1 0 8 0
rtentry 112 23 0 1 1 0 1 1 0 8 0
unpcb 136 6933 0 6920 1 0 1 1 0 8 0
syncache 296 5 0 5 2 2 0 1 0 8 0
tcpcb 736 8 0 5 1 0 1 1 0 8 0
arp 120 2 0 0 1 0 1 1 0 8 0
inpcb 312 25 0 19 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 97 0 0 7 0 7 7 0 8 0
art_table 32 98 0 0 1 0 1 1 0 8 0
art_node 16 22 0 2 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 8318 0 6938 87 0 87 87 0 8 0
ffsino 272 8318 0 6938 93 0 93 93 0 8 1
nchpl 144 15405 0 13848 58 0 58 58 0 8 0
uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0
vnodes 224 5926 0 0 349 0 349 349 0 8 0
namei 1024 31779 0 31779 2 1 1 1 0 8 1
percpumem 16 32 0 0 1 0 1 1 0 8 0
kstatmem 264 6 0 0 1 0 1 1 0 8 0
scxspl 216 45466 0 45466 13 12 1 8 0 8 1
plimitpl 152 16 0 9 1 0 1 1 0 8 0
sigapl 424 7195 0 7165 4 0 4 4 0 8 0
knotepl 120 50 0 0 2 0 2 2 0 8 0
kqueuepl 216 6920 0 6906 1 0 1 1 0 8 0
pipepl 336 448579 0 448576 7 1 6 6 0 8 5
fdescpl 496 7178 0 7165 3 1 2 3 0 8 0
pool(0xffffffff82b766e0:fdescpl): page inconsistency: page 0xfffffd807f7d5000; 2 on list, 5 missing, 8 items per page
filepl 152 918743 0 918690 8 0 8 8 0 8 5
lockfpl 104 6 0 4 1 0 1 1 0 8 0
lockfspl 48 4 0 2 1 0 1 1 0 8 0
sessionpl 144 18 0 9 1 0 1 1 0 8 0
pgrppl 48 18 0 9 1 0 1 1 0 8 0
ucredpl 96 64 0 54 1 0 1 1 0 8 0
zombiepl 144 7165 0 7165 2 1 1 1 0 8 1
processpl 1064 7196 0 7165 3 0 3 3 0 8 0
procpl 672 7196 0 7165 3 0 3 3 0 8 0
sockpl 480 6975 0 6953 3 0 3 3 0 8 0
mcl8k 8192 5 0 0 1 0 1 1 0 8 0
mcl4k 4096 2 0 0 1 0 1 1 0 8 0
mcl2k 2048 64 0 0 7 0 7 7 0 8 0
mtagpl 96 2 0 0 1 0 1 1 0 8 0
mbufpl 256 129 0 0 7 0 7 7 0 8 0
bufpl 288 8839 0 2624 445 0 445 445 0 8 0
anonpl 24 174969 0 173115 14 2 12 13 0 186 0
amapchunkpl 152 37096 0 37006 5 1 4 5 0 158 0
amappl16 200 6985 0 6980 1 0 1 1 0 8 0
amappl13 176 32 0 31 2 1 1 1 0 8 0
amappl12 168 3 0 3 2 2 0 1 0 8 0
amappl11 160 60 0 47 1 0 1 1 0 8 0
amappl10 152 2 0 2 1 1 0 1 0 8 0
amappl9 144 488 0 485 1 0 1 1 0 8 0
amappl8 136 334 0 333 2 1 1 1 0 8 0
amappl7 128 48 0 45 1 0 1 1 0 8 0
amappl6 120 94 0 83 1 0 1 1 0 8 0
amappl5 112 82 0 74 1 0 1 1 0 8 0
amappl4 104 7469 0 7448 1 0 1 1 0 8 0
amappl3 96 7237 0 7217 1 0 1 1 0 8 0
amappl2 88 417 0 379 1 0 1 1 0 8 0
amappl1 80 89513 0 89135 10 1 9 9 0 8 0
amappl 88 14971 0 14934 1 0 1 1 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 253 0 253 1 1 0 1 0 8 0
dma64 64 6 0 6 1 1 0 1 0 8 0
dma32 32 7 0 7 1 1 0 1 0 8 0
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 7178 0 7165 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 7178 0 7165 1 0 1 1 0 8 0
vmmpekpl 168 1820641 0 1820627 1 0 1 1 0 8 0
vmmpepl 168 266439 0 265647 41 4 37 38 0 357 0
vmsppl 368 7177 0 7165 2 0 2 2 0 8 0
rwobjpl 56 39166 0 32711 91 0 91 91 0 8 0
pdppl 4096 14363 0 14330 53 18 35 41 0 8 2
pvpl 32 801313 0 797580 37 5 32 33 0 265 0
pmappl 248 7177 0 7165 2 1 1 2 0 8 0
extentpl 40 58 0 38 1 0 1 1 0 8 0
phpool 112 721 0 22 20 0 20 20 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffffffff82999ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff82b9f330) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff82b9f330) at __mp_lock+0x122 sys/kern/kern_lock.c:147
softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff82999ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: 7
ddb{0}> trace
x86_ipi_db(ffffffff82999ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff82b9f330) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff82b9f330) at __mp_lock+0x122 sys/kern/kern_lock.c:147
softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:88
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff82999ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -8
ddb{0}> machine ddbcpu 1
Stopped at db_enter+0x18: addq $0x8,%rsp
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82602af8) at panic+0x177 sys/kern/subr_prf.c:202
pool_do_get(ffffffff82b766e0,9,ffff8000211be508) at pool_do_get+0x474 sys/kern/subr_pool.c:741
pool_get(ffffffff82b766e0,9) at pool_get+0xe9 sys/kern/subr_pool.c:584
fdcopy(ffff8000ffff0010) at fdcopy+0x44 fdinit sys/kern/kern_descrip.c:1072 [inline]
fdcopy(ffff8000ffff0010) at fdcopy+0x44 sys/kern/kern_descrip.c:1111
process_new(ffff8000ffff7a50,ffff8000ffff0010,1) at process_new+0x13b sys/kern/kern_fork.c:259
fork1(ffff800021132fc8,1,ffffffff814b49c0,0,ffff8000211be740,0) at fork1+0x30b sys/kern/kern_fork.c:383
syscall(ffff8000211be7b0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline]
syscall(ffff8000211be7b0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffed970, count: 6
ddb{1}>

Reply all
Reply to author
Forward
0 new messages