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 *183572 17813 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c229c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242ac14,ffffffff823d6b3e,3ab,ffffffff82399ef9) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000afea00,ffff80001f7bce20,ffff80001f7bcd78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8058083b00,fffffd805f718330,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805f718330,9,fffffd8058083b00,0,0,ffff80001d6a99c8) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805f718330,0,ffff80001f7bd010,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6a99c8,3,ffff80001f7bd0f0,0,ffff80001f7bd1d0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6a99c8,ffff80001f7bd188,ffff80001f7bd1d0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7bd250) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xea15cffeb40, 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(ffffffff823c229c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242ac14,ffffffff823d6b3e,3ab,ffffffff82399ef9) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000afea00,ffff80001f7bce20,ffff80001f7bcd78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8058083b00,fffffd805f718330,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805f718330,9,fffffd8058083b00,0,0,ffff80001d6a99c8) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805f718330,0,ffff80001f7bd010,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6a99c8,3,ffff80001f7bd0f0,0,ffff80001f7bd1d0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6a99c8,ffff80001f7bd188,ffff80001f7bd1d0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7bd250) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xea15cffeb40, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001f7bcbf0 rbx 0xffff80001f7bcca0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81ad64bf kprintf+0x15f r9 0x1 r10 0x2 r11 0xa40177a75645cfa6 r12 0x3000000008 r13 0xffff80001f7bcc00 r14 0x100 r15 0x1 rip 0xffffffff8181e468 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001f7bcbe0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=183572 stat=onproc flags process=0 proc=4000000 pri=75, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6a9ea8,0xffffffff8283c0a8 process=0xffff8000ffff9210 user=0xffff80001f7b8000, vmspace=0xfffffd806479aee0 estcpu=30, cpticks=0, pctcpu=0.2 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 17813 189650 13637 0 3 0x80 fsleep syz-executor.0 *17813 183572 13637 0 7 0x4000000 syz-executor.0 91048 486448 30127 0 2 0x2 syz-executor.1 78489 477513 0 0 3 0x14200 bored sosplice 13637 448148 30127 0 2 0x482 syz-executor.0 30127 433373 38763 0 3 0x82 thrsleep syz-fuzzer 30127 208833 38763 0 2 0x4000482 syz-fuzzer 30127 425842 38763 0 3 0x4000082 thrsleep syz-fuzzer 30127 304958 38763 0 3 0x4000082 thrsleep syz-fuzzer 30127 240374 38763 0 3 0x4000082 thrsleep syz-fuzzer 30127 288297 38763 0 3 0x4000082 kqread syz-fuzzer 30127 241817 38763 0 3 0x4000082 thrsleep syz-fuzzer 30127 92333 38763 0 3 0x4000082 thrsleep syz-fuzzer 38763 355141 10234 0 3 0x10008a pause ksh 10234 249508 48799 0 3 0x92 select sshd 78697 319925 1 0 3 0x100083 ttyopn getty 48799 419900 1 0 3 0x80 select sshd 97783 497343 43723 73 3 0x100090 kqread syslogd 43723 55288 1 0 3 0x100082 netio syslogd 33530 254878 1 77 3 0x100090 poll dhclient 5278 29380 1 0 3 0x80 poll dhclient 52700 66520 0 0 3 0x14200 bored smr 8962 93900 0 0 2 0x14200 zerothread 42679 310098 0 0 3 0x14200 aiodoned aiodoned 35638 241640 0 0 2 0x14200 update 58943 306449 0 0 3 0x14200 cleaner cleaner 48171 71545 0 0 3 0x14200 reaper reaper 64282 73947 0 0 3 0x14200 pgdaemon pagedaemon 18061 470796 0 0 3 0x14200 bored crynlk 69584 170655 0 0 3 0x14200 bored crypto 19070 394485 0 0 3 0x40014200 acpi0 acpi0 27230 487642 0 0 3 0x14200 bored softnet 84063 76914 0 0 3 0x14200 bored systqmp 24841 502427 0 0 3 0x14200 bored systq 77958 428314 0 0 2 0x40014200 softclock 7974 344340 0 0 3 0x40014200 idle0 1 459338 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 9563 7317K 7317K 78643K 13391 0 pcb 13 8K 8K 78643K 81 0 rtable 121 7K 10K 78643K 686 0 ifaddr 65 13K 15K 78643K 215 0 counters 21 16K 16K 78643K 35 0 ioctlops 0 0K 4K 78643K 729 0 iov 0 0K 14K 78643K 1003 0 mount 1 1K 1K 78643K 1 0 vnodes 1240 78K 78K 78643K 2118 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 4 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 149 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 1132 0 sigio 0 0K 0K 78643K 10 0 proc 50 38K 63K 78643K 605 0 subproc 32 2K 3K 78643K 221 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 28 0 in_multi 51 3K 3K 78643K 121 0 ether_multi 1 0K 0K 78643K 11 0 mrt 0 0K 0K 78643K 7 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 285 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 129 55K 55K 78643K 3375 0 UVM aobj 23 4K 4K 78643K 30 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 1K 78643K 54 0 NDP 10 0K 0K 78643K 36 0 temp 96 3845K 3915K 78643K 11903 0 kqueue 3 4K 13K 78643K 30 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 16 0 10 1 0 1 1 0 8 0 rtpcb 80 54 0 51 1 0 1 1 0 8 0 rtentry 112 103 0 61 2 0 2 2 0 8 0 unpcb 120 324 0 313 1 0 1 1 0 8 0 syncache 264 11 0 11 3 3 0 1 0 8 0 tcpqe 32 67 0 67 1 1 0 1 0 8 0 tcpcb 544 1090 0 1086 1 0 1 1 0 8 0 ipq 40 2 0 2 1 1 0 1 0 8 0 ipqe 40 90 0 90 1 1 0 1 0 8 0 inpcb 280 1950 0 1943 4 3 1 2 0 8 0 rttmr 72 3 0 3 2 2 0 1 0 8 0 nd6 48 20 0 16 1 0 1 1 0 8 0 ppxss 1128 3 0 3 2 2 0 1 0 8 0 pfosfp 40 1 0 0 1 0 1 1 0 8 0 pfosfpen 112 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 107 0 99 2 0 2 2 0 8 1 pftag 88 21 0 18 1 0 1 1 0 8 0 pfqueue 264 2 0 0 1 0 1 1 0 8 0 pfrule 1360 26 0 12 2 0 2 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 393 0 212 13 0 13 13 0 8 0 art_table 32 395 0 212 2 0 2 2 0 8 0 art_node 16 102 0 63 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 145 0 135 1 0 1 1 0 8 0 shmpl 112 28 0 7 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2644 0 1249 88 0 88 88 0 8 0 ffsino 240 2644 0 1249 83 0 83 83 0 8 0 nchpl 144 5050 0 3462 60 0 60 60 0 8 0 uvmvnodes 72 3502 0 0 64 0 64 64 0 8 0 vnodes 208 3502 0 0 185 0 185 185 0 8 0 namei 1024 12818 0 12818 3 2 1 1 0 8 1 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 528 5 0 3 2 1 1 1 0 8 0 pfiaddrpl 120 34 0 28 3 2 1 1 0 8 0 scxspl 192 12042 0 12042 9 8 1 1 0 8 1 plimitpl 152 61 0 54 1 0 1 1 0 8 0 sigapl 424 1286 0 1257 4 0 4 4 0 8 0 futexpl 56 20383 0 20382 4 3 1 1 0 8 0 knotepl 112 230 0 211 1 0 1 1 0 8 0 kqueuepl 144 74 0 69 1 0 1 1 0 8 0 pipelkpl 16 181 0 171 1 0 1 1 0 8 0 pipepl 120 362 0 343 1 0 1 1 0 8 0 fdescpl 432 1271 0 1257 2 0 2 2 0 8 0 filepl 120 7852 0 7756 5 1 4 4 0 8 1 lockfpl 104 98 0 97 1 0 1 1 0 8 0 lockfspl 48 36 0 35 1 0 1 1 0 8 0 sessionpl 112 28 0 18 1 0 1 1 0 8 0 pgrppl 48 32 0 22 1 0 1 1 0 8 0 ucredpl 96 413 0 406 1 0 1 1 0 8 0 zombiepl 144 1257 0 1257 1 0 1 1 0 8 1 processpl 920 1286 0 1257 4 0 4 4 0 8 0 procpl 624 2451 0 2414 5 1 4 4 0 8 1 sosppl 128 14 0 14 3 2 1 1 0 8 1 sockpl 400 2329 0 2308 3 0 3 3 0 8 0 mcl64k 65536 46 0 46 3 2 1 1 0 8 1 mcl16k 16384 2 0 2 2 1 1 1 0 8 1 mcl12k 12288 27 0 27 3 2 1 1 0 8 1 mcl9k 9216 13 0 13 3 2 1 1 0 8 1 mcl8k 8192 13 0 13 3 2 1 1 0 8 1 mcl4k 4096 52 0 52 4 3 1 1 0 8 1 mcl2k2 2112 3 0 3 3 2 1 1 0 8 1 mcl2k 2048 75785 0 75742 24 17 7 16 0 8 1 mtagpl 80 26 0 22 2 1 1 1 0 8 0 mbufpl 256 133150 0 133073 39 27 12 29 0 8 4 bufpl 280 4793 0 126 334 0 334 334 0 8 0 anonpl 16 127051 0 111488 94 22 72 79 0 107 7 amapchunkpl 152 5853 0 5708 26 7 19 20 0 158 13 amappl16 192 5296 0 4417 72 27 45 55 0 8 0 amappl15 184 902 0 898 1 0 1 1 0 8 0 amappl14 176 30 0 25 1 0 1 1 0 8 0 amappl13 168 65 0 62 1 0 1 1 0 8 0 amappl12 160 6 0 6 1 1 0 1 0 8 0 amappl11 152 958 0 945 1 0 1 1 0 8 0 amappl10 144 20 0 14 1 0 1 1 0 8 0 amappl9 136 375 0 374 1 0 1 1 0 8 0 amappl8 128 434 0 397 2 0 2 2 0 8 0 amappl7 120 146 0 133 1 0 1 1 0 8 0 amappl6 112 31 0 21 1 0 1 1 0 8 0 amappl5 104 1181 0 1168 1 0 1 1 0 8 0 amappl4 96 484 0 457 1 0 1 1 0 8 0 amappl3 88 146 0 140 1 0 1 1 0 8 0 amappl2 80 9871 0 9802 2 0 2 2 0 8 0 amappl1 72 32539 0 32129 24 15 9 17 0 8 0 amappl 80 2766 0 2720 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 29 0 7 1 0 1 1 0 8 0 uaddrrnd 24 1276 0 1260 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1276 0 1260 1 0 1 1 0 8 0 vmmpekpl 168 11329 0 11300 2 0 2 2 0 8 0 vmmpepl 168 160229 0 158267 195 78 117 123 0 357 28 vmsppl 272 1275 0 1260 4 2 2 2 0 8 0 pdppl 4096 2558 0 2522 6 1 5 6 0 8 0 pvpl 32 353750 0 335185 222 41 181 188 0 265 27 pmappl 200 1275 0 1260 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 290 0 60 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(ffffffff823c229c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242ac14,ffffffff823d6b3e,3ab,ffffffff82399ef9) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000afea00,ffff80001f7bce20,ffff80001f7bcd78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8058083b00,fffffd805f718330,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805f718330,9,fffffd8058083b00,0,0,ffff80001d6a99c8) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805f718330,0,ffff80001f7bd010,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6a99c8,3,ffff80001f7bd0f0,0,ffff80001f7bd1d0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6a99c8,ffff80001f7bd188,ffff80001f7bd1d0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7bd250) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xea15cffeb40, 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(ffffffff823c229c) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242ac14,ffffffff823d6b3e,3ab,ffffffff82399ef9) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000afea00,ffff80001f7bce20,ffff80001f7bcd78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8058083b00,fffffd805f718330,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805f718330,9,fffffd8058083b00,0,0,ffff80001d6a99c8) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805f718330,0,ffff80001f7bd010,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6a99c8,3,ffff80001f7bd0f0,0,ffff80001f7bd1d0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6a99c8,ffff80001f7bd188,ffff80001f7bd1d0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7bd250) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xea15cffeb40, count: -11