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

watch_csv() plugin crashes darwin client in 0.6.8 and newer #2867

Closed
SBattaglia-R7 opened this issue Aug 6, 2023 · 1 comment
Closed

watch_csv() plugin crashes darwin client in 0.6.8 and newer #2867

SBattaglia-R7 opened this issue Aug 6, 2023 · 1 comment

Comments

@SBattaglia-R7
Copy link
Contributor

Possibly related to #2450 . I've only verified the crash on MacOS since I don't have access to Linux or Windows right now.

I tested on 0.6.7, 0.6.8, 0.6.9, and 0.7.0 and verified that the file path is correct by using parse_csv() with the same parameters. Parse_csv() outputs the expected file contents and does not crash on the tested versions.

To reproduce, query "SELECT * from watch_csv(filename='path/to/file')". On 0.6.8 and above, the client will panic:

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

goroutine 122 [running]:
www.velocidex.com/golang/velociraptor/vql/parsers/csv.(*CSVWatcherService).Register(0x0, 0xc0003fde40, {0x0, 0x0}, {0x5fe0898?, 0xc000442300}, {0x5ff19c0, 0xc0012ae480}, 0xc000735080)
	/Users/mic/projects/velociraptor/vql/parsers/csv/watcher.go:55 +0x92
www.velocidex.com/golang/velociraptor/vql/parsers/csv._WatchCSVPlugin.Call.func1()
	/Users/mic/projects/velociraptor/vql/parsers/csv/csv.go:195 +0x318
created by www.velocidex.com/golang/velociraptor/vql/parsers/csv._WatchCSVPlugin.Call
	/Users/mic/projects/velociraptor/vql/parsers/csv/csv.go:174 +0xf8

The panic occurs whether the file path is correct or not. On 0.6.7, the client does not crash, but it also does not fire events when a file in the provided path is edited.

@scudette
Copy link
Contributor

Fixed by #2901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants