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 *346389 62318 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823bfed5) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242b9af,ffffffff823d7cde,3ab,ffffffff82398c33) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b14c00,ffff80001d7721a0,ffff80001d7720f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8065c29600,fffffd806b674640,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b674640,9,fffffd8065c29600,0,0,ffff80001d6c2128) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b674640,0,ffff80001d772390,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c2128,5,ffff80001d772470,0,ffff80001d772550) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c2128,ffff80001d772508,ffff80001d772550) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d7725d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8c76fc54380, 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(ffffffff823bfed5) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242b9af,ffffffff823d7cde,3ab,ffffffff82398c33) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b14c00,ffff80001d7721a0,ffff80001d7720f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8065c29600,fffffd806b674640,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b674640,9,fffffd8065c29600,0,0,ffff80001d6c2128) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b674640,0,ffff80001d772390,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c2128,5,ffff80001d772470,0,ffff80001d772550) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c2128,ffff80001d772508,ffff80001d772550) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d7725d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8c76fc54380, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d771f70 rbx 0xffff80001d772020 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81102faf kprintf+0x15f r9 0x1 r10 0x2 r11 0xc16454032cde2295 r12 0x3000000008 r13 0xffff80001d771f80 r14 0x100 r15 0x1 rip 0xffffffff81cde048 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d771f60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=346389 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=70, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6c1eb8,0xffffffff8281a880 process=0xffff8000ffffae70 user=0xffff80001d76d000, vmspace=0xfffffd805777e008 estcpu=20, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 62318 395127 23317 0 2 0 syz-executor.0 *62318 346389 23317 0 7 0x4000000 syz-executor.0 23317 315585 325 0 3 0x82 nanosleep syz-executor.0 23090 408026 325 0 2 0x2 syz-executor.1 47070 188363 0 0 3 0x14200 bored sosplice 325 353440 22156 0 3 0x82 thrsleep syz-fuzzer 325 490445 22156 0 3 0x4000082 nanosleep syz-fuzzer 325 214338 22156 0 3 0x4000082 thrsleep syz-fuzzer 325 433639 22156 0 3 0x4000082 thrsleep syz-fuzzer 325 416628 22156 0 3 0x4000082 thrsleep syz-fuzzer 325 21197 22156 0 3 0x4000082 kqread syz-fuzzer 325 448716 22156 0 3 0x4000082 thrsleep syz-fuzzer 325 295446 22156 0 3 0x4000082 thrsleep syz-fuzzer 22156 58049 54004 0 3 0x10008a pause ksh 54004 113150 61471 0 3 0x92 select sshd 90332 394041 1 0 3 0x100083 ttyin getty 61471 281131 1 0 3 0x80 select sshd 88356 185635 93201 73 3 0x100090 kqread syslogd 93201 363091 1 0 3 0x100082 netio syslogd 93852 430595 1 77 3 0x100090 poll dhclient 62781 457022 1 0 3 0x80 poll dhclient 61478 76934 0 0 3 0x14200 bored smr 11669 296700 0 0 2 0x14200 zerothread 32208 294381 0 0 3 0x14200 aiodoned aiodoned 74548 409962 0 0 3 0x14200 syncer update 47922 296138 0 0 3 0x14200 cleaner cleaner 93115 377783 0 0 3 0x14200 reaper reaper 37499 432188 0 0 3 0x14200 pgdaemon pagedaemon 76987 499868 0 0 3 0x14200 bored crynlk 34162 147962 0 0 3 0x14200 bored crypto 34991 58091 0 0 3 0x40014200 acpi0 acpi0 6473 388840 0 0 3 0x14200 bored softnet 87222 6124 0 0 3 0x14200 bored systqmp 32495 100213 0 0 3 0x14200 bored systq 2880 505 0 0 3 0x40014200 bored softclock 84467 142443 0 0 3 0x40014200 idle0 1 230715 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 9507 6353K 6712K 78643K 11160 0 pcb 13 8K 8K 78643K 87 0 rtable 123 6K 9K 78643K 515 0 ifaddr 70 13K 15K 78643K 159 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 28 0 ioctlops 0 0K 4K 78643K 97 0 iov 0 0K 16K 78643K 38 0 mount 1 1K 1K 78643K 1 0 vnodes 1225 77K 77K 78643K 1445 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 64 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 390 0 sigio 0 0K 0K 78643K 9 0 proc 50 38K 63K 78643K 480 0 subproc 32 2K 2K 78643K 68 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 51 3K 3K 78643K 128 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 240 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 140 88K 97K 78643K 1779 0 UVM aobj 8 2K 2K 78643K 8 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 64 0 NDP 12 0K 0K 78643K 29 0 temp 110 3859K 3923K 78643K 8738 0 kqueue 3 4K 16K 78643K 24 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 5 1 0 1 1 0 8 0 rtpcb 80 42 0 39 1 0 1 1 0 8 0 rtentry 112 80 0 35 2 0 2 2 0 8 0 unpcb 120 155 0 145 1 0 1 1 0 8 0 syncache 264 6 0 6 2 1 1 1 0 8 1 tcpqe 32 46 0 46 1 1 0 1 0 8 0 tcpcb 544 128 0 124 1 0 1 1 0 8 0 inpcb 280 1214 0 1206 2 0 2 2 0 8 1 nd6 48 17 0 11 1 0 1 1 0 8 0 ppxss 1128 2 0 2 2 2 0 1 0 8 0 pfrktable 1344 74 0 70 2 1 1 2 0 8 0 pftag 88 14 0 14 2 1 1 1 0 8 1 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 112 2 0 0 1 0 1 1 0 8 0 pfstate 328 1 0 0 1 0 1 1 0 8 0 pfrule 1360 33 0 10 3 0 3 3 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 370 0 172 15 2 13 14 0 8 0 art_table 32 372 0 172 2 0 2 2 0 8 0 art_node 16 79 0 38 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 7 1 0 1 1 0 8 0 semapl 112 62 0 52 1 0 1 1 0 8 0 shmpl 112 6 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1886 0 492 88 0 88 88 0 8 0 ffsino 240 1886 0 492 83 0 83 83 0 8 0 nchpl 144 2598 0 1022 60 0 60 60 0 8 0 uvmvnodes 72 2104 0 0 39 0 39 39 0 8 0 vnodes 208 2104 0 0 111 0 111 111 0 8 0 namei 1024 7148 0 7148 1 0 1 1 0 8 1 vcpupl 1984 8 0 0 1 0 1 1 0 8 0 vmpool 528 9 0 1 1 0 1 1 0 8 0 pfiaddrpl 120 26 0 20 1 0 1 1 0 8 0 scxspl 192 7441 0 7441 1 0 1 1 0 8 1 plimitpl 152 46 0 39 1 0 1 1 0 8 0 sigapl 424 571 0 542 4 0 4 4 0 8 0 futexpl 56 7749 0 7749 1 0 1 1 0 8 1 knotepl 112 109 0 90 1 0 1 1 0 8 0 kqueuepl 144 64 0 61 1 0 1 1 0 8 0 pipelkpl 16 126 0 116 1 0 1 1 0 8 0 pipepl 120 252 0 233 1 0 1 1 0 8 0 fdescpl 432 556 0 542 2 0 2 2 0 8 0 filepl 120 3843 0 3744 4 0 4 4 0 8 1 lockfpl 104 79 0 78 1 0 1 1 0 8 0 lockfspl 48 29 0 28 1 0 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 23 0 13 1 0 1 1 0 8 0 ucredpl 96 337 0 330 1 0 1 1 0 8 0 zombiepl 144 542 0 542 1 0 1 1 0 8 1 processpl 920 571 0 542 4 0 4 4 0 8 0 procpl 624 966 0 929 4 0 4 4 0 8 0 sosppl 128 6 0 6 1 0 1 1 0 8 1 sockpl 400 1421 0 1399 4 0 4 4 0 8 1 mcl64k 65536 14 0 14 1 1 0 1 0 8 0 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 12 0 12 2 1 1 1 0 8 1 mcl9k 9216 4 0 4 1 0 1 1 0 8 1 mcl8k 8192 6 0 6 2 1 1 1 0 8 1 mcl4k 4096 37 0 37 2 1 1 1 0 8 1 mcl2k 2048 73647 0 73599 17 10 7 13 0 8 0 mtagpl 80 40 0 23 2 1 1 1 0 8 0 mbufpl 256 118888 0 118746 16 5 11 13 0 8 0 bufpl 280 3946 0 130 273 0 273 273 0 8 0 anonpl 16 71622 0 56643 79 5 74 77 0 107 10 amapchunkpl 152 3086 0 2956 21 8 13 19 0 158 7 amappl16 192 2681 0 1811 56 7 49 56 0 8 5 amappl15 184 9 0 8 1 0 1 1 0 8 0 amappl14 176 27 0 19 1 0 1 1 0 8 0 amappl13 168 93 0 87 1 0 1 1 0 8 0 amappl12 160 8 0 8 2 2 0 1 0 8 0 amappl11 152 53 0 44 1 0 1 1 0 8 0 amappl10 144 187 0 180 1 0 1 1 0 8 0 amappl9 136 500 0 499 1 0 1 1 0 8 0 amappl8 128 508 0 464 2 0 2 2 0 8 0 amappl7 120 280 0 267 1 0 1 1 0 8 0 amappl6 112 36 0 24 1 0 1 1 0 8 0 amappl5 104 478 0 468 1 0 1 1 0 8 0 amappl4 96 482 0 454 1 0 1 1 0 8 0 amappl3 88 119 0 114 1 0 1 1 0 8 0 amappl2 80 3487 0 3419 2 0 2 2 0 8 0 amappl1 72 19714 0 19305 23 14 9 17 0 8 0 amappl 80 1231 0 1187 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 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 565 0 543 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 565 0 543 1 0 1 1 0 8 0 vmmpekpl 168 7346 0 7315 2 0 2 2 0 8 0 vmmpepl 168 73601 0 71632 149 25 124 143 0 357 35 vmsppl 272 564 0 543 2 0 2 2 0 8 0 pdppl 4096 1136 0 1094 7 1 6 6 0 8 0 pvpl 32 209297 0 191337 182 3 179 182 0 265 27 pmappl 200 564 0 543 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 254 0 23 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(ffffffff823bfed5) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242b9af,ffffffff823d7cde,3ab,ffffffff82398c33) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b14c00,ffff80001d7721a0,ffff80001d7720f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8065c29600,fffffd806b674640,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b674640,9,fffffd8065c29600,0,0,ffff80001d6c2128) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b674640,0,ffff80001d772390,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c2128,5,ffff80001d772470,0,ffff80001d772550) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c2128,ffff80001d772508,ffff80001d772550) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d7725d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8c76fc54380, 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(ffffffff823bfed5) at panic+0x15c sys/kern/subr_prf.c:207 __assert(ffffffff8242b9af,ffffffff823d7cde,3ab,ffffffff82398c33) at __assert+0x2b sys/kern/subr_prf.c:154 rtm_output(ffff800000b14c00,ffff80001d7721a0,ffff80001d7720f8,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd8065c29600,fffffd806b674640,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b674640,9,fffffd8065c29600,0,0,ffff80001d6c2128) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b674640,0,ffff80001d772390,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6c2128,5,ffff80001d772470,0,ffff80001d772550) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6c2128,ffff80001d772508,ffff80001d772550) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d7725d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8c76fc54380, count: -11