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 * 38179 52897 0 0x10 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8333737b) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83379391,ffffffff832ce4c6,1f5,ffffffff833307e5) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80003c9754f0) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff80000147a800) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff80000147a800) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff800035d5efb8) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff80003c9c58e0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806437bc20,41,fffffd8007bfb6e8,ffff800035d5efb8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8067bebbb8,ffff800035d5efb8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8067bebbb8,ffff800035d5efb8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8067bebbb8,ffff800035d5efb8) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8067bebbb8,ffff800035d5efb8) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff80003c9c5b30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9c5b30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfd5a9063190, 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(ffffffff8333737b) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83379391,ffffffff832ce4c6,1f5,ffffffff833307e5) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80003c9754f0) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff80000147a800) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff80000147a800) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff800035d5efb8) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff80003c9c58e0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806437bc20,41,fffffd8007bfb6e8,ffff800035d5efb8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8067bebbb8,ffff800035d5efb8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8067bebbb8,ffff800035d5efb8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8067bebbb8,ffff800035d5efb8) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8067bebbb8,ffff800035d5efb8) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff80003c9c5b30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9c5b30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfd5a9063190, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c9c56c0 rbx 0x1 rdx 0 rcx 0 rax 0xffff800035d5efb8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x45ba9698575f4b7a r11 0x398ae6059f531d7 r12 0 r13 0xffff80003c975d50 r14 0 r15 0x1 rip 0xffffffff83022ef5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c9c56b0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=38179 pid=52897 tcnt=3 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=0xffff800035d5e028,0xffff800035d5ea98 process=0xffff800035d56010 user=0xffff80003c9c0000, vmspace=0xfffffd806bb8fb90 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 52897 480370 16541 0 2 0x10 syz-executor *52897 38179 16541 0 7 0x4000010 syz-executor 52897 429224 16541 0 3 0x4000090 fsleep syz-executor 27903 471739 17686 0 3 0x80 nanoslp syz-executor 27903 394587 17686 0 3 0x4000080 kqread syz-executor 27903 366247 17686 0 3 0x4000080 fsleep syz-executor 23745 295451 78247 0 3 0x80 nanoslp syz-executor 23745 134979 78247 0 3 0x4000080 fifor syz-executor 23745 324687 78247 0 3 0x4000080 fsleep syz-executor 23745 492348 78247 0 3 0x4000080 fsleep syz-executor 22866 122340 99561 0 3 0x80 nanoslp syz-executor 22866 212448 99561 0 3 0x4000080 dtread syz-executor 22866 106244 99561 0 3 0x4000080 fsleep syz-executor 84526 37919 67122 0 3 0x80 nanoslp syz-executor 84526 115577 67122 0 3 0x4000080 kqread syz-executor 84526 323852 67122 0 3 0x4000080 fsleep syz-executor 56316 327960 82586 0 3 0x80 nanoslp syz-executor 56316 16484 82586 0 3 0x4000080 kqread syz-executor 56316 323483 82586 0 3 0x4000080 fsleep syz-executor 13807 297713 0 0 3 0x14200 bored sosplice 67122 154428 13825 0 3 0x82 nanoslp syz-executor 16541 379096 13825 0 3 0x82 nanoslp syz-executor 57598 347203 13825 0 2 0x2 syz-executor 99561 3283 13825 0 3 0x82 nanoslp syz-executor 78247 271984 13825 0 3 0x82 nanoslp syz-executor 82586 97446 13825 0 3 0x82 nanoslp syz-executor 17686 454030 13825 0 3 0x82 nanoslp syz-executor 91431 39416 13825 0 3 0x82 nanoslp syz-executor 13825 467767 34201 0 3 0x82 kqread syz-executor 34201 441213 13767 0 3 0x10008a sigsusp ksh 13767 473940 9143 0 3 0x98 kqread sshd-session 9143 84189 25984 0 3 0x92 kqread sshd-session 91890 101106 1 0 3 0x100083 ttyin getty 25984 193895 1 0 3 0x88 kqread sshd 31721 299070 13953 73 3 0x1100090 kqread syslogd 13953 125409 1 0 3 0x100082 sbwait syslogd 7583 264562 1 0 3 0x100080 kqread resolvd 33262 453142 47441 77 2 0x100012 dhcpleased 85697 291352 47441 77 3 0x100092 kqread dhcpleased 47441 518423 1 0 3 0x80 kqread dhcpleased 12778 216003 0 0 3 0x14200 bored smr 37561 522853 0 0 2 0x14200 zerothread 65687 159567 0 0 3 0x14200 aiodoned aiodoned 80908 374024 0 0 3 0x14200 syncer update 7647 116828 0 0 3 0x14200 cleaner cleaner 84673 487012 0 0 3 0x14200 reaper reaper 20111 114704 0 0 3 0x14200 pgdaemon pagedaemon 12144 149623 0 0 3 0x14200 bored viomb 47478 388949 0 0 3 0x40014200 acpi0 acpi0 47014 207295 0 0 3 0x14200 bored softnet7 41183 264332 0 0 3 0x14200 bored softnet6 36914 175326 0 0 3 0x14200 bored softnet5 11641 438104 0 0 3 0x14200 bored softnet4 32287 275356 0 0 3 0x14200 bored softnet3 81369 209039 0 0 3 0x14200 bored softnet2 15323 460496 0 0 3 0x14200 bored softnet1 85685 260528 0 0 2 0x14200 softnet0 77811 183024 0 0 3 0x14200 bored systqmp 24156 94057 0 0 3 0x14200 bored systq 51513 503449 0 0 3 0x40014200 tmoslp softclock 56102 336356 0 0 3 0x40014200 idle0 1 519706 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10197 11192K 11322K 166960K 11527 0 pcb 17 12K 12K 166960K 47 0 rtable 211 8K 8K 166960K 313 0 pf 33 13K 19K 166960K 56 0 ifaddr 42 7K 7K 166960K 54 0 ifgroup 52 2K 2K 166960K 64 0 sysctl 1 1K 9K 166960K 5 0 counters 36 18K 18K 166960K 46 0 ioctlops 0 0K 4K 166960K 58 0 iov 0 0K 16K 166960K 17 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1374 86K 86K 166960K 1522 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 5 0K 0K 166960K 6 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 61K 89K 166960K 304 0 sigio 0 0K 0K 166960K 1 0 proc 60 59K 100K 166960K 493 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 58 0 in_multi 96 7K 7K 166960K 114 0 ether_multi 1 0K 0K 166960K 5 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 360 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 233 152K 165K 166960K 4264 0 UVM aobj 9 2K 2K 166960K 9 0 pinsyscall 38 76K 93K 166960K 1336 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 11 0 NDP 12 0K 2K 166960K 34 0 temp 43 8635K 8699K 166960K 11871 0 kqueue 19 29K 29K 166960K 69 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 117 0 48 3 0 3 3 0 8 0 rtentry 136 99 0 15 4 0 4 4 0 8 0 unpcb 144 128 0 111 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 736 67 0 60 1 0 1 1 0 8 0 arp 88 11 0 0 1 0 1 1 0 8 0 inpcb 328 233 0 219 4 0 4 4 0 8 2 ip6q 72 3 0 2 1 0 1 1 0 8 0 ip6af 40 7 0 6 1 0 1 1 0 8 0 nd6 104 17 0 0 1 0 1 1 0 8 0 pkpcb 40 4 0 4 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 0 1 1 0 8 1 ppxss 1072 14 0 10 1 0 1 1 0 8 0 pfrktable 1344 1 0 1 1 0 1 1 0 8 1 pfanchor 1288 2 0 0 1 0 1 1 0 8 0 pfrule 1344 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 468 0 65 28 0 28 28 0 8 2 art_table 40 471 0 65 5 0 5 5 0 8 0 art_node 32 99 0 25 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semapl 112 4 0 1 1 0 1 1 0 8 0 shmpl 112 6 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1894 0 388 95 0 95 95 0 8 0 ffsino 256 1894 0 388 95 0 95 95 0 8 0 nchpl 144 2302 0 613 63 0 63 63 0 8 0 rtmask 32 5 0 2 1 0 1 1 0 8 0 uvmvnodes 80 2075 0 0 43 0 43 43 0 8 0 vnodes 216 2075 0 0 116 0 116 116 0 8 0 namei 1024 7385 0 7384 2 0 2 2 0 8 1 kstatmem 264 36 0 12 2 0 2 2 0 8 0 acpiwqpl 32 1 0 1 1 0 1 1 1 8 1 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 8211 0 8211 8 0 8 8 1 8 8 plimitpl 152 123 0 106 1 0 1 1 0 8 0 sigapl 424 589 0 539 7 0 7 7 0 8 0 knotepl 120 9918 0 9646 16 6 10 16 0 8 1 kqueuepl 184 95 0 77 1 0 1 1 0 8 0 pipepl 304 115 0 87 3 0 3 3 0 8 0 fdescpl 448 568 0 539 5 0 5 5 0 8 1 filepl 120 2526 0 2233 10 0 10 10 0 8 1 lockfpl 104 73 0 70 1 0 1 1 0 8 0 lockfspl 48 35 0 32 1 0 1 1 0 8 0 sessionpl 144 21 0 13 1 0 1 1 0 8 0 pgrppl 48 35 0 19 1 0 1 1 0 8 0 ucredpl 104 269 0 256 1 0 1 1 0 8 0 zombiepl 144 540 0 539 1 0 1 1 0 8 0 processpl 1168 589 0 539 5 0 5 5 0 8 1 procpl 664 861 0 798 6 0 6 6 0 8 0 sockpl 552 487 0 387 8 0 8 8 0 8 0 mcl64k 65536 9 0 9 1 0 1 1 0 8 1 mcl8k 8192 6 0 6 1 0 1 1 0 8 1 mcl4k 4096 2630 0 2576 14 0 14 14 0 8 7 mcl2k 2048 452 0 447 3 0 3 3 0 8 1 mtagpl 96 9 0 5 1 0 1 1 0 8 0 mbufpl 256 7877 0 7436 28 0 28 28 0 8 0 bufpl 280 3405 0 117 235 0 235 235 0 8 0 anonpl 24 132094 0 128844 51 0 51 51 0 187 21 amapchunkpl 152 13316 0 12819 24 0 24 24 0 158 3 amappl16 200 2887 0 2858 19 4 15 15 0 8 13 amappl15 192 6 0 6 1 0 1 1 0 8 1 amappl14 184 102 0 92 1 0 1 1 0 8 0 amappl13 176 8 0 8 1 0 1 1 0 8 1 amappl12 168 1198 0 1169 2 0 2 2 0 8 0 amappl11 160 43 0 33 1 0 1 1 0 8 0 amappl10 152 18 0 18 1 0 1 1 0 8 1 amappl9 144 316 0 315 1 0 1 1 0 8 0 amappl8 136 20 0 19 1 0 1 1 0 8 0 amappl7 128 102 0 92 1 0 1 1 0 8 0 amappl6 120 168 0 164 1 0 1 1 0 8 0 amappl5 112 113 0 107 1 0 1 1 0 8 0 amappl4 104 271 0 255 1 0 1 1 0 8 0 amappl3 96 2306 0 2195 3 0 3 3 0 8 0 amappl2 88 610 0 556 2 0 2 2 0 8 0 amappl1 80 8586 0 8039 13 0 13 13 0 8 1 amappl 88 3592 0 3424 4 0 4 4 0 92 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 19 0 18 1 0 1 1 0 8 0 aobjpl 72 8 0 0 1 0 1 1 0 8 0 uaddrrnd 24 568 0 539 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 568 0 539 1 0 1 1 0 8 0 vmmpekpl 168 5938 0 5911 2 0 2 2 0 8 0 vmmpepl 168 42826 0 40971 93 0 93 93 0 357 7 vmsppl 368 567 0 539 4 0 4 4 0 8 1 rwobjpl 40 16635 0 13699 32 0 32 32 0 8 1 pdppl 4096 1142 0 1078 92 26 66 78 0 8 2 pvpl 32 290272 0 281221 134 0 134 134 0 265 45 pmappl 216 567 0 539 2 0 2 2 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 385 0 26 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(ffffffff8333737b) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83379391,ffffffff832ce4c6,1f5,ffffffff833307e5) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80003c9754f0) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff80000147a800) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff80000147a800) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff800035d5efb8) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff80003c9c58e0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806437bc20,41,fffffd8007bfb6e8,ffff800035d5efb8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8067bebbb8,ffff800035d5efb8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8067bebbb8,ffff800035d5efb8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8067bebbb8,ffff800035d5efb8) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8067bebbb8,ffff800035d5efb8) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff80003c9c5b30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9c5b30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfd5a9063190, 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(ffffffff8333737b) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff83379391,ffffffff832ce4c6,1f5,ffffffff833307e5) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80003c9754f0) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff80000147a800) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff80000147a800) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff800035d5efb8) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff80003c9c58e0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806437bc20,41,fffffd8007bfb6e8,ffff800035d5efb8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8067bebbb8,ffff800035d5efb8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8067bebbb8,ffff800035d5efb8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8067bebbb8,ffff800035d5efb8) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8067bebbb8,ffff800035d5efb8) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff80003c9c5b30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9c5b30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfd5a9063190, count: -13