From: Oliver Kurth Date: Fri, 7 Sep 2018 22:53:26 +0000 (-0700) Subject: Disable hgfsServer plugin when not running in a VMware VM. X-Git-Tag: stable-10.3.5~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2dd430ea5c8c9309700d25548513469dae68c9b;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.