panic: kernel diagnostic assertion "ifp != NULL" failed: file "/syzkaller/managers/main/kernel/sys/net/rtsock.c", line 939 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 27208 79827 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c001f) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82429cd1,ffffffff823d25e5,3ab,ffffffff82395e24) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b33c00,ffff80001d792aa0,ffff80001d7929f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806bc21500,fffffd806b68d960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b68d960,9,fffffd806bc21500,0,0,ffff80001d6f3770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b68d960,0,ffff80001d792c90,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3770,3,ffff80001d792d70,0,ffff80001d792e50) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3770,ffff80001d792e08,ffff80001d792e50) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d792ed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2b7b6e8e60, count: 4 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 kernel diagnostic assertion "ifp != NULL" failed: file "/syzkaller/managers/main/kernel/sys/net/rtsock.c", line 939 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c001f) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82429cd1,ffffffff823d25e5,3ab,ffffffff82395e24) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b33c00,ffff80001d792aa0,ffff80001d7929f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806bc21500,fffffd806b68d960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b68d960,9,fffffd806bc21500,0,0,ffff80001d6f3770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b68d960,0,ffff80001d792c90,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3770,3,ffff80001d792d70,0,ffff80001d792e50) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3770,ffff80001d792e08,ffff80001d792e50) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d792ed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2b7b6e8e60, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d792870 rbx 0xffff80001d792920 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8155d16f kprintf+0x15f r9 0x1 r10 0x2 r11 0xd736ede02f121d43 r12 0x3000000008 r13 0xffff80001d792880 r14 0x100 r15 0x1 rip 0xffffffff81ac0cb8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d792860 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=27208 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6f3020,0xffffffff827f7a58 process=0xffff80001e836af8 user=0xffff80001d78d000, vmspace=0xfffffd8056f4daa8 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 79827 461814 25993 0 2 0 syz-executor.0 *79827 27208 25993 0 7 0x4000000 syz-executor.0 25993 277378 24400 0 2 0x482 syz-executor.0 8218 440337 0 0 3 0x14280 nfsidl nfsio 59262 344795 0 0 3 0x14280 nfsidl nfsio 80227 404783 0 0 3 0x14280 nfsidl nfsio 87035 466066 0 0 3 0x14280 nfsidl nfsio 50013 82672 0 0 3 0x14280 nfsidl nfsio 6491 401517 0 0 3 0x14280 nfsidl nfsio 85912 231635 0 0 3 0x14280 nfsidl nfsio 19147 269525 0 0 3 0x14280 nfsidl nfsio 90998 117101 0 0 3 0x14280 nfsidl nfsio 37845 122034 0 0 3 0x14280 nfsidl nfsio 3470 238791 0 0 3 0x14280 nfsidl nfsio 64914 293423 0 0 3 0x14280 nfsidl nfsio 97708 47545 0 0 3 0x14280 nfsidl nfsio 55895 47061 0 0 3 0x14280 nfsidl nfsio 763 103911 0 0 3 0x14280 nfsidl nfsio 35422 353900 0 0 3 0x14280 nfsidl nfsio 79391 187603 0 0 3 0x14280 nfsidl nfsio 89986 134669 0 0 3 0x14280 nfsidl nfsio 94458 485849 0 0 3 0x14280 nfsidl nfsio 50505 397096 0 0 3 0x14280 nfsidl nfsio 59144 241928 0 0 3 0x14200 bored sosplice 83897 473445 24400 0 2 0x2 syz-executor.1 24400 176163 43610 0 3 0x82 thrsleep syz-fuzzer 24400 250316 43610 0 2 0x4000482 syz-fuzzer 24400 24639 43610 0 3 0x4000082 thrsleep syz-fuzzer 24400 285591 43610 0 3 0x4000082 thrsleep syz-fuzzer 24400 50816 43610 0 3 0x4000082 thrsleep syz-fuzzer 24400 32659 43610 0 2 0x4000002 syz-fuzzer 24400 350251 43610 0 3 0x4000082 thrsleep syz-fuzzer 24400 522673 43610 0 3 0x4000082 thrsleep syz-fuzzer 43610 239070 36580 0 3 0x10008a pause ksh 36580 488454 41281 0 3 0x92 select sshd 22671 173341 1 0 3 0x100083 ttyin getty 41281 1395 1 0 3 0x80 select sshd 7207 419442 27073 73 3 0x100090 kqread syslogd 27073 471272 1 0 3 0x100082 netio syslogd 72332 4981 1 77 3 0x100090 poll dhclient 50108 419862 1 0 3 0x80 poll dhclient 59704 464769 0 0 3 0x14200 bored smr 42815 176165 0 0 2 0x14200 zerothread 73217 58893 0 0 3 0x14200 aiodoned aiodoned 95693 454588 0 0 3 0x14200 syncer update 99997 100320 0 0 3 0x14200 cleaner cleaner 65944 439207 0 0 3 0x14200 reaper reaper 53415 269221 0 0 3 0x14200 pgdaemon pagedaemon 76916 393186 0 0 3 0x14200 bored crynlk 20184 273342 0 0 3 0x14200 bored crypto 59396 346077 0 0 3 0x40014200 acpi0 acpi0 57324 27630 0 0 3 0x14200 bored softnet 85761 94175 0 0 3 0x14200 bored systqmp 69249 179411 0 0 3 0x14200 bored systq 40090 97164 0 0 3 0x40014200 bored softclock 18859 339280 0 0 3 0x40014200 idle0 1 481808 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 9506 6352K 6989K 78643K 11163 0 pcb 13 8K 8K 78643K 67 0 rtable 132 16K 19K 78643K 544 0 ifaddr 79 16K 17K 78643K 191 0 counters 21 16K 16K 78643K 34 0 ioctlops 0 0K 4K 78643K 75 0 iov 0 0K 16K 78643K 72 0 mount 1 1K 1K 78643K 1 0 vnodes 1237 78K 78K 78643K 1484 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 3 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 98 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 400 0 sigio 0 0K 0K 78643K 10 0 proc 49 38K 55K 78643K 454 0 subproc 32 2K 3K 78643K 85 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 19 0 in_multi 61 3K 3K 78643K 98 0 ether_multi 1 0K 0K 78643K 10 0 mrt 1 0K 0K 78643K 7 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 61 281K 281K 78643K 61 0 exec 0 0K 1K 78643K 249 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 128 55K 64K 78643K 1840 0 UVM aobj 12 2K 2K 78643K 13 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 41 0 NDP 14 0K 0K 78643K 32 0 temp 109 3850K 3916K 78643K 18624 0 kqueue 3 4K 14K 78643K 31 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 11 0 4 1 0 1 1 0 8 0 rtpcb 80 48 0 45 1 0 1 1 0 8 0 rtentry 112 71 0 25 2 0 2 2 0 8 0 unpcb 120 171 0 163 1 0 1 1 0 8 0 syncache 264 7 0 7 2 2 0 1 0 8 0 tcpqe 32 172 0 172 2 2 0 1 0 8 0 tcpcb 544 155 0 151 1 0 1 1 0 8 0 ipq 40 3 0 3 1 1 0 1 0 8 0 ipqe 40 51 0 51 1 1 0 1 0 8 0 inpcb 280 1108 0 1101 4 2 2 3 0 8 1 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 11 0 5 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 2 0 2 1 0 1 1 0 8 1 pfrktable 1344 70 0 62 2 0 2 2 0 8 1 pftag 88 12 0 10 3 2 1 1 0 8 0 pfrule 1360 24 0 16 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 296 0 91 13 0 13 13 0 8 0 art_table 32 298 0 91 2 0 2 2 0 8 0 art_node 16 70 0 28 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 6 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 96 0 86 1 0 1 1 0 8 0 shmpl 112 11 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1956 0 561 88 0 88 88 0 8 0 ffsino 240 1956 0 561 83 0 83 83 0 8 0 nchpl 144 2709 0 1121 60 0 60 60 0 8 0 uvmvnodes 72 2175 0 0 40 0 40 40 0 8 0 vnodes 208 2175 0 0 115 0 115 115 0 8 0 namei 1024 7552 0 7552 3 2 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 528 6 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 24 0 18 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 14117 0 14117 2 1 1 1 0 8 1 plimitpl 152 56 0 49 1 0 1 1 0 8 0 sigapl 424 598 0 549 6 0 6 6 0 8 0 futexpl 56 8265 0 8265 2 1 1 1 0 8 1 knotepl 112 132 0 113 1 0 1 1 0 8 0 kqueuepl 144 75 0 73 1 0 1 1 0 8 0 pipelkpl 16 136 0 126 1 0 1 1 0 8 0 pipepl 120 272 0 253 1 0 1 1 0 8 0 fdescpl 432 563 0 549 2 0 2 2 0 8 0 filepl 120 3974 0 3878 5 1 4 5 0 8 1 lockfpl 104 82 0 81 1 0 1 1 0 8 0 lockfspl 48 35 0 34 1 0 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 524 0 517 1 0 1 1 0 8 0 zombiepl 144 549 0 549 3 2 1 1 0 8 1 processpl 920 598 0 549 7 0 7 7 0 8 0 procpl 624 1048 0 991 5 0 5 5 0 8 0 sosppl 128 13 0 13 2 2 0 1 0 8 0 sockpl 400 1348 0 1330 8 4 4 5 0 8 2 mcl64k 65536 37 0 37 2 1 1 1 0 8 1 mcl16k 16384 10 0 10 1 1 0 1 0 8 0 mcl12k 12288 13 0 13 1 1 0 1 0 8 0 mcl9k 9216 7 0 7 3 2 1 1 0 8 1 mcl8k 8192 12 0 12 3 2 1 1 0 8 1 mcl4k 4096 42 0 42 3 2 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 76994 0 76936 20 11 9 18 0 8 0 mtagpl 80 37 0 17 2 1 1 1 0 8 0 mbufpl 256 125323 0 125151 39 16 23 29 0 8 8 bufpl 280 4312 0 134 299 0 299 299 0 8 0 anonpl 16 72788 0 60704 84 5 79 79 0 107 14 amapchunkpl 152 3459 0 3323 20 13 7 20 0 158 1 amappl16 192 2816 0 1957 57 5 52 56 0 8 8 amappl15 184 179 0 174 1 0 1 1 0 8 0 amappl14 176 24 0 19 1 0 1 1 0 8 0 amappl13 168 204 0 201 1 0 1 1 0 8 0 amappl12 160 4 0 4 2 1 1 1 0 8 1 amappl11 152 225 0 213 1 0 1 1 0 8 0 amappl10 144 31 0 24 1 0 1 1 0 8 0 amappl9 136 366 0 365 1 0 1 1 0 8 0 amappl8 128 358 0 320 2 0 2 2 0 8 0 amappl7 120 118 0 105 1 0 1 1 0 8 0 amappl6 112 203 0 193 1 0 1 1 0 8 0 amappl5 104 330 0 320 1 0 1 1 0 8 0 amappl4 96 780 0 753 1 0 1 1 0 8 0 amappl3 88 116 0 111 1 0 1 1 0 8 0 amappl2 80 3589 0 3522 2 0 2 2 0 8 0 amappl1 72 19798 0 19381 25 15 10 17 0 8 1 amappl 80 1307 0 1262 2 0 2 2 0 84 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 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 64 12 0 1 1 0 1 1 0 8 0 uaddrrnd 24 569 0 551 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 569 0 551 1 0 1 1 0 8 0 vmmpekpl 168 7615 0 7581 3 1 2 2 0 8 0 vmmpepl 168 78476 0 76528 156 26 130 130 0 357 43 vmsppl 272 568 0 551 2 0 2 2 0 8 0 pdppl 4096 1144 0 1106 8 2 6 6 0 8 0 pvpl 32 234172 0 219008 192 6 186 187 0 265 34 pmappl 200 568 0 551 2 0 2 2 0 8 1 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 287 0 43 8 0 8 8 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c001f) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82429cd1,ffffffff823d25e5,3ab,ffffffff82395e24) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b33c00,ffff80001d792aa0,ffff80001d7929f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806bc21500,fffffd806b68d960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b68d960,9,fffffd806bc21500,0,0,ffff80001d6f3770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b68d960,0,ffff80001d792c90,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3770,3,ffff80001d792d70,0,ffff80001d792e50) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3770,ffff80001d792e08,ffff80001d792e50) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d792ed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2b7b6e8e60, count: -11 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c001f) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff82429cd1,ffffffff823d25e5,3ab,ffffffff82395e24) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b33c00,ffff80001d792aa0,ffff80001d7929f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806bc21500,fffffd806b68d960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b68d960,9,fffffd806bc21500,0,0,ffff80001d6f3770) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b68d960,0,ffff80001d792c90,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3770,3,ffff80001d792d70,0,ffff80001d792e50) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3770,ffff80001d792e08,ffff80001d792e50) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d792ed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2b7b6e8e60, count: -11