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 *232708 23647 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(ffff800000b2cd00,ffff800020865810,ffff800020865768,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80599f3000,fffffd8057a16ca8,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8057a16ca8,9,fffffd80599f3000,0,0,ffff80001d6f3290) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8057a16ca8,0,ffff800020865a00,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3290,3,ffff800020865ae0,0,ffff800020865bc0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3290,ffff800020865b78,ffff800020865bc0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff800020865c40) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbbd47b05480, 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(ffff800000b2cd00,ffff800020865810,ffff800020865768,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80599f3000,fffffd8057a16ca8,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8057a16ca8,9,fffffd80599f3000,0,0,ffff80001d6f3290) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8057a16ca8,0,ffff800020865a00,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3290,3,ffff800020865ae0,0,ffff800020865bc0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3290,ffff800020865b78,ffff800020865bc0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff800020865c40) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbbd47b05480, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000208655e0 rbx 0xffff800020865690 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8155d16f kprintf+0x15f r9 0x1 r10 0x2 r11 0x7894809eef0a1dd5 r12 0x3000000008 r13 0xffff8000208655f0 r14 0x100 r15 0x1 rip 0xffffffff81ac0cb8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000208655d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=232708 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6f3770,0xffffffff827f7a58 process=0xffff800020836e90 user=0xffff800020860000, vmspace=0xfffffd8053c32780 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 23647 78926 48318 0 2 0 syz-executor.0 *23647 232708 48318 0 7 0x4000000 syz-executor.0 16706 48222 67483 0 2 0 syz-executor.1 16706 362945 67483 0 2 0x4000000 syz-executor.1 86724 12440 0 0 3 0x14200 acct acct 48318 45580 91554 0 2 0x482 syz-executor.0 47636 385862 0 0 3 0x14280 nfsidl nfsio 1754 91338 0 0 3 0x14280 nfsidl nfsio 60456 72855 0 0 3 0x14280 nfsidl nfsio 90353 485719 0 0 3 0x14280 nfsidl nfsio 94860 309568 0 0 3 0x14280 nfsidl nfsio 16863 24055 0 0 3 0x14280 nfsidl nfsio 15645 149395 0 0 3 0x14280 nfsidl nfsio 70447 473230 0 0 3 0x14280 nfsidl nfsio 18405 421513 0 0 3 0x14280 nfsidl nfsio 93063 406782 0 0 3 0x14280 nfsidl nfsio 21358 118627 0 0 3 0x14280 nfsidl nfsio 30042 168848 0 0 3 0x14280 nfsidl nfsio 73574 166570 0 0 3 0x14280 nfsidl nfsio 80688 329749 0 0 3 0x14280 nfsidl nfsio 78996 206304 0 0 3 0x14280 nfsidl nfsio 19305 133548 0 0 3 0x14280 nfsidl nfsio 76233 325083 0 0 3 0x14280 nfsidl nfsio 83626 126858 0 0 3 0x14280 nfsidl nfsio 97794 221204 0 0 3 0x14280 nfsidl nfsio 77365 126287 0 0 3 0x14280 nfsidl nfsio 74797 53640 0 0 3 0x14200 bored sosplice 67483 89757 91554 0 2 0x482 syz-executor.1 91554 100147 67961 0 3 0x82 thrsleep syz-fuzzer 91554 106259 67961 0 3 0x4000082 thrsleep syz-fuzzer 91554 7044 67961 0 3 0x4000082 thrsleep syz-fuzzer 91554 246569 67961 0 3 0x4000082 thrsleep syz-fuzzer 91554 139153 67961 0 3 0x4000082 thrsleep syz-fuzzer 91554 340294 67961 0 3 0x4000082 thrsleep syz-fuzzer 91554 29781 67961 0 3 0x4000082 thrsleep syz-fuzzer 91554 448328 67961 0 3 0x4000082 kqread syz-fuzzer 67961 76915 10645 0 3 0x10008a pause ksh 10645 161608 50433 0 3 0x92 select sshd 37896 92857 1 0 3 0x100083 ttyin getty 50433 164366 1 0 3 0x80 select sshd 13231 490619 8253 73 3 0x100090 kqread syslogd 8253 168011 1 0 3 0x100082 netio syslogd 20501 308375 1 77 3 0x100090 poll dhclient 3998 347344 1 0 3 0x80 poll dhclient 37339 239533 0 0 3 0x14200 bored smr 34696 397924 0 0 2 0x14200 zerothread 38206 59612 0 0 3 0x14200 aiodoned aiodoned 62238 266689 0 0 3 0x14200 syncer update 95705 58737 0 0 3 0x14200 cleaner cleaner 52936 393278 0 0 3 0x14200 reaper reaper 29246 404082 0 0 3 0x14200 pgdaemon pagedaemon 24552 97406 0 0 3 0x14200 bored crynlk 84528 150553 0 0 3 0x14200 bored crypto 70296 485384 0 0 3 0x40014200 acpi0 acpi0 44517 156170 0 0 3 0x14200 bored softnet 85465 341032 0 0 3 0x14200 bored systqmp 98608 413689 0 0 3 0x14200 bored systq 21864 506767 0 0 3 0x40014200 bored softclock 76349 247444 0 0 3 0x40014200 idle0 1 429148 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 9505 6360K 7115K 78643K 11609 0 pcb 13 8K 8K 78643K 137 0 rtable 137 20K 24K 78643K 545 0 ifaddr 104 22K 22K 78643K 216 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 36 0 ioctlops 0 0K 4K 78643K 130 0 iov 0 0K 32K 78643K 109 0 mount 1 1K 1K 78643K 1 0 vnodes 1220 77K 77K 78643K 1566 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 9 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 46 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 686 0 sigio 0 0K 0K 78643K 8 0 proc 51 38K 63K 78643K 449 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 46 0 in_multi 137 5K 6K 78643K 197 0 ether_multi 1 0K 0K 78643K 16 0 mrt 1 0K 0K 78643K 8 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 276 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 155 105K 105K 78643K 2466 0 UVM aobj 22 2K 3K 78643K 29 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 116 0 NDP 12 0K 0K 78643K 33 0 temp 111 3857K 3929K 78643K 32413 0 kqueue 4 6K 12K 78643K 44 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 66 0 63 1 0 1 1 0 8 0 rtentry 112 62 0 24 2 0 2 2 0 8 0 unpcb 120 491 0 483 1 0 1 1 0 8 0 syncache 264 14 0 14 4 4 0 1 0 8 0 tcpqe 32 103 0 103 3 3 0 1 0 8 0 tcpcb 544 229 0 222 1 0 1 1 0 8 0 ipq 40 70 0 70 3 3 0 1 0 8 0 ipqe 40 141 0 141 3 3 0 1 0 8 0 inpcb 280 1621 0 1610 4 2 2 2 0 8 0 rttmr 72 3 0 3 3 3 0 1 0 8 0 nd6 48 9 0 3 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 pfrke_plain 160 2 0 0 1 0 1 1 0 8 0 pfrktable 1344 78 0 60 4 2 2 3 0 8 0 pftag 88 11 0 8 1 0 1 1 0 8 0 pfqueue 264 2 0 2 1 1 0 1 0 8 0 pfrule 1360 48 0 13 3 0 3 3 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 273 0 85 13 1 12 13 0 8 0 art_table 32 275 0 85 2 0 2 2 0 8 0 art_node 16 61 0 29 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 16 5 5 0 1 0 8 0 semupl 112 3 0 3 2 2 0 1 0 8 0 semapl 112 44 0 34 1 0 1 1 0 8 0 shmpl 112 27 0 7 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2358 0 958 88 0 88 88 0 8 0 ffsino 240 2358 0 958 83 0 83 83 0 8 0 nchpl 144 3544 0 1959 60 0 60 60 0 8 0 rtmask 32 4 0 2 1 0 1 1 0 8 0 uvmvnodes 72 2633 0 0 48 0 48 48 0 8 0 vnodes 208 2633 0 0 139 0 139 139 0 8 0 namei 1024 9700 0 9700 3 2 1 1 0 8 1 vcpupl 1984 9 0 0 2 0 2 2 0 8 0 vmpool 528 11 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 32 0 14 1 0 1 1 0 8 0 scxspl 192 10523 0 10523 2 1 1 1 0 8 1 plimitpl 152 73 0 66 1 0 1 1 0 8 0 sigapl 424 891 0 840 6 0 6 6 0 8 0 futexpl 56 14839 0 14839 3 2 1 1 0 8 1 knotepl 112 124 0 104 1 0 1 1 0 8 0 kqueuepl 144 95 0 92 1 0 1 1 0 8 0 pipelkpl 16 166 0 156 1 0 1 1 0 8 0 pipepl 120 332 0 313 1 0 1 1 0 8 0 fdescpl 432 855 0 840 2 0 2 2 0 8 0 filepl 120 5831 0 5732 4 0 4 4 0 8 0 lockfpl 104 145 0 143 1 0 1 1 0 8 0 lockfspl 48 54 0 52 1 0 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 550 0 543 1 0 1 1 0 8 0 zombiepl 144 840 0 840 2 1 1 1 0 8 1 processpl 920 891 0 840 7 0 7 7 0 8 0 procpl 624 1695 0 1635 5 0 5 5 0 8 0 sosppl 128 9 0 9 3 3 0 1 0 8 0 sockpl 400 2184 0 2163 7 3 4 4 0 8 1 mcl64k 65536 337 0 337 36 35 1 33 0 8 1 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl12k 12288 12 0 12 4 4 0 1 0 8 0 mcl9k 9216 9 0 9 4 4 0 1 0 8 0 mcl8k 8192 15 0 15 4 4 0 1 0 8 0 mcl4k 4096 72 0 72 3 2 1 1 0 8 1 mcl2k2 2112 8 0 8 4 4 0 1 0 8 0 mcl2k 2048 76166 0 76126 12 6 6 11 0 8 0 mtagpl 80 75 0 26 3 1 2 2 0 8 0 mbufpl 256 134587 0 134427 212 200 12 193 0 8 0 bufpl 280 4756 0 130 331 0 331 331 0 8 0 anonpl 16 100364 0 84504 95 30 65 80 0 107 0 amapchunkpl 152 4325 0 4184 30 24 6 20 0 158 0 amappl16 192 4819 0 3943 76 30 46 58 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 348 0 341 1 0 1 1 0 8 0 amappl13 168 41 0 37 1 0 1 1 0 8 0 amappl12 160 5 0 2 1 0 1 1 0 8 0 amappl11 152 52 0 41 1 0 1 1 0 8 0 amappl10 144 328 0 323 1 0 1 1 0 8 0 amappl9 136 386 0 384 1 0 1 1 0 8 0 amappl8 128 376 0 327 2 0 2 2 0 8 0 amappl7 120 425 0 411 1 0 1 1 0 8 0 amappl6 112 32 0 22 1 0 1 1 0 8 0 amappl5 104 801 0 788 1 0 1 1 0 8 0 amappl4 96 439 0 413 1 0 1 1 0 8 0 amappl3 88 439 0 433 1 0 1 1 0 8 0 amappl2 80 5965 0 5893 2 0 2 2 0 8 0 amappl1 72 24323 0 23899 23 14 9 17 0 8 0 amappl 80 1924 0 1875 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 28 0 7 1 0 1 1 0 8 0 uaddrrnd 24 866 0 842 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 866 0 842 1 0 1 1 0 8 0 vmmpekpl 168 9278 0 9241 2 0 2 2 0 8 0 vmmpepl 168 107395 0 105302 156 63 93 132 0 357 0 vmsppl 272 865 0 842 3 1 2 2 0 8 0 pdppl 4096 1738 0 1693 8 2 6 6 0 8 0 pvpl 32 279402 0 260375 223 65 158 193 0 265 2 pmappl 200 865 0 842 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 489 0 259 12 4 8 12 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(ffff800000b2cd00,ffff800020865810,ffff800020865768,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80599f3000,fffffd8057a16ca8,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8057a16ca8,9,fffffd80599f3000,0,0,ffff80001d6f3290) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8057a16ca8,0,ffff800020865a00,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3290,3,ffff800020865ae0,0,ffff800020865bc0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3290,ffff800020865b78,ffff800020865bc0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff800020865c40) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbbd47b05480, 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(ffff800000b2cd00,ffff800020865810,ffff800020865768,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80599f3000,fffffd8057a16ca8,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8057a16ca8,9,fffffd80599f3000,0,0,ffff80001d6f3290) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8057a16ca8,0,ffff800020865a00,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3290,3,ffff800020865ae0,0,ffff800020865bc0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3290,ffff800020865b78,ffff800020865bc0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff800020865c40) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbbd47b05480, count: -11