panic: kernel diagnostic assertion "rn != NULL" failed: file "/syzkaller/managers/main/kernel/sys/net/pipex.c", line 501 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *243847 19113 -1 0x10 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83339972) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337a503,ffffffff832d512d,1f5,ffffffff833370c2) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80002a91ee18) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff800001480000) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff800001480000) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff80002a7f8fb0) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff80003c985a70) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806a0cd468,41,fffffd8007bfb5b0,ffff80002a7f8fb0) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd80664439e8,ffff80002a7f8fb0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd80664439e8,ffff80002a7f8fb0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd80664439e8,ffff80002a7f8fb0) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd80664439e8,ffff80002a7f8fb0) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff80003c985cc0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c985cc0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x210fa9579d0, count: 2 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: kernel diagnostic assertion "rn != NULL" failed: file "/syzkaller/managers/main/kernel/sys/net/pipex.c", line 501 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83339972) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337a503,ffffffff832d512d,1f5,ffffffff833370c2) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80002a91ee18) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff800001480000) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff800001480000) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff80002a7f8fb0) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff80003c985a70) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806a0cd468,41,fffffd8007bfb5b0,ffff80002a7f8fb0) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd80664439e8,ffff80002a7f8fb0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd80664439e8,ffff80002a7f8fb0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd80664439e8,ffff80002a7f8fb0) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd80664439e8,ffff80002a7f8fb0) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff80003c985cc0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c985cc0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x210fa9579d0, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c985850 rbx 0x1 rdx 0xffff800001439fc0 rcx 0 rax 0xffff80002a7f8fb0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xd829ac85b84456f2 r11 0x47382c2e971f0626 r12 0 r13 0xffff80002a91dd58 r14 0 r15 0x1 rip 0xffffffff816ffe35 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c985840 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=243847 pid=19113 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a7f9a10,0xffff80003c971a28 process=0xffff80002cd2d6e8 user=0xffff80003c980000, vmspace=0xfffffd80714aeb90 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 9241 437498 29887 60928 2 0x10 syz-executor 9241 227735 29887 60928 2 0x4000010 syz-executor 19113 319714 67810 -1 3 0x90 nanoslp syz-executor *19113 243847 67810 -1 7 0x4000010 syz-executor 99227 218038 90459 0 3 0x80 nanoslp syz-executor 99227 220067 90459 0 3 0x4000080 kqsel syz-executor 99227 260379 90459 0 3 0x4000080 fsleep syz-executor 55287 28531 9864 0 3 0x80 nanoslp syz-executor 55287 430778 9864 0 3 0x4000080 ttyopn syz-executor 55287 88949 9864 0 3 0x4000080 fsleep syz-executor 97532 363454 50725 0 3 0x90 nanoslp syz-executor 97532 7633 50725 0 3 0x4000090 kqread syz-executor 97532 394822 50725 0 3 0x4000090 fsleep syz-executor 39321 180399 66625 0 3 0x80 nanoslp syz-executor 39321 10675 66625 0 3 0x4000080 kqsel syz-executor 39321 130942 66625 0 3 0x4000080 kqsel syz-executor 39321 44090 66625 0 3 0x4000080 fsleep syz-executor 9864 52796 80574 0 3 0x82 nanoslp syz-executor 28563 243255 76878 0 3 0x80 nanoslp syz-executor 28563 96493 76878 0 3 0x4000080 msgwait syz-executor 28563 230237 76878 0 3 0x4000080 fsleep syz-executor 25706 406927 91295 0 3 0x3000 suspend syz-executor 25706 348166 91295 0 2 0x4081000 syz-executor 25706 282719 91295 0 3 0x4081000 fltagain2 syz-executor 25179 502625 0 0 3 0x14200 bored sosplice 66625 120 80574 0 3 0x82 nanoslp syz-executor 50725 455844 80574 0 3 0x82 nanoslp syz-executor 76878 85416 80574 0 3 0x82 nanoslp syz-executor 91295 191999 80574 0 3 0x82 nanoslp syz-executor 90459 259848 80574 0 3 0x82 nanoslp syz-executor 29887 84114 80574 0 3 0x82 nanoslp syz-executor 67810 194985 80574 0 3 0x82 nanoslp syz-executor 80574 6809 75546 0 3 0x82 kqread syz-executor 75546 215170 85924 0 3 0x10008a sigsusp ksh 85924 475334 15185 0 3 0x98 kqread sshd-session 15185 155108 12474 0 3 0x92 kqread sshd-session 40902 340975 1 0 3 0x100083 ttyin getty 12474 64566 1 0 3 0x88 kqread sshd 88123 236899 15251 73 3 0x1100090 kqread syslogd 15251 251785 1 0 3 0x100082 sbwait syslogd 69785 25188 1 0 3 0x100080 kqread resolvd 92569 165337 0 0 3 0x14200 bored smr 79960 97418 0 0 2 0x14200 zerothread 88218 148526 0 0 3 0x14200 aiodoned aiodoned 81747 46572 0 0 3 0x14200 syncer update 28778 298305 0 0 3 0x14200 cleaner cleaner 71514 124603 0 0 3 0x14200 reaper reaper 36908 206192 0 0 3 0x14200 pgdaemon pagedaemon 57144 3666 0 0 3 0x14200 bored viomb 67222 188243 0 0 3 0x40014200 acpi0 acpi0 22735 504438 0 0 3 0x14200 bored softnet7 69972 85518 0 0 3 0x14200 bored softnet6 58632 2513 0 0 3 0x14200 bored softnet5 58556 450234 0 0 3 0x14200 bored softnet4 9752 142327 0 0 3 0x14200 bored softnet3 5681 203969 0 0 3 0x14200 bored softnet2 10945 126967 0 0 3 0x14200 bored softnet1 1653 240663 0 0 2 0x14200 softnet0 69588 518554 0 0 3 0x14200 bored systqmp 61875 287203 0 0 3 0x14200 bored systq 31284 380706 0 0 3 0x40014200 tmoslp softclock 95749 41925 0 0 3 0x40014200 idle0 1 409620 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10189 11058K 11336K 166960K 12087 0 pcb 17 12K 12K 166960K 155 0 rtable 202 9K 9K 166960K 420 0 pf 33 13K 17K 166960K 113 0 ifaddr 40 7K 7K 166960K 89 0 ifgroup 52 2K 2K 166960K 144 0 sysctl 4 1K 9K 166960K 20 0 counters 36 18K 18K 166960K 88 0 ioctlops 0 0K 4K 166960K 399 0 iov 0 0K 16K 166960K 58 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1400 88K 89K 166960K 2101 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 15 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 93 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 110K 166960K 958 0 sigio 0 0K 0K 166960K 7 0 proc 57 51K 83K 166960K 581 0 subproc 72 4K 4K 166960K 81 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 196 0 in_multi 84 6K 7K 166960K 134 0 ether_multi 1 0K 0K 166960K 5 0 mrt 1 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 115 519K 519K 166960K 115 0 exec 0 0K 1K 166960K 428 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 225 127K 167K 166960K 9875 0 UVM aobj 21 4K 4K 166960K 28 0 pinsyscall 33 66K 94K 166960K 2029 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 53 0 NDP 14 0K 1K 166960K 61 0 temp 58 8639K 8703K 166960K 40226 0 kqueue 12 21K 32K 166960K 220 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 174 0 173 2 1 1 2 0 8 0 rtentry 136 131 0 55 4 0 4 4 0 8 0 unpcb 144 616 0 596 6 0 6 6 0 8 5 syncache 336 7 0 7 2 1 1 1 0 8 1 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 736 269 0 260 5 1 4 4 0 8 3 arp 88 18 0 4 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 328 808 0 796 12 5 7 7 0 8 5 ip6q 72 7 0 3 1 0 1 1 0 8 0 ip6af 40 10 0 6 1 0 1 1 0 8 0 nd6 104 22 0 9 1 0 1 1 0 8 0 pkpcb 40 10 0 10 2 1 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 ppxss 1072 44 0 40 2 1 1 1 0 8 0 pppxif 1384 4 0 4 2 1 1 1 0 8 1 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 130 0 128 1 0 1 1 0 8 0 pfstate 384 65 0 64 1 0 1 1 0 8 0 pfrule 1344 2 0 2 1 1 0 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 554 0 188 28 3 25 28 0 8 0 art_table 40 557 0 188 5 0 5 5 0 8 0 art_node 32 127 0 59 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 6 1 0 1 1 0 8 0 semapl 112 90 0 80 1 0 1 1 0 8 0 shmpl 112 25 0 7 1 0 1 1 0 8 0 dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 3262 0 1764 95 0 95 95 0 8 0 ffsino 256 3262 0 1764 95 0 95 95 0 8 0 nchpl 144 4612 0 2922 63 0 63 63 0 8 0 rtmask 32 12 0 9 2 1 1 1 0 8 0 uvmvnodes 80 3638 0 0 75 0 75 75 0 8 0 vnodes 216 3638 0 0 203 0 203 203 0 8 0 namei 1024 15641 0 15640 3 2 1 2 0 8 0 kstatmem 264 86 0 62 3 1 2 3 0 8 0 scsiplug 72 5 0 5 2 1 1 1 0 8 1 scxspl 216 18153 0 18153 9 7 2 8 1 8 2 plimitpl 152 184 0 167 1 0 1 1 0 8 0 sigapl 424 1258 0 1210 9 2 7 9 0 8 0 knotepl 120 316512 0 316017 35 19 16 17 0 8 1 kqueuepl 184 440 0 422 6 2 4 4 0 8 2 pipepl 304 210 0 181 5 0 5 5 0 8 2 fdescpl 448 1217 0 1190 5 1 4 5 0 8 0 filepl 120 7497 0 7274 15 4 11 11 0 8 2 lockfpl 104 435 0 434 2 1 1 2 0 8 0 lockfspl 48 109 0 108 1 0 1 1 0 8 0 sessionpl 144 26 0 19 1 0 1 1 0 8 0 pgrppl 48 48 0 33 1 0 1 1 0 8 0 ucredpl 104 1411 0 1399 1 0 1 1 0 8 0 zombiepl 144 1211 0 1210 1 0 1 1 0 8 0 processpl 1168 1258 0 1210 6 2 4 6 0 8 0 procpl 664 2485 0 2422 8 2 6 8 0 8 0 sosppl 168 4 0 4 1 1 0 1 0 8 0 sockpl 552 1640 0 1607 16 5 11 12 0 8 8 mcl64k 65536 113 0 113 5 3 2 3 0 8 2 mcl16k 16384 5 0 5 2 1 1 1 0 8 1 mcl8k 8192 16 0 16 2 1 1 1 0 8 1 mcl4k 4096 3553 0 3503 14 6 8 13 0 8 1 mcl2k 2048 1344 0 1338 2 0 2 2 0 8 0 mtagpl 96 71 0 6 2 0 2 2 0 8 0 mbufpl 256 12460 0 12272 20 2 18 20 0 8 0 bufpl 280 6422 0 194 445 0 445 445 0 8 0 anonpl 24 174274 0 162443 76 0 76 76 0 187 0 amapchunkpl 152 38632 0 38024 35 8 27 34 0 158 3 amappl16 200 3065 0 2569 27 0 27 27 0 8 0 amappl15 192 2 0 2 1 1 0 1 0 8 0 amappl14 184 112 0 105 1 0 1 1 0 8 0 amappl13 176 8 0 8 2 1 1 1 0 8 1 amappl12 168 1846 0 1819 3 1 2 3 0 8 0 amappl11 160 44 0 40 1 0 1 1 0 8 0 amappl10 152 5 0 5 1 1 0 1 0 8 0 amappl9 144 256 0 256 1 1 0 1 0 8 0 amappl8 136 20 0 18 1 0 1 1 0 8 0 amappl7 128 99 0 92 1 0 1 1 0 8 0 amappl6 120 184 0 180 1 0 1 1 0 8 0 amappl5 112 115 0 112 1 0 1 1 0 8 0 amappl4 104 286 0 271 1 0 1 1 0 8 0 amappl3 96 6634 0 6524 4 0 4 4 0 8 0 amappl2 88 654 0 616 2 0 2 2 0 8 0 amappl1 80 12399 0 11940 14 2 12 14 0 8 0 amappl 88 9039 0 8861 5 0 5 5 0 92 0 dma65536 65536 2 0 2 1 1 0 1 0 8 0 dma32768 32768 1 0 1 1 0 1 1 0 8 1 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma2048 2048 66 0 66 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 27 0 7 1 0 1 1 0 8 0 uaddrrnd 24 1217 0 1190 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1217 0 1190 1 0 1 1 0 8 0 vmmpekpl 168 11093 0 11057 2 0 2 2 0 8 0 vmmpepl 168 81067 0 78971 105 10 95 105 0 357 0 vmsppl 368 1216 0 1190 4 1 3 4 0 8 0 rwobjpl 40 25872 0 21017 50 0 50 50 0 8 0 pdppl 4096 2440 0 2380 108 46 62 80 0 8 2 pvpl 32 511987 0 494582 157 16 141 157 0 265 0 pmappl 216 1216 0 1190 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 408 0 74 11 0 11 11 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83339972) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337a503,ffffffff832d512d,1f5,ffffffff833370c2) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80002a91ee18) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff800001480000) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff800001480000) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff80002a7f8fb0) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff80003c985a70) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806a0cd468,41,fffffd8007bfb5b0,ffff80002a7f8fb0) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd80664439e8,ffff80002a7f8fb0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd80664439e8,ffff80002a7f8fb0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd80664439e8,ffff80002a7f8fb0) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd80664439e8,ffff80002a7f8fb0) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff80003c985cc0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c985cc0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x210fa9579d0, count: -13 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83339972) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337a503,ffffffff832d512d,1f5,ffffffff833370c2) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80002a91ee18) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff800001480000) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff800001480000) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff80002a7f8fb0) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff80003c985a70) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806a0cd468,41,fffffd8007bfb5b0,ffff80002a7f8fb0) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd80664439e8,ffff80002a7f8fb0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd80664439e8,ffff80002a7f8fb0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd80664439e8,ffff80002a7f8fb0) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd80664439e8,ffff80002a7f8fb0) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff80003c985cc0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c985cc0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x210fa9579d0, count: -13