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 *221676 19710 0 0 0x4000000 0 syz-executor.1 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(ffff800000aff800,ffff80001f7eb5c0,ffff80001f7eb518,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805c6b3300,fffffd805da69c88,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da69c88,9,fffffd805c6b3300,0,0,ffff80001d6c14f8) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da69c88,0,ffff80001f7eb7b0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c14f8,3,ffff80001f7eb890,0,ffff80001f7eb970) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c14f8,ffff80001f7eb928,ffff80001f7eb970) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7eb9f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcdd7fb32d70, 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(ffff800000aff800,ffff80001f7eb5c0,ffff80001f7eb518,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805c6b3300,fffffd805da69c88,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da69c88,9,fffffd805c6b3300,0,0,ffff80001d6c14f8) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da69c88,0,ffff80001f7eb7b0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c14f8,3,ffff80001f7eb890,0,ffff80001f7eb970) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c14f8,ffff80001f7eb928,ffff80001f7eb970) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7eb9f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcdd7fb32d70, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001f7eb390 rbx 0xffff80001f7eb440 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8155d16f kprintf+0x15f r9 0x1 r10 0x2 r11 0x2d4bb6394b515931 r12 0x3000000008 r13 0xffff80001f7eb3a0 r14 0x100 r15 0x1 rip 0xffffffff81ac0cb8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001f7eb380 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=221676 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=68, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6c2ae8,0xffffffff827f7a58 process=0xffff8000ffff95a8 user=0xffff80001f7e6000, vmspace=0xfffffd806a1a8230 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 19710 249901 64018 0 2 0 syz-executor.1 *19710 221676 64018 0 7 0x4000000 syz-executor.1 92193 21332 52979 0 3 0x80 nanosleep syz-executor.0 92193 293290 52979 0 3 0x4000080 kqread syz-executor.0 92193 374118 52979 0 3 0x4000080 fsleep syz-executor.0 89304 225758 1 0 3 0x100083 ttyin getty 64018 308641 87773 0 3 0x82 nanosleep syz-executor.1 5633 320129 0 0 3 0x14200 bored sosplice 52979 70905 87773 0 2 0x482 syz-executor.0 87773 154312 31569 0 3 0x82 thrsleep syz-fuzzer 87773 308047 31569 0 3 0x4000082 thrsleep syz-fuzzer 87773 491049 31569 0 3 0x4000082 thrsleep syz-fuzzer 87773 78802 31569 0 3 0x4000082 thrsleep syz-fuzzer 87773 122431 31569 0 3 0x4000082 thrsleep syz-fuzzer 87773 446883 31569 0 3 0x4000082 kqread syz-fuzzer 87773 446266 31569 0 3 0x4000082 thrsleep syz-fuzzer 87773 257630 31569 0 3 0x4000082 thrsleep syz-fuzzer 31569 156713 30753 0 3 0x10008a pause ksh 30753 328693 69054 0 3 0x92 select sshd 69054 329681 1 0 3 0x80 select sshd 37834 411084 68983 73 3 0x100090 kqread syslogd 68983 230470 1 0 3 0x100082 netio syslogd 93303 459687 1 77 3 0x100090 poll dhclient 44689 182849 1 0 3 0x80 poll dhclient 33671 53103 0 0 3 0x14200 bored smr 5632 285293 0 0 2 0x14200 zerothread 42225 175697 0 0 3 0x14200 aiodoned aiodoned 55619 277863 0 0 3 0x14200 syncer update 37361 46206 0 0 3 0x14200 cleaner cleaner 5682 91778 0 0 3 0x14200 reaper reaper 32222 255286 0 0 3 0x14200 pgdaemon pagedaemon 43382 278482 0 0 3 0x14200 bored crynlk 93528 166988 0 0 3 0x14200 bored crypto 76712 309796 0 0 3 0x40014200 acpi0 acpi0 85181 381066 0 0 3 0x14200 bored softnet 47506 420878 0 0 3 0x14200 bored systqmp 58644 92863 0 0 3 0x14200 bored systq 11465 483665 0 0 3 0x40014200 bored softclock 34191 487498 0 0 3 0x40014200 idle0 1 109203 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 9525 6479K 6786K 78643K 11248 0 pcb 14 8K 8K 78643K 373 0 rtable 123 4K 8K 78643K 515 0 ifaddr 83 16K 16K 78643K 184 0 counters 21 16K 16K 78643K 28 0 ioctlops 0 0K 4K 78643K 92 0 iov 0 0K 16K 78643K 57 0 mount 1 1K 1K 78643K 1 0 vnodes 1214 76K 77K 78643K 1460 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 5 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 76 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 410 0 sigio 0 0K 0K 78643K 4 0 proc 52 38K 55K 78643K 476 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 54 0 in_multi 68 3K 3K 78643K 143 0 ether_multi 1 0K 0K 78643K 21 0 mrt 0 0K 0K 78643K 20 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 73 334K 334K 78643K 73 0 exec 0 0K 1K 78643K 227 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 133 71K 71K 78643K 1881 0 UVM aobj 8 2K 2K 78643K 10 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 83 0 NDP 13 0K 0K 78643K 27 0 temp 112 3848K 3912K 78643K 19277 0 kqueue 3 4K 8K 78643K 13 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 9 0 2 1 0 1 1 0 8 0 rtpcb 80 42 0 39 1 0 1 1 0 8 0 rtentry 112 74 0 25 2 0 2 2 0 8 0 unpcb 120 347 0 339 1 0 1 1 0 8 0 syncache 264 10 0 10 3 2 1 1 0 8 1 tcpqe 32 33 0 33 2 2 0 1 0 8 0 tcpcb 544 148 0 143 1 0 1 1 0 8 0 ipq 40 1 0 1 1 0 1 1 0 8 1 ipqe 40 45 0 45 1 0 1 1 0 8 1 inpcb 280 678 0 669 2 0 2 2 0 8 1 rttmr 72 9 0 9 2 2 0 1 0 8 0 nd6 48 11 0 4 1 0 1 1 0 8 0 ppxss 1128 2 0 2 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 82 0 82 3 2 1 1 0 8 1 pftag 88 17 0 16 3 2 1 1 0 8 0 pfqueue 264 2 0 2 1 0 1 1 0 8 1 pfrule 1360 26 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 294 0 68 15 0 15 15 0 8 0 art_table 32 296 0 68 2 0 2 2 0 8 0 art_node 16 73 0 28 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 8 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 70 0 60 1 0 1 1 0 8 0 shmpl 112 8 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2004 0 607 88 0 88 88 0 8 0 ffsino 240 2004 0 607 83 0 83 83 0 8 0 nchpl 144 2828 0 1243 60 0 60 60 0 8 0 uvmvnodes 72 2200 0 0 40 0 40 40 0 8 0 vnodes 208 2200 0 0 116 0 116 116 0 8 0 namei 1024 7729 0 7729 1 0 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 528 4 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 24 0 24 2 2 0 1 0 8 0 scxspl 192 8275 0 8275 1 0 1 1 0 8 1 plimitpl 152 44 0 37 1 0 1 1 0 8 0 sigapl 424 597 0 567 4 0 4 4 0 8 0 futexpl 56 8592 0 8591 1 0 1 1 0 8 0 knotepl 112 90 0 71 1 0 1 1 0 8 0 kqueuepl 144 135 0 132 1 0 1 1 0 8 0 pipelkpl 16 124 0 114 1 0 1 1 0 8 0 pipepl 120 248 0 229 1 0 1 1 0 8 0 fdescpl 432 581 0 566 2 0 2 2 0 8 0 filepl 120 3855 0 3756 4 0 4 4 0 8 0 lockfpl 104 84 0 83 1 0 1 1 0 8 0 lockfspl 48 34 0 33 1 0 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 24 0 14 1 0 1 1 0 8 0 ucredpl 96 381 0 374 1 0 1 1 0 8 0 zombiepl 144 567 0 567 1 0 1 1 0 8 1 processpl 920 597 0 567 4 0 4 4 0 8 0 procpl 624 1120 0 1080 4 0 4 4 0 8 0 sosppl 128 13 0 12 2 1 1 1 0 8 0 sockpl 400 1072 0 1052 5 1 4 4 0 8 2 mcl64k 65536 39 0 38 2 1 1 1 0 8 0 mcl16k 16384 4 0 4 2 1 1 1 0 8 1 mcl12k 12288 9 0 9 2 1 1 1 0 8 1 mcl9k 9216 8 0 7 2 1 1 1 0 8 0 mcl8k 8192 11 0 11 2 1 1 1 0 8 1 mcl4k 4096 41 0 41 1 0 1 1 0 8 1 mcl2k2 2112 2 0 2 1 1 0 1 0 8 0 mcl2k 2048 75550 0 75507 15 8 7 12 0 8 1 mtagpl 80 57 0 11 2 1 1 1 0 8 0 mbufpl 256 122617 0 122428 22 2 20 20 0 8 7 bufpl 280 4305 0 126 299 0 299 299 0 8 0 anonpl 16 64630 0 49067 68 3 65 65 0 107 0 amapchunkpl 152 2873 0 2732 14 7 7 13 0 158 0 amappl16 192 2347 0 1467 46 1 45 45 0 8 0 amappl15 184 203 0 200 1 0 1 1 0 8 0 amappl14 176 27 0 21 1 0 1 1 0 8 0 amappl13 168 34 0 30 1 0 1 1 0 8 0 amappl12 160 118 0 113 2 1 1 1 0 8 0 amappl11 152 255 0 243 1 0 1 1 0 8 0 amappl10 144 10 0 6 1 0 1 1 0 8 0 amappl9 136 408 0 406 1 0 1 1 0 8 0 amappl8 128 400 0 363 2 0 2 2 0 8 0 amappl7 120 114 0 102 1 0 1 1 0 8 0 amappl6 112 25 0 20 1 0 1 1 0 8 0 amappl5 104 674 0 659 1 0 1 1 0 8 0 amappl4 96 456 0 424 1 0 1 1 0 8 0 amappl3 88 119 0 113 1 0 1 1 0 8 0 amappl2 80 3959 0 3886 2 0 2 2 0 8 0 amappl1 72 20215 0 19784 23 13 10 17 0 8 0 amappl 80 1358 0 1309 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 9 0 2 1 0 1 1 0 8 0 uaddrrnd 24 585 0 566 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 585 0 566 1 0 1 1 0 8 0 vmmpekpl 168 7721 0 7692 2 0 2 2 0 8 0 vmmpepl 168 75479 0 73400 126 27 99 115 0 357 8 vmsppl 272 584 0 566 3 1 2 2 0 8 0 pdppl 4096 1176 0 1136 7 1 6 6 0 8 0 pvpl 32 207341 0 188550 162 3 159 159 0 265 3 pmappl 200 584 0 566 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 259 0 18 7 0 7 7 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(ffff800000aff800,ffff80001f7eb5c0,ffff80001f7eb518,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805c6b3300,fffffd805da69c88,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da69c88,9,fffffd805c6b3300,0,0,ffff80001d6c14f8) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da69c88,0,ffff80001f7eb7b0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c14f8,3,ffff80001f7eb890,0,ffff80001f7eb970) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c14f8,ffff80001f7eb928,ffff80001f7eb970) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7eb9f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcdd7fb32d70, 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(ffff800000aff800,ffff80001f7eb5c0,ffff80001f7eb518,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805c6b3300,fffffd805da69c88,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da69c88,9,fffffd805c6b3300,0,0,ffff80001d6c14f8) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da69c88,0,ffff80001f7eb7b0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c14f8,3,ffff80001f7eb890,0,ffff80001f7eb970) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c14f8,ffff80001f7eb928,ffff80001f7eb970) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001f7eb9f0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xcdd7fb32d70, count: -11