Merge ~paelzer/ubuntu/+source/open-vm-tools:lp-1855686-crash-broken-lsb-output-FOCAL into ubuntu/+source/open-vm-tools:ubuntu/focal-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 9cc6e902747a1015f30ca393d1f7e852023ae099
Merged at revision: 9cc6e902747a1015f30ca393d1f7e852023ae099
Proposed branch: ~paelzer/ubuntu/+source/open-vm-tools:lp-1855686-crash-broken-lsb-output-FOCAL
Merge into: ubuntu/+source/open-vm-tools:ubuntu/focal-devel
Diff against target: 106 lines (+72/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch (+62/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Rafael David Tinoco (community) Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+376511@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Pre Fix:

● open-vm-tools.service - Service for virtual machines hosted on VMware
   Loaded: loaded (/lib/systemd/system/open-vm-tools.service; enabled; vendor preset: enabled)
   Active: failed (Result: core-dump) since Mon 2019-12-09 10:38:23 UTC; 11s ago
     Docs: http://open-vm-tools.sourceforge.net/about.php
  Process: 10317 ExecStart=/usr/bin/vmtoolsd (code=dumped, signal=SEGV)
 Main PID: 10317 (code=dumped, signal=SEGV)

Dec 09 10:38:22 node-4 systemd[1]: Started Service for virtual machines hosted on VMware.
Dec 09 10:38:23 node-4 systemd[1]: open-vm-tools.service: Main process exited, code=dumped, status=11/SEGV
Dec 09 10:38:23 node-4 systemd[1]: open-vm-tools.service: Failed with result 'core-dump'.

Post-Fix:
● open-vm-tools.service - Service for virtual machines hosted on VMware
   Loaded: loaded (/lib/systemd/system/open-vm-tools.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2019-12-09 11:41:03 UTC; 3min 24s ago
     Docs: http://open-vm-tools.sourceforge.net/about.php
 Main PID: 13318 (vmtoolsd)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/open-vm-tools.service
           └─13318 /usr/bin/vmtoolsd

Dec 09 11:41:03 node-4 systemd[1]: Started Service for virtual machines hosted on VMware.

Working as expected

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Review checklist:

- [√] changelog entry correct, targeted to correct codename "focal"
- [-] no major upstream changes to consider
- [-] debian changes look safe
- [√] update-maintainer has been run
- [x] changes forwarded upstream/debian (if appropriate)
      - https://salsa.debian.org/vmware-packaging-team/pkg-open-vm-tools (needs the patch)
- [-] nothing else to drop
- [x] patches match what was proposed upstream
      - lots of weird whitespaces (upstream) have been removed.
      - code changes are the same.
- [√] patches correctly included in debian/patches/series?
- [√] patches have correct DEP3 metadata
- [√] verified PPA package installs/uninstalls
- [-] autopkgtest against the PPA package passes

+1 for this change:

open-vm-tools (2:11.0.1-3ubuntu1) focal; urgency=medium

  * d/p/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch: fix crash with
    uncommon lsb_output behavior (LP: #1855686)

 -- Christian Ehrhardt <email address hidden> Mon, 09 Dec 2019 11:03:56 +0100

Will do a +1 on the other merges as well (as its straight forward).

PS: Debian needs the same change. Should it be forwarded ? Do you plan to ?

Best,

Rafael

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

tag pushed and uploaded to focal

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index f1e5390..6a78290 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+open-vm-tools (2:11.0.1-3ubuntu1) focal; urgency=medium
7+
8+ * d/p/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch: fix crash with
9+ uncommon lsb_output behavior (LP: #1855686)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 09 Dec 2019 11:03:56 +0100
12+
13 open-vm-tools (2:11.0.1-3) unstable; urgency=medium
14
15 * [c30953f] gitlab-ci: disable reprotest
16diff --git a/debian/control b/debian/control
17index 64ddd6f..6477170 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,7 +1,8 @@
21 Source: open-vm-tools
22 Section: admin
23 Priority: optional
24-Maintainer: Bernd Zeimetz <bzed@debian.org>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Bernd Zeimetz <bzed@debian.org>
27 Build-Depends:
28 debhelper (>= 11~), doxygen, libcunit1-dev,
29 libfuse-dev, libgtkmm-3.0-dev, libgtk-3-dev,
30diff --git a/debian/patches/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch b/debian/patches/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch
31new file mode 100644
32index 0000000..6ed1acf
33--- /dev/null
34+++ b/debian/patches/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch
35@@ -0,0 +1,62 @@
36+From 61b43df047e0a6666590016966b9574af21951a8 Mon Sep 17 00:00:00 2001
37+From: Oliver Kurth <okurth@vmware.com>
38+Date: Thu, 5 Dec 2019 11:34:43 -0800
39+Subject: [PATCH] Avoid vmtoolsd crash in HostInfo.
40+
41+The guest identification code causes vmtoolsd to crash in certain
42+versions of some distros. The crash is caused by recent changes to
43+the lsb_release command. Previously, if the command existed, all
44+of its options worked. Now, some of the options no longer exist.
45+
46+Change the code to check for an lsb_release failure whenever it is
47+invoked.
48+
49+Fix for: https://github.com/vmware/open-vm-tools/issues/390
50+
51+Origin: upstream, https://github.com/vmware/open-vm-tools/commit/61b43df047e0a6666590016966b9574af21951a8
52+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1855686
53+Last-Update: 2019-12-09
54+Note: removed non important whitespace damage from the upstream patch
55+
56+---
57+ open-vm-tools/lib/misc/hostinfoPosix.c | 32 +++++++++++++++-----------
58+ 1 file changed, 19 insertions(+), 13 deletions(-)
59+
60+diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c
61+index 91a44ca89..26c3efd89 100644
62+--- a/open-vm-tools/lib/misc/hostinfoPosix.c
63++++ b/open-vm-tools/lib/misc/hostinfoPosix.c
64+@@ -1334,6 +1334,8 @@ HostinfoLsbRemoveQuotes(char *lsbOutput) // IN/OUT:
65+ {
66+ char *lsbStart = lsbOutput;
67+
68++ ASSERT(lsbStart != NULL);
69++
70+ if (lsbStart[0] == '"') {
71+ char *quoteEnd = strchr(++lsbStart, '"');
72+
73+@@ -1407,13 +1409,17 @@ HostinfoLsb(char ***args) // OUT:
74+
75+ /* LSB Distributor */
76+ lsbOutput = HostinfoGetCmdOutput("/usr/bin/lsb_release -si 2>/dev/null");
77+- (*args)[0] = Util_SafeStrdup(HostinfoLsbRemoveQuotes(lsbOutput));
78+- free(lsbOutput);
79++ if (lsbOutput != NULL) {
80++ (*args)[0] = Util_SafeStrdup(HostinfoLsbRemoveQuotes(lsbOutput));
81++ free(lsbOutput);
82++ }
83+
84+ /* LSB Release */
85+ lsbOutput = HostinfoGetCmdOutput("/usr/bin/lsb_release -sr 2>/dev/null");
86+- (*args)[1] = Util_SafeStrdup(HostinfoLsbRemoveQuotes(lsbOutput));
87+- free(lsbOutput);
88++ if (lsbOutput != NULL) {
89++ (*args)[1] = Util_SafeStrdup(HostinfoLsbRemoveQuotes(lsbOutput));
90++ free(lsbOutput);
91++ }
92+
93+ /* LSB Description */
94+ (*args)[3] = Util_SafeStrdup((*args)[fields]);
95+--
96+2.24.0
97+
98diff --git a/debian/patches/series b/debian/patches/series
99index c9b4b0c..55a1e83 100644
100--- a/debian/patches/series
101+++ b/debian/patches/series
102@@ -3,3 +3,4 @@ debian/max_nic_count
103 debian/scsi-udev-rule
104 89c0d4445_GitHub-Issue-367.-Remove-references-to-deprecated-G_INLINE_FUNC
105 d7d04cf9d_Avoid-securing-disk-device-info-for-ZFS-pools-at-this-time
106+lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch

Subscribers

People subscribed via source and target branches