panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x76c2f4] goroutine 26 [running]: github.com/google/syzkaller/prog.ForeachArg(0xc0010a4e80, 0xc0002e3c78) /syzkaller/gopath/src/github.com/google/syzkaller/prog/analysis.go:120 +0x64 github.com/google/syzkaller/prog.chooseCall(0xc0010a4d80, 0xc002e67d20, 0xc0002e3db0) /syzkaller/gopath/src/github.com/google/syzkaller/prog/mutation.go:210 +0x10f github.com/google/syzkaller/prog.(*mutator).mutateArg(0xc0002e3ec0, 0xa) /syzkaller/gopath/src/github.com/google/syzkaller/prog/mutation.go:167 +0x6a github.com/google/syzkaller/prog.(*Prog).Mutate(0xc0010a4d80, 0x9ac3e0, 0xc0023604b0, 0x14, 0xc001fe9840, 0xc0029b2000, 0x2721, 0x3000) /syzkaller/gopath/src/github.com/google/syzkaller/prog/mutation.go:47 +0x32c main.(*Proc).loop(0xc001fe9880) /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/proc.go:95 +0x434 created by main.main /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/fuzzer.go:260 +0x1188 OpenBSD/amd64 kernel: protection fault trap, code=0 Stopped at in_delmulti+0x8d: movl 0xc(%r14),%r15d ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic the kernel did not panic ddb{1}> trace in_delmulti(bfffeffffff7ffff) at in_delmulti+0x8d sys/netinet/in.c:914 in_purgeaddr(ffff800000b32100) at in_purgeaddr+0x156 sys/netinet/in.c:760 in_ifdetach(ffff800000ac6000) at in_ifdetach+0x74 sys/netinet/in.c:971 if_detach(ffff800000ac6000) at if_detach+0x140 sys/net/if.c:1142 tun_clone_destroy(ffff800000ac6000) at tun_clone_destroy+0x1f2 sys/net/if_tun.c:329 tun_dev_close(5d00,7) at tun_dev_close+0x160 sys/net/if_tun.c:480 spec_close(ffff800020edf360) at spec_close+0x311 sys/kern/spec_vnops.c:560 VOP_CLOSE(fffffd806e6eb348,7,fffffd807f7bf6c0,ffff800020dddd48) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd80668496a0,ffff800020dddd48) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80668496a0,ffff800020dddd48) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd80668496a0,ffff800020dddd48) at fdrop+0xc2 sys/kern/kern_descrip.c:1279 closef(fffffd80668496a0,ffff800020dddd48) at closef+0x11c sys/kern/kern_descrip.c:1263 fdfree(ffff800020dddd48) at fdfree+0x101 sys/kern/kern_descrip.c:1195 exit1(ffff800020dddd48,0,d,1) at exit1+0x32c sys/kern/kern_exit.c:197 postsig(ffff800020dddd48,d) at postsig+0x4ed sigexit sys/kern/kern_sig.c:1483 [inline] postsig(ffff800020dddd48,d) at postsig+0x4ed sys/kern/kern_sig.c:1415 userret(ffff800020dddd48) at userret+0x199 sys/kern/kern_sig.c:1872 syscall(ffff800020edf7e0) at syscall+0x55f mi_syscall_return sys/sys/syscall_mi.h:129 [inline] syscall(ffff800020edf7e0) at syscall+0x55f sys/arch/amd64/amd64/trap.c:592 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffce280, count: -17 ddb{1}> show registers rdi 0x2 rsi 0 rbp 0xffff800020edf130 rbx 0 rdx 0xffff800020dddd48 rcx 0 rax 0 r8 0xffffffff81322643 rt_ifa_purge+0x153 r9 0x5 r10 0x3 r11 0x7390b56d890be844 r12 0 r13 0x3 r14 0xbfffeffffff7ffff r15 0x1 rip 0xffffffff820a8d4d in_delmulti+0x8d cs 0x8 rflags 0x10246 __ALIGN_SIZE+0xf246 rsp 0xffff800020edf0d0 ss 0x10 in_delmulti+0x8d: movl 0xc(%r14),%r15d ddb{1}> show proc PROC (syz-executor.0) pid=59766 stat=onproc flags process=a proc=2000 pri=32, usrpri=74, nice=20 forw=0xffffffffffffffff, list=0xffff800020e41870,0xffff800020e22ec8 process=0xffff800020df0f70 user=0xffff800020eda000, vmspace=0xfffffd807efff730 estcpu=36, cpticks=2, pctcpu=0.7 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 31908 160579 0 0 3 0x14200 bored sosplice 38652 163311 95081 0 2 0x12 sshd 21972 224326 1 0 3 0x100083 ttyin getty 95081 387337 1 0 3 0x80 select sshd 32368 466977 65690 74 3 0x100092 bpf pflogd 65690 270109 1 0 3 0x80 netio pflogd 66257 438874 67998 73 3 0x100090 kqread syslogd 67998 41194 1 0 3 0x100082 netio syslogd 81378 256861 1 77 3 0x100090 poll dhclient 92242 223892 1 0 3 0x80 poll dhclient 77294 417003 0 0 3 0x14200 pause smr 19054 396099 0 0 2 0x14200 zerothread 94446 339555 0 0 3 0x14200 aiodoned aiodoned 44542 298132 0 0 3 0x14200 syncer update 93152 155455 0 0 3 0x14200 cleaner cleaner 94914 494638 0 0 7 0x14200 reaper 71120 436840 0 0 3 0x14200 pgdaemon pagedaemon 87530 333336 0 0 3 0x14200 bored crynlk 58366 349695 0 0 3 0x14200 bored crypto 20824 450627 0 0 3 0x40014200 acpi0 acpi0 60748 202483 0 0 3 0x40014200 idle1 57626 127983 0 0 3 0x14200 bored softnet 96018 414013 0 0 2 0x14200 systqmp 34507 424664 0 0 3 0x14200 bored systq 48195 301241 0 0 3 0x40014200 bored softclock 344 87542 0 0 3 0x40014200 idle0 1 78266 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9528 6427K 6939K 78643K 11434 0 pcb 13 8K 8K 78643K 115 0 rtable 107 8K 10K 78643K 591 0 ifaddr 86 17K 19K 78643K 281 0 sysctl 3 1K 1K 78643K 3 0 counters 43 33K 34K 78643K 83 0 ioctlops 0 0K 4K 78643K 1597 0 iov 0 0K 16K 78643K 80 0 mount 1 1K 1K 78643K 1 0 vnodes 1218 77K 77K 78643K 1559 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 17 0 VM map 2 1K 1K 78643K 2 0 sem 11 1K 1K 78643K 19 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 3 8K 25K 78643K 668 0 sigio 0 0K 0K 78643K 7 0 proc 62 63K 95K 78643K 527 0 subproc 14 0K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 34 0 in_multi 62 3K 3K 78643K 181 0 ether_multi 1 0K 0K 78643K 17 0 mrt 0 0K 0K 78643K 7 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 274 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 86 117K 121K 78643K 3223 0 UVM aobj 39 2K 2K 78643K 44 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 70 0 NDP 14 0K 0K 78643K 46 0 temp 123 3869K 3933K 78643K 16138 0 kqueue 2 2K 8K 78643K 49 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 7 0 3 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 54 0 52 1 0 1 1 0 8 0 rtentry 112 77 0 43 2 0 2 2 0 8 0 unpcb 120 359 0 348 1 0 1 1 0 8 0 syncache 264 12 0 12 5 4 1 1 0 8 1 tcpqe 32 266 0 266 3 2 1 1 0 8 1 tcpcb 544 237 0 232 2 1 1 2 0 8 0 inpcb 296 1375 0 1367 8 6 2 2 0 8 1 nd6 48 22 0 20 1 0 1 1 0 8 0 pkpcb 40 4 0 4 1 1 0 1 0 8 0 ppxss 1128 2 0 2 1 1 0 1 0 8 0 pffrag 232 4 0 3 3 2 1 1 0 482 0 pffrnode 88 4 0 3 3 2 1 1 0 8 0 pffrent 40 54 0 53 3 2 1 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 84 0 75 5 4 1 2 0 8 0 pfpktdelay 56 20 0 20 2 1 1 1 0 8 1 pfstitem 24 12 0 10 1 0 1 1 0 8 0 pfstkey 112 12 0 10 1 0 1 1 0 8 0 pfstate 328 12 0 10 1 0 1 1 0 8 0 pfsrctr 152 3 0 3 1 1 0 1 0 8 0 pfrule 1360 47 0 34 3 1 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 288 0 127 12 0 12 12 0 8 0 art_table 32 289 0 127 2 0 2 2 0 8 0 art_node 16 76 0 41 1 0 1 1 0 8 0 sysvmsgpl 40 27 0 15 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 42 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2433 0 1028 89 0 89 89 0 8 0 ffsino 272 2433 0 1028 95 0 95 95 0 8 0 nchpl 144 3552 0 1944 60 0 60 60 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 11310 0 11310 8 7 1 1 0 8 1 percpumem 16 52 0 20 1 0 1 1 0 8 0 vcpupl 1984 13 0 0 2 0 2 2 0 8 0 vmpool 560 22 0 9 2 1 1 1 0 8 0 pfiaddrpl 120 28 0 20 4 3 1 1 0 8 0 scsiplug 64 2 0 2 2 1 1 1 0 8 1 scxspl 192 10208 0 10208 8 7 1 7 0 8 1 plimitpl 152 46 0 38 1 0 1 1 0 8 0 sigapl 424 884 0 855 4 0 4 4 0 8 0 futexpl 56 10774 0 10774 8 7 1 1 0 8 1 knotepl 112 111 0 106 1 0 1 1 0 8 0 kqueuepl 144 104 0 103 1 0 1 1 0 8 0 pipelkpl 48 143 0 137 1 0 1 1 0 8 0 pipepl 120 286 0 279 1 0 1 1 0 8 0 fdescpl 496 868 0 855 3 0 3 3 0 8 0 filepl 152 6392 0 6328 5 0 5 5 0 8 1 lockfpl 104 1686 0 1685 1 0 1 1 0 8 0 lockfspl 48 410 0 409 1 0 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 22 0 11 1 0 1 1 0 8 0 ucredpl 96 1699 0 1690 1 0 1 1 0 8 0 zombiepl 144 857 0 854 1 0 1 1 0 8 0 processpl 984 884 0 854 5 0 5 5 0 8 0 procpl 624 2393 0 2363 4 0 4 4 0 8 0 sosppl 128 15 0 15 7 7 0 1 0 8 0 sockpl 400 1795 0 1774 10 6 4 4 0 8 1 mcl64k 65536 8 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 187 0 0 22 0 22 22 0 8 0 mtagpl 96 55 0 0 2 0 2 2 0 8 0 mbufpl 256 720 0 0 38 0 38 38 0 8 0 bufpl 280 4479 0 136 311 0 311 311 0 8 0 anonpl 16 95416 0 93743 117 37 80 85 0 124 56 amapchunkpl 152 5347 0 5292 20 12 8 12 0 158 2 amappl16 192 4115 0 4086 67 20 47 57 0 8 39 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 335 0 331 1 0 1 1 0 8 0 amappl13 168 29 0 26 1 0 1 1 0 8 0 amappl12 160 7 0 7 1 0 1 1 0 8 1 amappl11 152 61 0 46 1 0 1 1 0 8 0 amappl10 144 353 0 350 1 0 1 1 0 8 0 amappl9 136 396 0 393 1 0 1 1 0 8 0 amappl8 128 357 0 355 2 0 2 2 0 8 1 amappl7 120 119 0 111 1 0 1 1 0 8 0 amappl6 112 30 0 29 1 0 1 1 0 8 0 amappl5 104 768 0 751 1 0 1 1 0 8 0 amappl4 96 501 0 475 1 0 1 1 0 8 0 amappl3 88 438 0 433 1 0 1 1 0 8 0 amappl2 80 5975 0 5916 2 0 2 2 0 8 0 amappl1 72 28848 0 28417 23 13 10 18 0 8 0 amappl 80 2663 0 2632 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 43 0 5 1 0 1 1 0 8 0 uaddrrnd 24 890 0 864 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 890 0 864 1 0 1 1 0 8 0 vmmpekpl 168 10972 0 10937 2 0 2 2 0 8 0 vmmpepl 168 111737 0 110736 150 47 103 115 0 357 37 vmsppl 368 889 0 863 3 0 3 3 0 8 0 pdppl 4096 1787 0 1739 8 1 7 7 0 8 0 pvpl 32 284292 0 281190 257 63 194 199 0 265 143 pmappl 232 889 0 863 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 303 0 18 9 0 9 9 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp ddb{0}> trace x86_ipi_db(ffffffff826f8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __mp_lock(ffffffff828ac5d8) at __mp_lock+0x127 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff828ac5d8) at __mp_lock+0x127 sys/kern/kern_lock.c:147 intr_handler(ffff800020dcf410,ffff80000065ad80) at intr_handler+0x5e sys/arch/amd64/amd64/intr.c:532 Xintr_ioapic_edge4_untramp() at Xintr_ioapic_edge4_untramp+0x19f Xspllower() at Xspllower+0x19 pmap_do_remove(fffffd807effe000,189b72e18000,189b72e92000,0) at pmap_do_remove+0x510 sys/arch/amd64/amd64/pmap.c:1757 uvm_map_teardown(fffffd806e8f68a8) at uvm_map_teardown+0x195 uvm_map_addr_RBT_LEFT sys/uvm/uvm_map.h:176 [inline] uvm_map_teardown(fffffd806e8f68a8) at uvm_map_teardown+0x195 sys/uvm/uvm_map.c:2739 uvmspace_free(fffffd806e8f68a8) at uvmspace_free+0x86 sys/uvm/uvm_map.c:3646 uvm_exit(ffff800020e387c8) at uvm_exit+0x29 sys/uvm/uvm_glue.c:297 reaper(ffff800020d89380) at reaper+0x189 sys/kern/kern_exit.c:456 end trace frame: 0x0, count: -12 ddb{0}> machine ddbcpu 1 Stopped at in_delmulti+0x8d: movl 0xc(%r14),%r15d ddb{1}> trace in_delmulti(bfffeffffff7ffff) at in_delmulti+0x8d sys/netinet/in.c:914 in_purgeaddr(ffff800000b32100) at in_purgeaddr+0x156 sys/netinet/in.c:760 in_ifdetach(ffff800000ac6000) at in_ifdetach+0x74 sys/netinet/in.c:971 if_detach(ffff800000ac6000) at if_detach+0x140 sys/net/if.c:1142 tun_clone_destroy(ffff800000ac6000) at tun_clone_destroy+0x1f2 sys/net/if_tun.c:329 tun_dev_close(5d00,7) at tun_dev_close+0x160 sys/net/if_tun.c:480 spec_close(ffff800020edf360) at spec_close+0x311 sys/kern/spec_vnops.c:560 VOP_CLOSE(fffffd806e6eb348,7,fffffd807f7bf6c0,ffff800020dddd48) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd80668496a0,ffff800020dddd48) at vn_closefile+0xd7 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80668496a0,ffff800020dddd48) at vn_closefile+0xd7 sys/kern/vfs_vnops.c:614 fdrop(fffffd80668496a0,ffff800020dddd48) at fdrop+0xc2 sys/kern/kern_descrip.c:1279 closef(fffffd80668496a0,ffff800020dddd48) at closef+0x11c sys/kern/kern_descrip.c:1263 fdfree(ffff800020dddd48) at fdfree+0x101 sys/kern/kern_descrip.c:1195 exit1(ffff800020dddd48,0,d,1) at exit1+0x32c sys/kern/kern_exit.c:197 postsig(ffff800020dddd48,d) at postsig+0x4ed sigexit sys/kern/kern_sig.c:1483 [inline] postsig(ffff800020dddd48,d) at postsig+0x4ed sys/kern/kern_sig.c:1415 userret(ffff800020dddd48) at userret+0x199 sys/kern/kern_sig.c:1872 syscall(ffff800020edf7e0) at syscall+0x55f mi_syscall_return sys/sys/syscall_mi.h:129 [inline] syscall(ffff800020edf7e0) at syscall+0x55f sys/arch/amd64/amd64/trap.c:592 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffce280, count: -17