I downloaded the source and found that there was a constant (NICINFO_MAX_NICS in ./lib/guestRpc/nicinfo.x) defining the max amount of NICs. If there are more NICs, it makes the method GuestInfoAddNicEntry in ./services/plugins/guestInfo/getlib/guestInfo.c return null, resulting in the crash.

The constant of 16 was set for the purpose of avoiding possible DoS attacks, but it's an arbitrary limit. I've patched it and rebuilt, and this seems to fix my problem.

Attached is a recursive diff of the ./debian directories.

diff -ruN open-vm-toolsDEB/open-vm-tools-8.8.0+2012.05.21-724730/debian/changelog openvmtools/debian/changelog
--- open-vm-toolsDEB/open-vm-tools-8.8.0+2012.05.21-724730/debian/changelog	2012-12-26 08:02:43.000000000 -0600
+++ openvmtools/debian/changelog	2014-08-05 14:38:10.000000000 -0500
@@ -1,3 +1,12 @@
+open-vm-tools (2:8.8.0+2012.05.21-724730-1+nmu2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * There is an arbitrary constant declared limiting the amount of NICs that 
+    it supports. I have bumped the limit from 16 to 64 to make this toolset
+    functional for larger setups.
+
+ -- Nicholas Levi Sielicki <[email protected]>  Tue, 05 Aug 2014 14:32:31 -0500
+
 open-vm-tools (2:8.8.0+2012.05.21-724730-1+nmu2) testing-proposed-updates; urgency=low
 
   * Non-maintainer upload.
diff -ruN open-vm-toolsDEB/open-vm-tools-8.8.0+2012.05.21-724730/debian/patches/NICpatch.diff openvmtools/debian/patches/NICpatch.diff
--- open-vm-toolsDEB/open-vm-tools-8.8.0+2012.05.21-724730/debian/patches/NICpatch.diff	1969-12-31 18:00:00.000000000 -0600
+++ openvmtools/debian/patches/NICpatch.diff	2014-08-05 14:31:02.000000000 -0500
@@ -0,0 +1,11 @@
+--- a/lib/guestRpc/nicinfo.x
++++ b/lib/guestRpc/nicinfo.x
+@@ -39,7 +39,7 @@
+  */
+ const NICINFO_MAX_IP_LEN   = 64;
+ const NICINFO_MAX_IPS      = 64;
+-const NICINFO_MAX_NICS     = 16;
++const NICINFO_MAX_NICS     = 64;
+ 
+ /* MAC Addresses are "AA:BB:CC:DD:EE:FF" = 18 bytes. */
+ const NICINFO_MAC_LEN      = 18;
diff -ruN open-vm-toolsDEB/open-vm-tools-8.8.0+2012.05.21-724730/debian/patches/series openvmtools/debian/patches/series
--- open-vm-toolsDEB/open-vm-tools-8.8.0+2012.05.21-724730/debian/patches/series	2012-12-26 08:36:57.000000000 -0600
+++ openvmtools/debian/patches/series	2014-08-05 14:21:56.000000000 -0500
@@ -1,3 +1,4 @@
 01-kvers.patch
 02-procps.patch
 03-dkms.patch
+NICpatch.diff

Reply via email to