-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
Steps to reproduce
-
Launch an Ubuntu VM (I use this Vagrant-based VM implementation).
-
Install
vtto /usr/local/bin as root. -
Setting up an API key.
-
Run the following command to create a directory to be denied by AppArmor:
mkdir -p ~/denied-dir -
Create the
/etc/apparmor.d/usr.local.bin.vtApparmor profile file as root with the following content:abi <abi/3.0>, include <tunables/global> /usr/local/bin/vt { include <abstractions/base> include <abstractions/nameservice> include <abstractions/ssl_certs> /home/*/** r, deny owner /home/*/denied-dir/ r, /etc/hosts r, /etc/nsswitch.conf r, /run/systemd/resolve/stub-resolv.conf r, /usr/local/bin/vt mr, owner /home/*/.cache/.vt.relationships.cache rw, owner /home/*/.vt.toml rw, } -
Run the following command as root to load the AppArmor profile in enforcing mode:
apparmor_parser -r /etc/apparmor.d/usr.local.bin.vt
-
Run the following command to trigger the crash:
vt scan file -r ~/denied-dir
Current behavior
The program crashed with:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x82be08]
goroutine 7 [running]:
github.com/VirusTotal/vt-cli/utils.(*StringArrayReader).ReadString(0x0?)
/home/runner/work/vt-cli/vt-cli/utils/string_reader.go:46 +0x8
github.com/VirusTotal/vt-cli/utils.(*Coordinator).DoWithStringsFromReader.func1()
/home/runner/work/vt-cli/vt-cli/utils/do.go:69 +0x2f
created by github.com/VirusTotal/vt-cli/utils.(*Coordinator).DoWithStringsFromReader in goroutine 1
/home/runner/work/vt-cli/vt-cli/utils/do.go:68 +0x95
Expected behavior
No crash
Version
1.3.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels