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 *153424 47585 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823c20ed) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242d39c,ffffffff823dae3b,3ab,ffffffff8239a6b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000afaf00,ffff80001d78e5a0,ffff80001d78e4f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805368a300,fffffd8060f4e960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8060f4e960,9,fffffd805368a300,0,0,ffff80001d6c1288) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8060f4e960,0,ffff80001d78e790,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c1288,3,ffff80001d78e870,0,ffff80001d78e950) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c1288,ffff80001d78e908,ffff80001d78e950) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d78e9d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x891ae3e15d0, 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(ffffffff823c20ed) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242d39c,ffffffff823dae3b,3ab,ffffffff8239a6b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000afaf00,ffff80001d78e5a0,ffff80001d78e4f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805368a300,fffffd8060f4e960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8060f4e960,9,fffffd805368a300,0,0,ffff80001d6c1288) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8060f4e960,0,ffff80001d78e790,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c1288,3,ffff80001d78e870,0,ffff80001d78e950) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c1288,ffff80001d78e908,ffff80001d78e950) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d78e9d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x891ae3e15d0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d78e370 rbx 0xffff80001d78e420 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8120980f kprintf+0x15f r9 0x1 r10 0x2 r11 0x2cce381d03aed4c2 r12 0x3000000008 r13 0xffff80001d78e380 r14 0x100 r15 0x1 rip 0xffffffff81fbc738 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d78e360 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=153424 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6c2ae8,0xffffffff8283fb58 process=0xffff80001d6e8af8 user=0xffff80001d789000, vmspace=0xfffffd8063cffdd0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 47585 510534 52294 0 2 0 syz-executor.0 *47585 153424 52294 0 7 0x4000000 syz-executor.0 52294 32085 48509 0 2 0x482 syz-executor.0 26167 225319 0 0 3 0x14280 nfsidl nfsio 14125 323238 0 0 3 0x14280 nfsidl nfsio 18651 283892 0 0 3 0x14280 nfsidl nfsio 26060 284651 0 0 3 0x14280 nfsidl nfsio 87078 103279 0 0 3 0x14280 nfsidl nfsio 89767 15273 0 0 3 0x14280 nfsidl nfsio 61485 24642 0 0 3 0x14280 nfsidl nfsio 19904 400050 0 0 3 0x14280 nfsidl nfsio 2364 287138 0 0 3 0x14280 nfsidl nfsio 62157 365586 0 0 3 0x14280 nfsidl nfsio 95562 95169 0 0 3 0x14280 nfsidl nfsio 34109 306452 0 0 3 0x14280 nfsidl nfsio 80726 2223 0 0 3 0x14280 nfsidl nfsio 72016 282539 0 0 3 0x14280 nfsidl nfsio 86744 92786 0 0 3 0x14280 nfsidl nfsio 48863 124564 0 0 3 0x14280 nfsidl nfsio 79426 140866 0 0 3 0x14280 nfsidl nfsio 33947 199264 0 0 3 0x14280 nfsidl nfsio 42735 331372 0 0 3 0x14280 nfsidl nfsio 34 519196 0 0 3 0x14280 nfsidl nfsio 79414 43978 0 0 3 0x14200 bored sosplice 2184 144125 0 0 3 0x14200 acct acct 28853 336247 48509 0 2 0x2 syz-executor.1 48509 297986 22517 0 3 0x82 thrsleep syz-fuzzer 48509 407168 22517 0 2 0x4000482 syz-fuzzer 48509 277032 22517 0 3 0x4000082 thrsleep syz-fuzzer 48509 247620 22517 0 3 0x4000082 thrsleep syz-fuzzer 48509 21625 22517 0 3 0x4000082 thrsleep syz-fuzzer 48509 157 22517 0 3 0x4000082 kqread syz-fuzzer 48509 306771 22517 0 3 0x4000082 thrsleep syz-fuzzer 48509 70478 22517 0 3 0x4000082 thrsleep syz-fuzzer 22517 308710 71920 0 3 0x10008a pause ksh 71920 264394 51810 0 3 0x92 select sshd 3127 483924 1 0 3 0x100083 ttyin getty 51810 155962 1 0 3 0x80 select sshd 6666 505223 69057 73 3 0x100090 kqread syslogd 69057 266590 1 0 3 0x100082 netio syslogd 18991 146419 1 77 3 0x100090 poll dhclient 4949 439144 1 0 3 0x80 poll dhclient 65824 181190 0 0 3 0x14200 bored smr 70585 347740 0 0 2 0x14200 zerothread 12998 469733 0 0 3 0x14200 aiodoned aiodoned 84807 62778 0 0 3 0x14200 syncer update 57451 141731 0 0 3 0x14200 cleaner cleaner 26129 358440 0 0 3 0x14200 reaper reaper 85733 131849 0 0 3 0x14200 pgdaemon pagedaemon 840 334382 0 0 3 0x14200 bored crynlk 15963 258208 0 0 3 0x14200 bored crypto 42263 483424 0 0 3 0x40014200 acpi0 acpi0 47057 76205 0 0 3 0x14200 bored softnet 38162 275703 0 0 3 0x14200 bored systqmp 34310 371341 0 0 3 0x14200 bored systq 23463 117784 0 0 3 0x40014200 bored softclock 85849 443049 0 0 3 0x40014200 idle0 1 401619 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 9499 6358K 6743K 78643K 11209 0 pcb 13 8K 8K 78643K 81 0 rtable 115 13K 17K 78643K 519 0 ifaddr 65 13K 15K 78643K 155 0 sysctl 3 1K 1K 78643K 3 0 counters 21 16K 16K 78643K 27 0 ioctlops 0 0K 4K 78643K 71 0 iov 0 0K 12K 78643K 69 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 1432 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 0K 78643K 44 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 568 0 sigio 0 0K 0K 78643K 13 0 proc 49 38K 55K 78643K 427 0 subproc 32 2K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 40 0 in_multi 50 2K 2K 78643K 116 0 ether_multi 1 0K 0K 78643K 17 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 1K 78643K 242 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 132 39K 39K 78643K 2585 0 UVM aobj 7 2K 2K 78643K 14 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 68 0 NDP 13 0K 0K 78643K 24 0 temp 94 3844K 3917K 78643K 39647 0 kqueue 3 4K 10K 78643K 26 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 8 0 2 1 0 1 1 0 8 0 rtpcb 80 220 0 217 1 0 1 1 0 8 0 rtentry 112 63 0 21 2 0 2 2 0 8 0 unpcb 120 187 0 179 1 0 1 1 0 8 0 syncache 264 11 0 11 2 2 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 163 0 163 2 2 0 1 0 8 0 tcpcb 544 185 0 181 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 45 0 45 1 1 0 1 0 8 0 inpcb 280 409 0 402 4 3 1 2 0 8 0 nd6 48 12 0 8 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 1 0 1 1 1 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 47 0 45 4 3 1 1 0 8 0 pftag 88 8 0 8 2 1 1 1 0 8 1 pfrule 1360 16 0 10 3 2 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 281 0 100 13 0 13 13 0 8 1 art_table 32 283 0 100 2 0 2 2 0 8 0 art_node 16 62 0 23 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 2 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 42 0 32 1 0 1 1 0 8 0 shmpl 112 12 0 7 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2104 0 708 88 0 88 88 0 8 0 ffsino 240 2104 0 708 83 0 83 83 0 8 0 nchpl 144 3006 0 1424 60 0 60 60 0 8 0 uvmvnodes 72 2302 0 0 42 0 42 42 0 8 0 vnodes 208 2302 0 0 122 0 122 122 0 8 0 namei 1024 7945 0 7944 1 0 1 1 0 8 0 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 528 4 0 2 2 1 1 1 0 8 0 pfiaddrpl 120 14 0 12 2 1 1 1 0 8 0 scxspl 192 10052 0 10052 1 0 1 1 0 8 1 plimitpl 152 35 0 28 1 0 1 1 0 8 0 sigapl 424 773 0 723 6 0 6 6 0 8 0 futexpl 56 8734 0 8734 1 0 1 1 0 8 1 knotepl 112 112 0 93 1 0 1 1 0 8 0 kqueuepl 144 66 0 62 1 0 1 1 0 8 0 pipelkpl 16 692 0 682 1 0 1 1 0 8 0 pipepl 120 1384 0 1365 4 2 2 2 0 8 1 fdescpl 432 737 0 723 2 0 2 2 0 8 0 filepl 120 4463 0 4367 4 0 4 4 0 8 1 lockfpl 104 80 0 79 1 0 1 1 0 8 0 lockfspl 48 27 0 26 1 0 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 274 0 267 1 0 1 1 0 8 0 zombiepl 144 723 0 723 1 0 1 1 0 8 1 processpl 920 773 0 723 7 0 7 7 0 8 0 procpl 624 1849 0 1791 6 0 6 6 0 8 1 sosppl 128 3 0 3 1 1 0 1 0 8 0 sockpl 400 818 0 800 5 2 3 4 0 8 1 mcl64k 65536 287 0 287 36 36 0 33 0 8 0 mcl16k 16384 3 0 3 3 3 0 1 0 8 0 mcl12k 12288 12 0 12 2 2 0 1 0 8 0 mcl9k 9216 2 0 2 2 2 0 1 0 8 0 mcl8k 8192 12 0 12 4 4 0 1 0 8 0 mcl4k 4096 41 0 41 3 2 1 1 0 8 1 mcl2k2 2112 4 0 4 2 2 0 1 0 8 0 mcl2k 2048 72517 0 72470 18 11 7 14 0 8 0 mtagpl 80 58 0 26 3 1 2 2 0 8 0 mbufpl 256 119852 0 119687 52 29 23 25 0 8 3 bufpl 280 5051 0 132 352 0 352 352 0 8 0 anonpl 16 79546 0 68312 80 17 63 76 0 107 0 amapchunkpl 152 4376 0 4246 22 15 7 20 0 158 0 amappl16 192 3629 0 2782 57 12 45 54 0 8 2 amappl15 184 39 0 36 1 0 1 1 0 8 0 amappl14 176 251 0 246 1 0 1 1 0 8 0 amappl13 168 42 0 37 1 0 1 1 0 8 0 amappl12 160 3 0 3 1 1 0 1 0 8 0 amappl11 152 90 0 79 1 0 1 1 0 8 0 amappl10 144 278 0 270 1 0 1 1 0 8 0 amappl9 136 374 0 373 1 0 1 1 0 8 0 amappl8 128 348 0 307 2 0 2 2 0 8 0 amappl7 120 368 0 356 1 0 1 1 0 8 0 amappl6 112 65 0 57 1 0 1 1 0 8 0 amappl5 104 646 0 636 1 0 1 1 0 8 0 amappl4 96 484 0 449 1 0 1 1 0 8 0 amappl3 88 339 0 334 1 0 1 1 0 8 0 amappl2 80 5073 0 5006 2 0 2 2 0 8 0 amappl1 72 23204 0 22794 23 14 9 17 0 8 0 amappl 80 2066 0 2024 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 13 0 7 1 0 1 1 0 8 0 uaddrrnd 24 741 0 725 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 741 0 725 1 0 1 1 0 8 0 vmmpekpl 168 11729 0 11692 3 0 3 3 0 8 0 vmmpepl 168 95900 0 93964 157 39 118 118 0 357 32 vmsppl 272 740 0 725 4 2 2 2 0 8 0 pdppl 4096 1488 0 1452 6 1 5 6 0 8 0 pvpl 32 247662 0 233313 186 32 154 182 0 265 5 pmappl 200 740 0 725 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 333 0 94 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(ffffffff823c20ed) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242d39c,ffffffff823dae3b,3ab,ffffffff8239a6b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000afaf00,ffff80001d78e5a0,ffff80001d78e4f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805368a300,fffffd8060f4e960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8060f4e960,9,fffffd805368a300,0,0,ffff80001d6c1288) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8060f4e960,0,ffff80001d78e790,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c1288,3,ffff80001d78e870,0,ffff80001d78e950) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c1288,ffff80001d78e908,ffff80001d78e950) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d78e9d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x891ae3e15d0, 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(ffffffff823c20ed) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242d39c,ffffffff823dae3b,3ab,ffffffff8239a6b1) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000afaf00,ffff80001d78e5a0,ffff80001d78e4f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805368a300,fffffd8060f4e960,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8060f4e960,9,fffffd805368a300,0,0,ffff80001d6c1288) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8060f4e960,0,ffff80001d78e790,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c1288,3,ffff80001d78e870,0,ffff80001d78e950) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c1288,ffff80001d78e908,ffff80001d78e950) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d78e9d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x891ae3e15d0, count: -11