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 *232859 7098 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(ffff800000b21b00,ffff80001e19e7c0,ffff80001e19e718,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805c5dd700,fffffd806b6c2640,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b6c2640,9,fffffd805c5dd700,0,0,ffff80001d6aa118) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b6c2640,0,ffff80001e19e9b0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6aa118,3,ffff80001e19ea90,0,ffff80001e19eb70) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6aa118,ffff80001e19eb28,ffff80001e19eb70) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e19ebf0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfac846fb20, 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(ffff800000b21b00,ffff80001e19e7c0,ffff80001e19e718,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805c5dd700,fffffd806b6c2640,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b6c2640,9,fffffd805c5dd700,0,0,ffff80001d6aa118) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b6c2640,0,ffff80001e19e9b0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6aa118,3,ffff80001e19ea90,0,ffff80001e19eb70) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6aa118,ffff80001e19eb28,ffff80001e19eb70) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e19ebf0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfac846fb20, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e19e590 rbx 0xffff80001e19e640 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8155d16f kprintf+0x15f r9 0x1 r10 0x2 r11 0xcee5c76a55cd4f46 r12 0x3000000008 r13 0xffff80001e19e5a0 r14 0x100 r15 0x1 rip 0xffffffff81ac0cb8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e19e580 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=232859 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff80001d717c40,0xffffffff827f7a58 process=0xffff8000ffffb938 user=0xffff80001e199000, vmspace=0xfffffd806aa1d448 estcpu=9, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 7098 129486 51269 0 2 0 syz-executor.0 * 7098 232859 51269 0 7 0x4000000 syz-executor.0 51269 456775 92213 0 2 0x482 syz-executor.0 53919 330030 1 0 3 0x100083 ttyin getty 47109 312215 0 0 3 0x14200 acct acct 15715 274710 0 0 3 0x14200 bored sosplice 95049 69333 92213 0 3 0x82 piperd syz-executor.1 92213 498886 4348 0 3 0x82 thrsleep syz-fuzzer 92213 204054 4348 0 3 0x4000082 nanosleep syz-fuzzer 92213 242206 4348 0 2 0x4000002 syz-fuzzer 92213 74733 4348 0 3 0x4000082 thrsleep syz-fuzzer 92213 211142 4348 0 3 0x4000082 thrsleep syz-fuzzer 92213 264320 4348 0 3 0x4000082 thrsleep syz-fuzzer 92213 445283 4348 0 3 0x4000082 thrsleep syz-fuzzer 4348 272632 51327 0 3 0x10008a pause ksh 51327 289180 10566 0 3 0x92 select sshd 10566 386672 1 0 3 0x80 select sshd 26818 99392 44222 73 3 0x100090 kqread syslogd 44222 135248 1 0 3 0x100082 netio syslogd 77306 491552 1 77 3 0x100090 poll dhclient 83292 105314 1 0 3 0x80 poll dhclient 97724 399723 0 0 3 0x14200 bored smr 2406 419894 0 0 2 0x14200 zerothread 60257 346480 0 0 3 0x14200 aiodoned aiodoned 50576 64398 0 0 3 0x14200 syncer update 66515 314735 0 0 3 0x14200 cleaner cleaner 39326 431559 0 0 3 0x14200 reaper reaper 48976 331512 0 0 3 0x14200 pgdaemon pagedaemon 48427 218027 0 0 3 0x14200 bored crynlk 10768 278086 0 0 3 0x14200 bored crypto 15576 86025 0 0 3 0x40014200 acpi0 acpi0 54016 28396 0 0 3 0x14200 bored softnet 77424 479686 0 0 3 0x14200 bored systqmp 76597 277107 0 0 3 0x14200 bored systq 76731 344693 0 0 3 0x40014200 bored softclock 84490 219795 0 0 3 0x40014200 idle0 1 237681 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 9513 6364K 6984K 78643K 11807 0 pcb 13 8K 8K 78643K 145 0 rtable 105 5K 7K 78643K 710 0 ifaddr 78 15K 16K 78643K 257 0 counters 21 16K 16K 78643K 36 0 ioctlops 0 0K 4K 78643K 102 0 iov 0 0K 12K 78643K 64 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 1620 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 116 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 634 0 sigio 0 0K 0K 78643K 10 0 proc 52 38K 55K 78643K 571 0 subproc 32 2K 2K 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 46 0 in_multi 57 3K 3K 78643K 162 0 ether_multi 1 0K 0K 78643K 20 0 mrt 0 0K 0K 78643K 14 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 280 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 146 104K 105K 78643K 2399 0 UVM aobj 22 2K 2K 78643K 26 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 108 0 NDP 13 0K 0K 78643K 41 0 temp 127 3854K 3918K 78643K 10778 0 kqueue 4 6K 10K 78643K 32 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 14 0 7 1 0 1 1 0 8 0 rtpcb 80 50 0 47 1 0 1 1 0 8 0 rtentry 112 109 0 70 2 0 2 2 0 8 0 unpcb 120 609 0 601 1 0 1 1 0 8 0 syncache 264 14 0 14 5 5 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 605 0 605 2 2 0 1 0 8 0 tcpcb 544 253 0 249 1 0 1 1 0 8 0 ipq 40 5 0 5 2 2 0 1 0 8 0 ipqe 40 139 0 139 2 2 0 1 0 8 0 inpcb 280 760 0 753 4 3 1 2 0 8 0 rttmr 72 5 0 5 4 4 0 1 0 8 0 nd6 48 18 0 12 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 2 0 1 0 8 0 ppxss 1128 2 0 2 1 1 0 1 0 8 0 pfstscr 40 4 0 2 1 0 1 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 104 1 0 1 1 0 8 0 pftag 88 18 0 18 3 3 0 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 112 4 0 2 1 0 1 1 0 8 0 pfstate 328 2 0 1 1 0 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 598 0 405 16 3 13 13 0 8 0 art_table 32 600 0 405 2 0 2 2 0 8 0 art_node 16 108 0 76 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 6 3 2 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 112 0 102 1 0 1 1 0 8 0 shmpl 112 24 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2207 0 809 88 0 88 88 0 8 0 ffsino 240 2207 0 809 83 0 83 83 0 8 0 nchpl 144 3255 0 1673 60 0 60 60 0 8 0 uvmvnodes 72 2560 0 0 47 0 47 47 0 8 0 vnodes 208 2560 0 0 135 0 135 135 0 8 0 namei 1024 9619 0 9619 6 5 1 1 0 8 1 vcpupl 1984 10 0 0 2 0 2 2 0 8 0 vmpool 528 12 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 30 0 28 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 9514 0 9514 13 12 1 1 0 8 1 plimitpl 152 74 0 67 1 0 1 1 0 8 0 sigapl 424 815 0 785 4 0 4 4 0 8 0 futexpl 56 13844 0 13844 5 4 1 1 0 8 1 knotepl 112 148 0 129 1 0 1 1 0 8 0 kqueuepl 144 98 0 95 1 0 1 1 0 8 0 pipelkpl 16 146 0 136 1 0 1 1 0 8 0 pipepl 120 292 0 273 1 0 1 1 0 8 0 fdescpl 432 799 0 785 2 0 2 2 0 8 0 filepl 120 5254 0 5158 4 0 4 4 0 8 0 lockfpl 104 97 0 96 1 0 1 1 0 8 0 lockfspl 48 42 0 41 1 0 1 1 0 8 0 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 525 0 518 1 0 1 1 0 8 0 zombiepl 144 785 0 785 5 4 1 1 0 8 1 processpl 920 815 0 785 4 0 4 4 0 8 0 procpl 624 1499 0 1462 10 7 3 4 0 8 0 sosppl 128 17 0 17 5 5 0 1 0 8 0 sockpl 400 1426 0 1408 10 7 3 4 0 8 1 mcl64k 65536 354 0 352 33 32 1 33 0 8 0 mcl16k 16384 22 0 22 8 8 0 1 0 8 0 mcl12k 12288 143 0 143 6 5 1 1 0 8 1 mcl9k 9216 10 0 10 5 5 0 1 0 8 0 mcl8k 8192 52 0 52 9 9 0 1 0 8 0 mcl4k 4096 83 0 83 8 8 0 1 0 8 0 mcl2k2 2112 2 0 2 2 2 0 1 0 8 0 mcl2k 2048 77846 0 77788 25 17 8 18 0 8 0 mtagpl 80 140 0 128 3 2 1 2 0 8 0 mbufpl 256 132416 0 132079 68 42 26 38 0 8 0 bufpl 280 4480 0 126 311 0 311 311 0 8 0 anonpl 16 101208 0 85518 97 30 67 81 0 107 0 amapchunkpl 152 3437 0 3294 8 1 7 8 0 158 0 amappl16 192 4025 0 3078 71 23 48 57 0 8 0 amappl15 184 156 0 153 1 0 1 1 0 8 0 amappl14 176 23 0 18 1 0 1 1 0 8 0 amappl13 168 221 0 216 1 0 1 1 0 8 0 amappl12 160 21 0 15 1 0 1 1 0 8 0 amappl11 152 309 0 297 1 0 1 1 0 8 0 amappl10 144 244 0 240 1 0 1 1 0 8 0 amappl9 136 370 0 369 1 0 1 1 0 8 0 amappl8 128 403 0 356 2 0 2 2 0 8 0 amappl7 120 354 0 342 1 0 1 1 0 8 0 amappl6 112 201 0 187 1 0 1 1 0 8 0 amappl5 104 626 0 616 1 0 1 1 0 8 0 amappl4 96 651 0 618 1 0 1 1 0 8 0 amappl3 88 339 0 333 1 0 1 1 0 8 0 amappl2 80 5479 0 5415 2 0 2 2 0 8 0 amappl1 72 23775 0 23366 24 15 9 17 0 8 0 amappl 80 1800 0 1755 1 0 1 1 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 25 0 4 1 0 1 1 0 8 0 uaddrrnd 24 811 0 787 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 811 0 787 1 0 1 1 0 8 0 vmmpekpl 168 8557 0 8525 2 0 2 2 0 8 0 vmmpepl 168 102860 0 100806 273 178 95 142 0 357 5 vmsppl 272 810 0 787 2 0 2 2 0 8 0 pdppl 4096 1628 0 1584 8 2 6 6 0 8 0 pvpl 32 274588 0 256089 211 54 157 190 0 265 0 pmappl 200 810 0 787 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 383 0 142 9 1 8 9 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(ffff800000b21b00,ffff80001e19e7c0,ffff80001e19e718,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805c5dd700,fffffd806b6c2640,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b6c2640,9,fffffd805c5dd700,0,0,ffff80001d6aa118) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b6c2640,0,ffff80001e19e9b0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6aa118,3,ffff80001e19ea90,0,ffff80001e19eb70) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6aa118,ffff80001e19eb28,ffff80001e19eb70) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e19ebf0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfac846fb20, 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(ffff800000b21b00,ffff80001e19e7c0,ffff80001e19e718,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805c5dd700,fffffd806b6c2640,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd806b6c2640,9,fffffd805c5dd700,0,0,ffff80001d6aa118) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd806b6c2640,0,ffff80001e19e9b0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6aa118,3,ffff80001e19ea90,0,ffff80001e19eb70) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6aa118,ffff80001e19eb28,ffff80001e19eb70) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e19ebf0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfac846fb20, count: -11