Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vz: fix nil pointer dereference with mountType: reverse-sshfs; validate disk format #1245

Merged
merged 2 commits into from
Dec 14, 2022

Conversation

AkihiroSuda
Copy link
Member

No description provided.

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10075a5a4]

goroutine 1 [running]:
github.com/Code-Hex/vz/v3/internal/objc.ConvertToNSMutableArray.func1(0x2?, 0x600000c143f0?)
        /Users/suda/gopath/pkg/mod/github.com/!code-!hex/vz/v3@v3.0.2/internal/objc/objc.go:134 +0x24
github.com/Code-Hex/vz/v3/internal/objc.ConvertToNSMutableArray({0xc0002c85c0, 0x2, 0xc0001fdb20?})
        /Users/suda/gopath/pkg/mod/github.com/!code-!hex/vz/v3@v3.0.2/internal/objc/objc.go:134 +0xef
github.com/Code-Hex/vz/v3.(*VirtualMachineConfiguration).SetDirectorySharingDevicesVirtualMachineConfiguration(0xc00012e000?, {0xc0002c85a0, 0x2, 0x1f?})
        /Users/suda/gopath/pkg/mod/github.com/!code-!hex/vz/v3@v3.0.2/configuration.go:188 +0x77
github.com/lima-vm/lima/pkg/vz.attachFolderMounts(0xc00047e780, 0xb?)
        /Users/suda/gopath/src/github.com/lima-vm/lima/pkg/vz/vm_darwin.go:381 +0x214
github.com/lima-vm/lima/pkg/vz.createVM(0x1000811e5?, 0xc00012e040?)
        /Users/suda/gopath/src/github.com/lima-vm/lima/pkg/vz/vm_darwin.go:124 +0xf8
github.com/lima-vm/lima/pkg/vz.startVM({0x100b42d30?, 0xc0000da008}, 0xc00047e780)
        /Users/suda/gopath/src/github.com/lima-vm/lima/pkg/vz/vm_darwin.go:32 +0x5b
github.com/lima-vm/lima/pkg/vz.(*LimaVzDriver).Start(0xc0004b62b0, {0x100b42d30, 0xc0000da008})
        /Users/suda/gopath/src/github.com/lima-vm/lima/pkg/vz/vz_driver_darwin.go:106 +0xf3
github.com/lima-vm/lima/pkg/hostagent.(*HostAgent).Run(0xc0000e0480, {0x100b42d30?, 0xc0000da008})
        /Users
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda added this to the v0.14.1 milestone Dec 14, 2022
@AkihiroSuda AkihiroSuda merged commit 585d6e2 into lima-vm:master Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant