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 *417848 94532 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(ffff800000b08b00,ffff80001d7889e0,ffff80001d788938,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805e46c100,fffffd805da66e18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da66e18,9,fffffd805e46c100,0,0,ffff80001d6f4130) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da66e18,0,ffff80001d788bd0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f4130,5,ffff80001d788cb0,0,ffff80001d788d90) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f4130,ffff80001d788d48,ffff80001d788d90) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d788e10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x16d87d13e20, 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(ffff800000b08b00,ffff80001d7889e0,ffff80001d788938,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805e46c100,fffffd805da66e18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da66e18,9,fffffd805e46c100,0,0,ffff80001d6f4130) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da66e18,0,ffff80001d788bd0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f4130,5,ffff80001d788cb0,0,ffff80001d788d90) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f4130,ffff80001d788d48,ffff80001d788d90) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d788e10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x16d87d13e20, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d7887b0 rbx 0xffff80001d788860 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8120980f kprintf+0x15f r9 0x1 r10 0x2 r11 0xca86501f9059d80b r12 0x3000000008 r13 0xffff80001d7887c0 r14 0x100 r15 0x1 rip 0xffffffff81fbc738 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d7887a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=417848 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6f3c50,0xffffffff8283fb58 process=0xffff80001e824af8 user=0xffff80001d783000, vmspace=0xfffffd8059869bb0 estcpu=31, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 94532 436537 40836 0 2 0 syz-executor.0 *94532 417848 40836 0 7 0x4000000 syz-executor.0 73817 359972 0 0 3 0x14200 acct acct 40836 134697 23903 0 3 0x82 nanosleep syz-executor.0 85013 367286 0 0 3 0x14280 nfsidl nfsio 70712 345014 0 0 3 0x14280 nfsidl nfsio 27596 3837 0 0 3 0x14280 nfsidl nfsio 52758 140327 0 0 3 0x14280 nfsidl nfsio 99190 51455 0 0 3 0x14280 nfsidl nfsio 78106 255231 0 0 3 0x14280 nfsidl nfsio 99921 455708 0 0 3 0x14280 nfsidl nfsio 32465 475538 0 0 3 0x14280 nfsidl nfsio 57319 517842 0 0 3 0x14280 nfsidl nfsio 56305 136428 0 0 3 0x14280 nfsidl nfsio 88761 248854 0 0 3 0x14280 nfsidl nfsio 63357 149084 0 0 3 0x14280 nfsidl nfsio 68212 149050 0 0 3 0x14280 nfsidl nfsio 92613 110972 0 0 3 0x14280 nfsidl nfsio 18175 78647 0 0 3 0x14280 nfsidl nfsio 47974 484571 0 0 3 0x14280 nfsidl nfsio 12691 515665 0 0 3 0x14280 nfsidl nfsio 41036 464821 0 0 3 0x14280 nfsidl nfsio 17015 155928 0 0 3 0x14280 nfsidl nfsio 8242 145148 0 0 3 0x14280 nfsidl nfsio 83017 276816 0 0 3 0x14200 bored sosplice 8160 440753 23903 0 3 0x82 piperd syz-executor.1 23903 168737 72839 0 3 0x82 thrsleep syz-fuzzer 23903 367184 72839 0 2 0x4000482 syz-fuzzer 23903 450097 72839 0 3 0x4000082 thrsleep syz-fuzzer 23903 415844 72839 0 3 0x4000082 thrsleep syz-fuzzer 23903 378165 72839 0 3 0x4000082 thrsleep syz-fuzzer 23903 280928 72839 0 2 0x4000002 syz-fuzzer 23903 132111 72839 0 3 0x4000082 thrsleep syz-fuzzer 72839 111851 91493 0 3 0x10008a pause ksh 91493 241935 87525 0 3 0x92 select sshd 96825 425505 1 0 3 0x100083 ttyin getty 87525 475321 1 0 3 0x80 select sshd 54205 381965 99391 73 3 0x100090 kqread syslogd 99391 29855 1 0 3 0x100082 netio syslogd 69979 209753 1 77 3 0x100090 poll dhclient 84430 469998 1 0 3 0x80 poll dhclient 1088 404386 0 0 3 0x14200 bored smr 57986 306428 0 0 2 0x14200 zerothread 4292 174280 0 0 3 0x14200 aiodoned aiodoned 44614 339295 0 0 3 0x14200 syncer update 11815 295858 0 0 3 0x14200 cleaner cleaner 22227 358202 0 0 3 0x14200 reaper reaper 25010 482481 0 0 3 0x14200 pgdaemon pagedaemon 15719 198484 0 0 3 0x14200 bored crynlk 63126 185404 0 0 3 0x14200 bored crypto 35685 335223 0 0 3 0x40014200 acpi0 acpi0 56592 491542 0 0 3 0x14200 bored softnet 14544 38473 0 0 3 0x14200 bored systqmp 37822 476957 0 0 3 0x14200 bored systq 77326 206146 0 0 2 0x40014200 softclock 84931 352839 0 0 3 0x40014200 idle0 1 175789 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 9523 6352K 6711K 78643K 11313 0 pcb 13 8K 8K 78643K 133 0 rtable 141 19K 19K 78643K 625 0 ifaddr 94 17K 17K 78643K 186 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 31 0 ioctlops 0 0K 4K 78643K 80 0 iov 0 0K 16K 78643K 92 0 mount 1 1K 1K 78643K 1 0 vnodes 1223 77K 77K 78643K 1486 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 8 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 100 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 537 0 proc 52 38K 63K 78643K 541 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 58 3K 3K 78643K 168 0 ether_multi 1 0K 0K 78643K 21 0 mrt 0 0K 0K 78643K 6 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 43 201K 201K 78643K 43 0 exec 0 0K 1K 78643K 277 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 136 72K 72K 78643K 2124 0 UVM aobj 18 7K 7K 78643K 22 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 104 0 NDP 15 0K 0K 78643K 37 0 temp 118 3850K 3914K 78643K 28246 0 kqueue 3 4K 16K 78643K 30 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 13 0 7 1 0 1 1 0 8 0 rtpcb 80 58 0 55 1 0 1 1 0 8 0 rtentry 112 98 0 55 2 0 2 2 0 8 0 unpcb 120 237 0 229 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 10 0 10 1 1 0 1 0 8 0 tcpcb 544 198 0 194 1 0 1 1 0 8 0 ipq 40 2 0 2 1 1 0 1 0 8 0 ipqe 40 8 0 8 1 1 0 1 0 8 0 inpcb 280 573 0 566 3 2 1 2 0 8 0 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 21 0 16 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 pfrktable 1344 78 0 64 5 3 2 2 0 8 0 pftag 88 15 0 10 2 1 1 1 0 8 0 pfrule 1360 23 0 14 3 2 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 424 0 241 17 4 13 14 0 8 0 art_table 32 426 0 241 2 0 2 2 0 8 0 art_node 16 97 0 57 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 8 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 94 0 84 1 0 1 1 0 8 0 shmpl 112 20 0 5 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2239 0 842 88 0 88 88 0 8 0 ffsino 240 2239 0 842 83 0 83 83 0 8 0 nchpl 144 3253 0 1671 60 0 60 60 0 8 0 uvmvnodes 72 2482 0 0 46 0 46 46 0 8 0 vnodes 208 2482 0 0 131 0 131 131 0 8 0 namei 1024 9235 0 9235 6 5 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 528 7 0 3 1 0 1 1 0 8 0 pfiaddrpl 120 37 0 24 3 2 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 10410 0 10410 8 7 1 1 0 8 1 plimitpl 152 61 0 54 1 0 1 1 0 8 0 sigapl 424 736 0 686 6 0 6 6 0 8 0 futexpl 56 11725 0 11725 6 5 1 1 0 8 1 knotepl 112 139 0 120 1 0 1 1 0 8 0 kqueuepl 144 70 0 68 1 0 1 1 0 8 0 pipelkpl 16 149 0 139 1 0 1 1 0 8 0 pipepl 120 298 0 279 1 0 1 1 0 8 0 fdescpl 432 700 0 686 2 0 2 2 0 8 0 filepl 120 4392 0 4295 7 3 4 4 0 8 1 lockfpl 104 112 0 111 1 0 1 1 0 8 0 lockfspl 48 38 0 37 1 0 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 22 0 12 1 0 1 1 0 8 0 ucredpl 96 390 0 383 1 0 1 1 0 8 0 zombiepl 144 686 0 686 4 3 1 1 0 8 1 processpl 920 736 0 686 7 0 7 7 0 8 0 procpl 624 1305 0 1248 5 0 5 5 0 8 0 sosppl 128 11 0 11 4 4 0 1 0 8 0 sockpl 400 869 0 851 8 4 4 4 0 8 2 mcl64k 65536 48 0 48 7 6 1 1 0 8 1 mcl16k 16384 2 0 2 2 2 0 1 0 8 0 mcl12k 12288 13 0 13 6 5 1 1 0 8 1 mcl9k 9216 8 0 8 4 3 1 1 0 8 1 mcl8k 8192 21 0 21 9 8 1 1 0 8 1 mcl4k 4096 55 0 55 7 6 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 76856 0 76815 15 9 6 13 0 8 0 mtagpl 80 47 0 31 2 1 1 1 0 8 0 mbufpl 256 124957 0 124828 22 12 10 15 0 8 0 bufpl 280 4949 0 132 345 0 345 345 0 8 0 anonpl 16 85193 0 69189 78 6 72 73 0 107 0 amapchunkpl 152 3132 0 2997 11 5 6 8 0 158 0 amappl16 192 3210 0 2225 56 6 50 52 0 8 0 amappl15 184 169 0 166 1 0 1 1 0 8 0 amappl14 176 60 0 55 1 0 1 1 0 8 0 amappl13 168 47 0 44 1 0 1 1 0 8 0 amappl12 160 95 0 92 1 0 1 1 0 8 0 amappl11 152 222 0 212 1 0 1 1 0 8 0 amappl10 144 9 0 6 1 0 1 1 0 8 0 amappl9 136 453 0 449 1 0 1 1 0 8 0 amappl8 128 493 0 445 2 0 2 2 0 8 0 amappl7 120 134 0 120 1 0 1 1 0 8 0 amappl6 112 187 0 180 1 0 1 1 0 8 0 amappl5 104 534 0 522 1 0 1 1 0 8 0 amappl4 96 625 0 593 1 0 1 1 0 8 0 amappl3 88 113 0 108 1 0 1 1 0 8 0 amappl2 80 4624 0 4555 2 0 2 2 0 8 0 amappl1 72 22434 0 22026 23 13 10 17 0 8 0 amappl 80 1554 0 1511 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 21 0 4 1 0 1 1 0 8 0 uaddrrnd 24 707 0 689 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 707 0 689 1 0 1 1 0 8 0 vmmpekpl 168 8128 0 8094 2 0 2 2 0 8 0 vmmpepl 168 90551 0 88454 240 131 109 130 0 357 16 vmsppl 272 706 0 689 4 2 2 2 0 8 0 pdppl 4096 1420 0 1382 9 4 5 6 0 8 0 pvpl 32 257109 0 238277 182 17 165 174 0 265 0 pmappl 200 706 0 689 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 293 0 66 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(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(ffff800000b08b00,ffff80001d7889e0,ffff80001d788938,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805e46c100,fffffd805da66e18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da66e18,9,fffffd805e46c100,0,0,ffff80001d6f4130) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da66e18,0,ffff80001d788bd0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f4130,5,ffff80001d788cb0,0,ffff80001d788d90) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f4130,ffff80001d788d48,ffff80001d788d90) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d788e10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x16d87d13e20, 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(ffff800000b08b00,ffff80001d7889e0,ffff80001d788938,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd805e46c100,fffffd805da66e18,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd805da66e18,9,fffffd805e46c100,0,0,ffff80001d6f4130) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd805da66e18,0,ffff80001d788bd0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f4130,5,ffff80001d788cb0,0,ffff80001d788d90) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f4130,ffff80001d788d48,ffff80001d788d90) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d788e10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x16d87d13e20, count: -11