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 *447059 40179 0 0 0x4000000 0 syz-executor.1 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(ffff800000b1c200,ffff80001d7883b0,ffff80001d788308,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80574a9b00,fffffd8058e131d0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8058e131d0,9,fffffd80574a9b00,0,0,ffff80001d718d50) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8058e131d0,0,ffff80001d7885a0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d718d50,6,ffff80001d788680,0,ffff80001d788760) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d718d50,ffff80001d788718,ffff80001d788760) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d7887e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa57412864b0, 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(ffff800000b1c200,ffff80001d7883b0,ffff80001d788308,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80574a9b00,fffffd8058e131d0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8058e131d0,9,fffffd80574a9b00,0,0,ffff80001d718d50) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8058e131d0,0,ffff80001d7885a0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d718d50,6,ffff80001d788680,0,ffff80001d788760) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d718d50,ffff80001d788718,ffff80001d788760) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d7887e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa57412864b0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d788180 rbx 0xffff80001d788230 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81102faf kprintf+0x15f r9 0x1 r10 0x2 r11 0x36ac2bca1c9add8d r12 0x3000000008 r13 0xffff80001d788190 r14 0x100 r15 0x1 rip 0xffffffff81cde048 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d788170 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=447059 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff80001d717eb0,0xffffffff8281a880 process=0xffff8000ffff8e78 user=0xffff80001d783000, vmspace=0xfffffd80537e5450 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 40179 330603 9573 0 2 0 syz-executor.1 *40179 447059 9573 0 7 0x4000000 syz-executor.1 9573 503617 30721 0 2 0x482 syz-executor.1 93557 360257 1 0 3 0x100083 ttyin getty 61636 350947 0 0 3 0x14200 bored sosplice 89088 422275 0 0 3 0x14200 acct acct 72565 340342 30721 0 3 0x82 piperd syz-executor.0 30721 519666 55158 0 3 0x82 thrsleep syz-fuzzer 30721 314426 55158 0 2 0x4000482 syz-fuzzer 30721 235725 55158 0 3 0x4000082 thrsleep syz-fuzzer 30721 18071 55158 0 3 0x4000082 thrsleep syz-fuzzer 30721 466830 55158 0 3 0x4000082 thrsleep syz-fuzzer 30721 112483 55158 0 2 0x4000002 syz-fuzzer 30721 400707 55158 0 3 0x4000082 thrsleep syz-fuzzer 30721 467684 55158 0 2 0x4000002 syz-fuzzer 55158 114396 36240 0 3 0x10008a pause ksh 36240 301218 20907 0 3 0x92 select sshd 20907 120884 1 0 3 0x80 select sshd 51253 252759 82393 73 3 0x100090 kqread syslogd 82393 128939 1 0 3 0x100082 netio syslogd 24366 318577 1 77 3 0x100090 poll dhclient 473 28521 1 0 3 0x80 poll dhclient 92242 59949 0 0 3 0x14200 bored smr 18662 426363 0 0 2 0x14200 zerothread 34222 457372 0 0 3 0x14200 aiodoned aiodoned 53850 257092 0 0 3 0x14200 syncer update 15626 286258 0 0 3 0x14200 cleaner cleaner 37207 88751 0 0 3 0x14200 reaper reaper 3482 347888 0 0 3 0x14200 pgdaemon pagedaemon 45704 346433 0 0 3 0x14200 bored crynlk 85598 162456 0 0 3 0x14200 bored crypto 94405 370225 0 0 3 0x40014200 acpi0 acpi0 94909 403635 0 0 3 0x14200 bored softnet 84841 227248 0 0 3 0x14200 bored systqmp 5301 396293 0 0 3 0x14200 bored systq 81320 364769 0 0 2 0x40014200 softclock 74881 508026 0 0 3 0x40014200 idle0 1 137628 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 9512 6355K 6915K 78643K 13330 0 pcb 13 8K 8K 78643K 141 0 rtable 134 7K 11K 78643K 800 0 ifaddr 96 20K 21K 78643K 295 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 42 0 ioctlops 0 0K 4K 78643K 136 0 iov 0 0K 32K 78643K 115 0 mount 1 1K 1K 78643K 1 0 vnodes 1230 77K 78K 78643K 2036 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 0K 78643K 91 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 693 0 sigio 0 0K 0K 78643K 2 0 proc 50 38K 55K 78643K 466 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 61 0 in_multi 88 4K 4K 78643K 158 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 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 253 0 pfkey data 0 0K 1K 78643K 4 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 141 121K 121K 78643K 2478 0 UVM aobj 26 2K 2K 78643K 30 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 97 0 NDP 13 0K 0K 78643K 41 0 temp 114 3851K 3921K 78643K 21529 0 kqueue 3 4K 14K 78643K 49 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 12 0 3 1 0 1 1 0 8 0 rtpcb 80 539 0 534 1 0 1 1 0 8 0 rtentry 112 74 0 25 2 0 2 2 0 8 0 unpcb 120 229 0 221 1 0 1 1 0 8 0 syncache 264 8 0 8 3 3 0 1 0 8 0 tcpqe 32 349 0 349 1 1 0 1 0 8 0 tcpcb 544 699 0 693 3 2 1 2 0 8 0 ipq 40 6 0 6 3 3 0 1 0 8 0 ipqe 40 141 0 141 3 3 0 1 0 8 0 inpcb 280 1164 0 1151 5 3 2 3 0 8 1 rttmr 72 2 0 2 2 2 0 1 0 8 0 nd6 48 13 0 7 1 0 1 1 0 8 0 pkpcb 40 8 0 8 3 3 0 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 pfstscr 40 3 0 0 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 179 0 172 2 1 1 2 0 8 0 pftag 88 33 0 30 3 2 1 1 0 8 0 pfqueue 264 2 0 0 1 0 1 1 0 8 0 pfstitem 24 6 0 0 1 0 1 1 0 8 0 pfstkey 112 6 0 0 1 0 1 1 0 8 0 pfstate 328 3 0 0 1 0 1 1 0 8 0 pfrule 1360 32 0 22 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 298 0 92 15 2 13 13 0 8 0 art_table 32 300 0 92 2 0 2 2 0 8 0 art_node 16 73 0 27 1 0 1 1 0 8 0 sysvmsgpl 40 21 0 16 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 89 0 79 1 0 1 1 0 8 0 shmpl 112 28 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2397 0 1000 88 0 88 88 0 8 0 ffsino 240 2397 0 1000 83 0 83 83 0 8 0 nchpl 144 3527 0 1952 60 0 60 60 0 8 0 uvmvnodes 72 3126 0 0 57 0 57 57 0 8 0 vnodes 208 3126 0 0 165 0 165 165 0 8 0 namei 1024 10354 0 10354 3 2 1 1 0 8 1 vcpupl 1984 12 0 0 2 0 2 2 0 8 0 vmpool 528 22 0 10 2 1 1 1 0 8 0 pfiaddrpl 120 54 0 48 1 0 1 1 0 8 0 scxspl 192 10854 0 10854 5 4 1 1 0 8 1 plimitpl 152 71 0 64 1 0 1 1 0 8 0 sigapl 424 879 0 849 4 0 4 4 0 8 0 futexpl 56 14866 0 14866 3 2 1 1 0 8 1 knotepl 112 133 0 114 1 0 1 1 0 8 0 kqueuepl 144 106 0 104 1 0 1 1 0 8 0 pipelkpl 16 170 0 160 1 0 1 1 0 8 0 pipepl 120 340 0 321 1 0 1 1 0 8 0 fdescpl 432 863 0 849 2 0 2 2 0 8 0 filepl 120 6153 0 6053 5 1 4 4 0 8 0 lockfpl 104 181 0 180 1 0 1 1 0 8 0 lockfspl 48 69 0 68 1 0 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 25 0 15 1 0 1 1 0 8 0 ucredpl 96 606 0 599 1 0 1 1 0 8 0 zombiepl 144 849 0 849 2 1 1 1 0 8 1 processpl 920 879 0 849 4 0 4 4 0 8 0 procpl 624 1648 0 1610 6 2 4 4 0 8 1 sosppl 128 14 0 14 3 3 0 1 0 8 0 sockpl 400 1940 0 1918 9 6 3 5 0 8 0 mcl64k 65536 76 0 76 4 3 1 1 0 8 1 mcl16k 16384 8 0 8 3 3 0 1 0 8 0 mcl12k 12288 13 0 13 5 4 1 1 0 8 1 mcl9k 9216 10 0 10 2 2 0 1 0 8 0 mcl8k 8192 19 0 19 4 3 1 1 0 8 1 mcl4k 4096 67 0 67 5 4 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 75406 0 75347 22 14 8 17 0 8 0 mtagpl 80 62 0 16 2 1 1 1 0 8 0 mbufpl 256 124693 0 124483 41 25 16 26 0 8 0 bufpl 280 4926 0 127 343 0 343 343 0 8 0 anonpl 16 102282 0 86329 98 31 67 82 0 107 0 amapchunkpl 152 5808 0 5653 41 34 7 20 0 158 0 amappl16 192 4496 0 3609 72 25 47 57 0 8 2 amappl15 184 10 0 8 1 0 1 1 0 8 0 amappl14 176 25 0 19 1 0 1 1 0 8 0 amappl13 168 43 0 38 1 0 1 1 0 8 0 amappl12 160 16 0 13 2 1 1 1 0 8 0 amappl11 152 203 0 192 1 0 1 1 0 8 0 amappl10 144 280 0 275 1 0 1 1 0 8 0 amappl9 136 597 0 596 1 0 1 1 0 8 0 amappl8 128 586 0 541 2 0 2 2 0 8 0 amappl7 120 369 0 357 1 0 1 1 0 8 0 amappl6 112 172 0 166 1 0 1 1 0 8 0 amappl5 104 795 0 783 1 0 1 1 0 8 0 amappl4 96 453 0 425 1 0 1 1 0 8 0 amappl3 88 123 0 118 1 0 1 1 0 8 0 amappl2 80 5934 0 5867 2 0 2 2 0 8 0 amappl1 72 24091 0 23682 24 15 9 17 0 8 0 amappl 80 1929 0 1879 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 29 0 4 1 0 1 1 0 8 0 uaddrrnd 24 885 0 859 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 885 0 859 1 0 1 1 0 8 0 vmmpekpl 168 9224 0 9193 2 0 2 2 0 8 0 vmmpepl 168 106898 0 104902 161 72 89 122 0 357 1 vmsppl 272 884 0 859 3 1 2 2 0 8 0 pdppl 4096 1776 0 1730 7 1 6 6 0 8 0 pvpl 32 281587 0 262630 217 54 163 193 0 265 6 pmappl 200 884 0 859 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 304 0 70 8 0 8 8 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(ffff800000b1c200,ffff80001d7883b0,ffff80001d788308,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80574a9b00,fffffd8058e131d0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8058e131d0,9,fffffd80574a9b00,0,0,ffff80001d718d50) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8058e131d0,0,ffff80001d7885a0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d718d50,6,ffff80001d788680,0,ffff80001d788760) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d718d50,ffff80001d788718,ffff80001d788760) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d7887e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa57412864b0, 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(ffff800000b1c200,ffff80001d7883b0,ffff80001d788308,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd80574a9b00,fffffd8058e131d0,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd8058e131d0,9,fffffd80574a9b00,0,0,ffff80001d718d50) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd8058e131d0,0,ffff80001d7885a0,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d718d50,6,ffff80001d788680,0,ffff80001d788760) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d718d50,ffff80001d788718,ffff80001d788760) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001d7887e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa57412864b0, count: -11