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

Cherry-pick #9784 to 6.6: Vsphere nil pointers access in Metricbeat module #9824

Merged
merged 1 commit into from
Dec 31, 2018

Conversation

sayden
Copy link
Contributor

@sayden sayden commented Dec 28, 2018

Cherry-pick of PR #9784 to 6.6 branch. Original message:

It seems that some fields within the vsphere module on Metricbeat are pointers where the nil check access is not being done. This can cause panics that are not easy to reproduce.

This PR checks every pointer that acces a pointer from the gvmomi library which is used to access vsphere data.

Initially, we only know about panics in the virtualmachine metricset but I have seen that the host metricset could potentially have the same problem

…elastic#9784)

In Vsphere module, some fields returned by the Vsphere library contain pointers to some values that could potentially be nil. With this PR, we do a nil-check prior every access to any of those fields to avoid their writing in case they are nil and protecting Metricbeat from panicking.

(cherry picked from commit 7c31ced)
@sayden sayden merged commit e264b84 into elastic:6.6 Dec 31, 2018
@sayden sayden deleted the backport_9784_6.6 branch October 29, 2021 08:56
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…elastic#9784) (elastic#9824)

In Vsphere module, some fields returned by the Vsphere library contain pointers to some values that could potentially be nil. With this PR, we do a nil-check prior every access to any of those fields to avoid their writing in case they are nil and protecting Metricbeat from panicking.

(cherry picked from commit a05b14e)
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.

2 participants