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 * 10457 44181 0 0 0x4000000 0 syz-executor.1 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(ffff800000b49d00,ffff80001e84eb20,ffff80001e84ea78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806517ba00,fffffd80587eac98,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd80587eac98,9,fffffd806517ba00,0,0,ffff80001d6f3ec0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd80587eac98,0,ffff80001e84ed10,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3ec0,3,ffff80001e84edf0,0,ffff80001e84eed0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3ec0,ffff80001e84ee88,ffff80001e84eed0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e84ef50) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb8264d1a920, 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(ffff800000b49d00,ffff80001e84eb20,ffff80001e84ea78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806517ba00,fffffd80587eac98,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd80587eac98,9,fffffd806517ba00,0,0,ffff80001d6f3ec0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd80587eac98,0,ffff80001e84ed10,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3ec0,3,ffff80001e84edf0,0,ffff80001e84eed0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3ec0,ffff80001e84ee88,ffff80001e84eed0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e84ef50) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb8264d1a920, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e84e8f0 rbx 0xffff80001e84e9a0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8120980f kprintf+0x15f r9 0x1 r10 0x2 r11 0x696df8721eae490e r12 0x3000000008 r13 0xffff80001e84e900 r14 0x100 r15 0x1 rip 0xffffffff81fbc738 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e84e8e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=10457 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6f4610,0xffffffff8283fb58 process=0xffff80001d77ae90 user=0xffff80001e84a000, vmspace=0xfffffd8058265670 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 44181 144340 63396 0 2 0 syz-executor.1 *44181 10457 63396 0 7 0x4000000 syz-executor.1 47782 454416 0 0 3 0x14200 acct acct 93211 175630 67254 0 2 0x2 syz-executor.0 91942 35738 0 0 3 0x14200 bored sosplice 63396 444456 67254 0 2 0x482 syz-executor.1 60686 288506 0 0 3 0x14280 nfsidl nfsio 78134 478932 0 0 3 0x14280 nfsidl nfsio 30092 30045 0 0 3 0x14280 nfsidl nfsio 95656 144623 0 0 3 0x14280 nfsidl nfsio 26241 39282 0 0 3 0x14280 nfsidl nfsio 61969 384363 0 0 3 0x14280 nfsidl nfsio 54909 476864 0 0 3 0x14280 nfsidl nfsio 5350 320614 0 0 3 0x14280 nfsidl nfsio 27917 376223 0 0 3 0x14280 nfsidl nfsio 81520 523288 0 0 3 0x14280 nfsidl nfsio 96528 5792 0 0 3 0x14280 nfsidl nfsio 48909 188501 0 0 3 0x14280 nfsidl nfsio 16136 451286 0 0 3 0x14280 nfsidl nfsio 2264 326070 0 0 3 0x14280 nfsidl nfsio 1201 501174 0 0 3 0x14280 nfsidl nfsio 65169 250714 0 0 3 0x14280 nfsidl nfsio 63737 381411 0 0 3 0x14280 nfsidl nfsio 64737 353833 0 0 3 0x14280 nfsidl nfsio 96520 384769 0 0 3 0x14280 nfsidl nfsio 94217 519731 0 0 3 0x14280 nfsidl nfsio 67254 202701 71184 0 3 0x82 thrsleep syz-fuzzer 67254 126909 71184 0 3 0x4000082 nanosleep syz-fuzzer 67254 454985 71184 0 3 0x4000082 kqread syz-fuzzer 67254 16054 71184 0 3 0x4000082 thrsleep syz-fuzzer 67254 166546 71184 0 3 0x4000082 thrsleep syz-fuzzer 67254 384546 71184 0 3 0x4000082 thrsleep syz-fuzzer 67254 268471 71184 0 3 0x4000082 thrsleep syz-fuzzer 67254 391814 71184 0 3 0x4000082 thrsleep syz-fuzzer 71184 486191 32559 0 3 0x10008a pause ksh 32559 43239 85604 0 3 0x92 select sshd 23058 239043 1 0 3 0x100083 ttyin getty 85604 423672 1 0 3 0x80 select sshd 39577 99922 76884 73 3 0x100090 kqread syslogd 76884 302343 1 0 3 0x100082 netio syslogd 97545 28321 1 77 3 0x100090 poll dhclient 6977 444482 1 0 3 0x80 poll dhclient 6542 416772 0 0 3 0x14200 bored smr 53575 161889 0 0 2 0x14200 zerothread 99463 75210 0 0 3 0x14200 aiodoned aiodoned 57083 156998 0 0 3 0x14200 syncer update 24108 6133 0 0 3 0x14200 cleaner cleaner 13791 149687 0 0 3 0x14200 reaper reaper 74309 482892 0 0 3 0x14200 pgdaemon pagedaemon 65337 200365 0 0 3 0x14200 bored crynlk 18522 388909 0 0 3 0x14200 bored crypto 29154 99393 0 0 3 0x40014200 acpi0 acpi0 32570 289172 0 0 3 0x14200 bored softnet 47195 245326 0 0 3 0x14200 bored systqmp 56370 453139 0 0 3 0x14200 bored systq 3935 51289 0 0 2 0x40014200 softclock 66453 291179 0 0 3 0x40014200 idle0 1 337903 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 9519 6358K 6920K 78643K 12202 0 pcb 13 8K 8K 78643K 129 0 rtable 138 21K 22K 78643K 908 0 ifaddr 102 20K 21K 78643K 1258 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 32 0 ioctlops 0 0K 4K 78643K 2112 0 iov 0 0K 16K 78643K 567 0 mount 1 1K 1K 78643K 1 0 vnodes 1215 76K 77K 78643K 1694 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 18 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 137 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 2481 0 sigio 0 0K 0K 78643K 15 0 proc 51 38K 63K 78643K 3587 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 357 0 in_multi 82 4K 4K 78643K 188 0 ether_multi 1 0K 0K 78643K 28 0 mrt 0 0K 0K 78643K 3 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 294 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 104K 120K 78643K 6123 0 UVM aobj 43 2K 2K 78643K 47 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 174 0 NDP 14 0K 0K 78643K 35 0 temp 141 3858K 3922K 78643K 18984 0 kqueue 3 4K 10K 78643K 50 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 53 0 50 1 0 1 1 0 8 0 rtentry 112 88 0 51 2 0 2 2 0 8 0 unpcb 120 1275 0 1265 1 0 1 1 0 8 0 syncache 264 13 0 13 5 5 0 1 0 8 0 tcpqe 32 55 0 55 2 2 0 1 0 8 0 tcpcb 544 907 0 903 1 0 1 1 0 8 0 ipq 40 5 0 5 2 2 0 1 0 8 0 ipqe 40 182 0 182 2 2 0 1 0 8 0 inpcb 280 2408 0 2401 4 2 2 2 0 8 1 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 20 0 13 1 0 1 1 0 8 0 pkpcb 40 4 0 4 1 1 0 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 pfosfp 40 2 0 1 1 0 1 1 0 8 0 pfosfpen 112 3 0 2 1 0 1 1 0 8 0 pfrktable 1344 236 0 216 2 0 2 2 0 8 0 pftag 88 42 0 34 1 0 1 1 0 8 0 pfqueue 264 2 0 0 1 0 1 1 0 8 0 pfstitem 24 2 0 2 1 1 0 1 0 8 0 pfstkey 112 2 0 2 1 1 0 1 0 8 0 pfstate 328 1 0 1 1 1 0 1 0 8 0 pfrule 1360 1653 0 1561 8 0 8 8 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 359 0 199 14 2 12 14 0 8 0 art_table 32 361 0 199 2 0 2 2 0 8 0 art_node 16 87 0 56 1 0 1 1 0 8 0 sysvmsgpl 40 29 0 24 2 1 1 1 0 8 0 semapl 112 135 0 125 1 0 1 1 0 8 0 shmpl 112 45 0 4 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4071 0 2678 88 0 88 88 0 8 0 ffsino 240 4071 0 2678 83 0 83 83 0 8 0 nchpl 144 7829 0 6242 60 0 60 60 0 8 0 uvmvnodes 72 4508 0 0 82 0 82 82 0 8 0 vnodes 208 4508 0 0 238 0 238 238 0 8 0 namei 1024 26177 0 26177 2 1 1 1 0 8 1 vcpupl 1984 9 0 0 2 0 2 2 0 8 0 vmpool 528 15 0 6 1 0 1 1 0 8 0 pfiaddrpl 120 2683 0 2612 3 0 3 3 0 8 0 scxspl 192 26888 0 26888 1 0 1 1 0 8 1 plimitpl 152 59 0 52 1 0 1 1 0 8 0 sigapl 424 2680 0 2630 6 0 6 6 0 8 0 futexpl 56 42099 0 42099 3 2 1 1 0 8 1 knotepl 112 157 0 138 1 0 1 1 0 8 0 kqueuepl 144 111 0 109 1 0 1 1 0 8 0 pipelkpl 16 1035 0 1025 1 0 1 1 0 8 0 pipepl 120 2070 0 2051 1 0 1 1 0 8 0 fdescpl 432 2644 0 2630 2 0 2 2 0 8 0 filepl 120 18441 0 18345 5 1 4 4 0 8 1 lockfpl 104 1712 0 1711 1 0 1 1 0 8 0 lockfspl 48 805 0 804 1 0 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 1198 0 1191 1 0 1 1 0 8 0 zombiepl 144 2630 0 2630 1 0 1 1 0 8 1 processpl 920 2680 0 2630 7 0 7 7 0 8 0 procpl 624 5259 0 5201 7 2 5 6 0 8 0 sosppl 128 16 0 16 4 4 0 1 0 8 0 sockpl 400 3744 0 3724 7 3 4 4 0 8 1 mcl64k 65536 68 0 68 4 3 1 1 0 8 1 mcl16k 16384 16 0 16 5 4 1 1 0 8 1 mcl12k 12288 15 0 15 5 5 0 1 0 8 0 mcl9k 9216 11 0 11 5 5 0 1 0 8 0 mcl8k 8192 364 0 364 4 3 1 1 0 8 1 mcl4k 4096 835 0 835 3 2 1 1 0 8 1 mcl2k2 2112 8 0 8 3 2 1 1 0 8 1 mcl2k 2048 79338 0 79289 24 17 7 16 0 8 0 mtagpl 80 62 0 26 2 1 1 1 0 8 0 mbufpl 256 140093 0 139937 33 20 13 21 0 8 0 bufpl 280 7745 0 2393 383 0 383 383 0 8 0 anonpl 16 204596 0 188878 104 34 70 84 0 107 0 amapchunkpl 152 10553 0 10408 51 41 10 20 0 158 3 amappl16 192 11736 0 10801 67 19 48 58 0 8 1 amappl15 184 9 0 8 1 0 1 1 0 8 0 amappl14 176 25 0 19 1 0 1 1 0 8 0 amappl13 168 48 0 45 1 0 1 1 0 8 0 amappl12 160 1153 0 1150 1 0 1 1 0 8 0 amappl11 152 71 0 61 1 0 1 1 0 8 0 amappl10 144 1248 0 1241 1 0 1 1 0 8 0 amappl9 136 393 0 391 1 0 1 1 0 8 0 amappl8 128 428 0 389 2 0 2 2 0 8 0 amappl7 120 127 0 113 1 0 1 1 0 8 0 amappl6 112 26 0 22 1 0 1 1 0 8 0 amappl5 104 3722 0 3711 1 0 1 1 0 8 0 amappl4 96 484 0 457 1 0 1 1 0 8 0 amappl3 88 122 0 117 1 0 1 1 0 8 0 amappl2 80 20466 0 20402 2 0 2 2 0 8 0 amappl1 72 52052 0 51638 23 13 10 17 0 8 0 amappl 80 5536 0 5489 3 1 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 46 0 4 1 0 1 1 0 8 0 uaddrrnd 24 2659 0 2636 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2659 0 2636 1 0 1 1 0 8 0 vmmpekpl 168 21233 0 21199 2 0 2 2 0 8 0 vmmpepl 168 303886 0 301861 156 62 94 118 0 357 5 vmsppl 272 2658 0 2636 3 1 2 2 0 8 0 pdppl 4096 5324 0 5281 7 1 6 6 0 8 0 pvpl 32 717517 0 698665 289 105 184 289 0 265 20 pmappl 200 2658 0 2636 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 300 0 61 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(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(ffff800000b49d00,ffff80001e84eb20,ffff80001e84ea78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806517ba00,fffffd80587eac98,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd80587eac98,9,fffffd806517ba00,0,0,ffff80001d6f3ec0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd80587eac98,0,ffff80001e84ed10,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3ec0,3,ffff80001e84edf0,0,ffff80001e84eed0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3ec0,ffff80001e84ee88,ffff80001e84eed0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e84ef50) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb8264d1a920, 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(ffff800000b49d00,ffff80001e84eb20,ffff80001e84ea78,40,0) at rtm_output+0xba9 sys/net/rtsock.c:1120 route_output(fffffd806517ba00,fffffd80587eac98,0,0) at route_output+0x678 sys/net/rtsock.c:832 route_usrreq(fffffd80587eac98,9,fffffd806517ba00,0,0,ffff80001d6f3ec0) at route_usrreq+0x36f sys/net/rtsock.c:275 sosend(fffffd80587eac98,0,ffff80001e84ed10,0,0,0) at sosend+0x669 sys/kern/uipc_socket.c:549 sendit(ffff80001d6f3ec0,3,ffff80001e84edf0,0,ffff80001e84eed0) at sendit+0x52b sys/kern/uipc_syscalls.c:652 sys_sendto(ffff80001d6f3ec0,ffff80001e84ee88,ffff80001e84eed0) at sys_sendto+0x80 sys/kern/uipc_syscalls.c:517 syscall(ffff80001e84ef50) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb8264d1a920, count: -11