From: Oliver Kurth Date: Wed, 29 Aug 2018 20:29:44 +0000 (-0700) Subject: Disable hgfsServer plugin when not running in a VMware VM. X-Git-Tag: stable-11.0.0~442 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebf08325adf874723c86aa313954492101117934;p=thirdparty%2Fopen-vm-tools.git Disable hgfsServer plugin when not running in a VMware VM. VmCheck_GetVersion() accesses Backdoor in an unsafe manner which is not expected to work on non-VMware environments including physical machines. So, we need to make sure that VmCheck_GetVersion() is called only when we are running in a VMware VM. --- diff --git a/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c b/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c index c5ef8726b..129fa7504 100644 --- a/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c +++ b/open-vm-tools/services/plugins/hgfsServer/hgfsPlugin.c @@ -1089,6 +1089,13 @@ ToolsOnLoad(ToolsAppCtx *ctx) return NULL; } + /* + * If not running in a VMware VM, return NULL to disable the plugin. + */ + if (!ctx->isVMware) { + return NULL; + } + /* * Check for VM is running in a hosted environment and if so initialize * the Shared Folders HGFS client redirector.