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 *106359 24305 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83339344) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337ac54,ffffffff832d475f,1f5,ffffffff83336376) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80003814faa0) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff80000140b800) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff80000140b800) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff800038151a18) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff800038157bd0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806c437a40,41,fffffd8007bfb7b8,ffff800038151a18) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8065491448,ffff800038151a18) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8065491448,ffff800038151a18) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8065491448,ffff800038151a18) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8065491448,ffff800038151a18) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff800038157e20) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800038157e20) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5d81c81c470, 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(ffffffff83339344) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337ac54,ffffffff832d475f,1f5,ffffffff83336376) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80003814faa0) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff80000140b800) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff80000140b800) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff800038151a18) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff800038157bd0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806c437a40,41,fffffd8007bfb7b8,ffff800038151a18) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8065491448,ffff800038151a18) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8065491448,ffff800038151a18) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8065491448,ffff800038151a18) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8065491448,ffff800038151a18) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff800038157e20) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800038157e20) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5d81c81c470, count: -13 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000381579b0 rbx 0x1 rdx 0xffff8000014622c0 rcx 0 rax 0xffff800038151a18 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3af63f93add7190d r11 0xa6f3d1379b87091e r12 0 r13 0xffff80003814e5b0 r14 0 r15 0x1 rip 0xffffffff827c0405 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000381579a0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=106359 pid=24305 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff800038150558,0xffffffff83965830 process=0xffff80002cd30928 user=0xffff800038152000, vmspace=0xfffffd8070f7ab90 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 24305 456393 15095 0 3 0x80 fsleep syz-executor *24305 106359 15095 0 7 0x4000000 syz-executor 24492 86070 64668 0 3 0x80 fsleep syz-executor 24492 420006 64668 0 3 0x4000080 bell syz-executor 59047 130933 32443 0 3 0x80 fsleep syz-executor 59047 86682 32443 0 3 0x4000080 fifor syz-executor 92040 310610 51414 0 3 0x80 fsleep syz-executor 92040 29758 51414 0 3 0x4000080 fsleep syz-executor 92040 496588 51414 0 3 0x4000080 ttyout syz-executor 82885 218490 33766 0 3 0x80 fsleep syz-executor 82885 171226 33766 0 3 0x4000080 kqread syz-executor 80153 506992 63583 0 3 0x80 fsleep syz-executor 80153 501438 63583 0 3 0x4000080 lockf syz-executor 64668 495178 58857 0 3 0x82 nanoslp syz-executor 9553 209271 0 0 3 0x14200 bored sosplice 82723 237621 58857 0 3 0x82 wait syz-executor 85508 154977 58857 0 3 0x82 nanoslp syz-executor 63583 489035 58857 0 3 0x82 nanoslp syz-executor 32443 138872 58857 0 3 0x82 nanoslp syz-executor 15095 473066 58857 0 3 0x82 nanoslp syz-executor 51414 452079 58857 0 3 0x82 nanoslp syz-executor 33766 65976 58857 0 3 0x82 nanoslp syz-executor 58857 520724 99346 0 3 0x82 kqread syz-executor 99346 480962 39042 0 3 0x10008a sigsusp ksh 39042 521509 5379 0 3 0x98 kqread sshd-session 5379 149630 86580 0 3 0x92 kqread sshd-session 23906 405050 1 0 3 0x100083 ttyopn getty 86580 113513 1 0 3 0x88 kqread sshd 28026 68785 71140 73 3 0x1100090 kqread syslogd 71140 39653 1 0 3 0x100082 sbwait syslogd 39146 64077 1 0 3 0x100080 kqread resolvd 37738 203223 25781 77 2 0x100012 dhcpleased 16097 35863 25781 77 3 0x100092 kqread dhcpleased 25781 182750 1 0 3 0x80 kqread dhcpleased 44769 41394 0 0 3 0x14200 bored smr 5802 496855 0 0 2 0x14200 zerothread 93902 498650 0 0 3 0x14200 aiodoned aiodoned 96210 267701 0 0 3 0x14200 syncer update 6569 231949 0 0 3 0x14200 cleaner cleaner 81353 49557 0 0 3 0x14200 reaper reaper 5123 119668 0 0 3 0x14200 pgdaemon pagedaemon 3075 297896 0 0 3 0x14200 bored viomb 79437 487077 0 0 3 0x40014200 acpi0 acpi0 91913 86250 0 0 3 0x14200 bored softnet7 15796 251922 0 0 3 0x14200 bored softnet6 36440 154638 0 0 3 0x14200 bored softnet5 52664 387478 0 0 3 0x14200 bored softnet4 77802 209810 0 0 3 0x14200 bored softnet3 36290 486569 0 0 3 0x14200 bored softnet2 46076 350329 0 0 3 0x14200 bored softnet1 19915 483142 0 0 2 0x14200 softnet0 52393 251697 0 0 3 0x14200 smrbar systqmp 23873 142290 0 0 3 0x14200 bored systq 23997 361012 0 0 3 0x40014200 tmoslp softclock 3338 192212 0 0 3 0x40014200 idle0 1 315787 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 10443 12088K 12155K 166960K 11964 0 pcb 17 13K 14K 166960K 202 0 rtable 201 9K 9K 166960K 392 0 pf 29 12K 19K 166960K 92 0 ifaddr 40 7K 8K 166960K 75 0 ifgroup 46 2K 2K 166960K 107 0 sysctl 3 1K 9K 166960K 9 0 counters 34 17K 18K 166960K 65 0 ioctlops 0 0K 4K 166960K 234 0 iov 0 0K 24K 166960K 29 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1471 92K 93K 166960K 1991 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 11 0 VM map 2 1K 1K 166960K 2 0 sem 11 5K 5K 166960K 15 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 236K 166960K 559 0 sigio 0 0K 0K 166960K 13 0 proc 60 59K 124K 166960K 539 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 102 0 in_multi 91 6K 7K 166960K 131 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 109 493K 493K 166960K 109 0 exec 0 0K 1K 166960K 395 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 225 151K 167K 166960K 6427 0 UVM aobj 16 2K 4K 166960K 17 0 pinsyscall 39 78K 96K 166960K 1609 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 18 0 NDP 10 0K 2K 166960K 48 0 temp 48 8636K 8700K 166960K 23839 0 kqueue 15 24K 33K 166960K 102 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 139 0 135 3 0 3 3 0 8 2 rtentry 136 129 0 51 4 0 4 4 0 8 0 unpcb 144 363 0 346 6 0 6 6 0 8 5 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 163 0 159 4 0 4 4 0 8 3 arp 88 16 0 6 1 0 1 1 0 8 0 ipq 40 3 0 0 1 0 1 1 0 8 0 ipqe 40 4 0 1 1 0 1 1 0 8 0 inpcb 328 652 0 644 10 1 9 10 0 8 7 nd6 104 22 0 7 1 0 1 1 0 8 0 pkpcb 40 39 0 38 1 0 1 1 0 8 0 kcovpl 48 9 0 1 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 0 1 1 0 8 1 ppxss 1072 26 0 22 1 0 1 1 0 8 0 pppxif 1384 3 0 3 1 0 1 1 0 8 1 pfanchor 1288 3 0 0 1 0 1 1 0 8 0 pftag 88 3 0 1 1 0 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 4 0 2 1 0 1 1 0 8 0 pfstate 384 2 0 1 1 0 1 1 0 8 0 pfrule 1344 3 0 3 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 565 0 176 28 0 28 28 0 8 2 art_table 40 567 0 176 5 0 5 5 0 8 0 art_node 32 128 0 60 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 3 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 10 0 1 1 0 1 1 0 8 0 shmpl 112 14 0 1 1 0 1 1 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 2441 0 938 95 0 95 95 0 8 0 ffsino 256 2441 0 938 95 0 95 95 0 8 0 nchpl 144 3167 0 1479 63 0 63 63 0 8 0 rtmask 32 6 0 3 1 0 1 1 0 8 0 uvmvnodes 80 2884 0 0 59 0 59 59 0 8 0 vnodes 216 2884 0 0 161 0 161 161 0 8 0 namei 1024 10696 0 10696 2 0 2 2 0 8 2 kstatmem 264 60 0 40 3 0 3 3 0 8 1 scsiplug 72 5 0 5 1 0 1 1 0 8 1 scxspl 216 10422 0 10422 8 0 8 8 1 8 8 plimitpl 152 264 0 245 1 0 1 1 0 8 0 sigapl 424 830 0 779 7 0 7 7 0 8 1 knotepl 120 36508 0 36255 23 13 10 17 0 8 2 kqueuepl 184 158 0 145 1 0 1 1 0 8 0 pipepl 304 245 0 218 10 0 10 10 0 8 7 fdescpl 448 809 0 779 5 0 5 5 0 8 1 filepl 120 5301 0 4942 17 1 16 17 0 8 4 lockfpl 104 294 0 289 2 0 2 2 0 8 1 lockfspl 48 79 0 75 1 0 1 1 0 8 0 sessionpl 144 23 0 15 1 0 1 1 0 8 0 pgrppl 48 39 0 22 1 0 1 1 0 8 0 ucredpl 104 934 0 922 1 0 1 1 0 8 0 zombiepl 144 781 0 779 1 0 1 1 0 8 0 processpl 1168 830 0 779 5 0 5 5 0 8 1 procpl 664 1427 0 1369 6 0 6 6 0 8 0 sosppl 168 1 0 0 1 0 1 1 0 8 0 sockpl 552 1202 0 1172 16 5 11 14 0 8 8 mcl64k 65536 31 0 31 1 0 1 1 0 8 1 mcl16k 16384 4 0 4 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 15 0 15 1 0 1 1 0 8 1 mcl4k 4096 2983 0 2930 14 0 14 14 0 8 6 mcl2k 2048 759 0 752 2 0 2 2 0 8 1 mtagpl 96 6 0 5 1 0 1 1 0 8 0 mbufpl 256 9044 0 8878 67 46 21 67 0 8 8 bufpl 280 3955 0 118 275 0 275 275 0 8 0 anonpl 24 142771 0 139522 45 0 45 45 0 187 20 amapchunkpl 152 20792 0 20306 34 0 34 34 0 158 13 amappl16 200 2619 0 2588 14 4 10 14 0 8 8 amappl15 192 12 0 11 1 0 1 1 0 8 0 amappl14 184 116 0 106 1 0 1 1 0 8 0 amappl13 176 9 0 9 1 0 1 1 0 8 1 amappl12 168 1448 0 1418 3 0 3 3 0 8 1 amappl11 160 45 0 34 1 0 1 1 0 8 0 amappl10 152 5 0 5 1 0 1 1 0 8 1 amappl9 144 241 0 241 1 0 1 1 0 8 1 amappl8 136 22 0 21 1 0 1 1 0 8 0 amappl7 128 101 0 90 1 0 1 1 0 8 0 amappl6 120 187 0 184 1 0 1 1 0 8 0 amappl5 112 121 0 115 1 0 1 1 0 8 0 amappl4 104 278 0 262 1 0 1 1 0 8 0 amappl3 96 3808 0 3695 4 0 4 4 0 8 0 amappl2 88 655 0 598 2 0 2 2 0 8 0 amappl1 80 9886 0 9329 13 0 13 13 0 8 1 amappl 88 5682 0 5519 5 0 5 5 0 92 0 dma16384 16384 2 0 2 1 0 1 1 0 8 1 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 254 0 254 1 0 1 1 0 8 1 dma64 64 8 0 8 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 16 0 1 1 0 1 1 0 8 0 uaddrrnd 24 809 0 779 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 809 0 779 1 0 1 1 0 8 0 vmmpekpl 168 8022 0 7997 2 0 2 2 0 8 0 vmmpepl 168 56309 0 54395 94 0 94 94 0 357 8 vmsppl 368 808 0 779 4 0 4 4 0 8 1 rwobjpl 40 19861 0 16110 38 0 38 38 0 8 0 pdppl 4096 1624 0 1558 98 32 66 82 0 8 0 pvpl 32 369609 0 359446 104 0 104 104 0 265 16 pmappl 216 808 0 779 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 433 0 78 12 0 12 12 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(ffffffff83339344) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337ac54,ffffffff832d475f,1f5,ffffffff83336376) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80003814faa0) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff80000140b800) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff80000140b800) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff800038151a18) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff800038157bd0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806c437a40,41,fffffd8007bfb7b8,ffff800038151a18) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8065491448,ffff800038151a18) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8065491448,ffff800038151a18) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8065491448,ffff800038151a18) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8065491448,ffff800038151a18) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff800038157e20) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800038157e20) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5d81c81c470, 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(ffffffff83339344) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337ac54,ffffffff832d475f,1f5,ffffffff83336376) at __assert+0x29 sys/kern/subr_prf.c:-1 pipex_unlink_session_locked(ffff80003814faa0) at pipex_unlink_session_locked+0x402 pipex_destroy_all_sessions(ffff80000140b800) at pipex_destroy_all_sessions+0xd9 pipex_rele_session sys/net/pipex.c:-1 [inline] pipex_destroy_all_sessions(ffff80000140b800) at pipex_destroy_all_sessions+0xd9 sys/net/pipex.c:153 pppacclose(637e,41,2000,ffff800038151a18) at pppacclose+0x16f sys/net/if_pppx.c:1335 spec_close(ffff800038157bd0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd806c437a40,41,fffffd8007bfb7b8,ffff800038151a18) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8065491448,ffff800038151a18) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8065491448,ffff800038151a18) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8065491448,ffff800038151a18) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8065491448,ffff800038151a18) at closef+0x190 sys/kern/kern_descrip.c:1264 syscall(ffff800038157e20) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff800038157e20) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5d81c81c470, count: -13