Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1346448

Summary: [ESXi][RHEL7.3]open-vm-tools SSL/TLS certificates needs to be unique per instance or install but this value is created at install-time and not during the first run.
Product: Red Hat Enterprise Linux 7 Reporter: Kurt Seifried <kseifried>
Component: open-vm-toolsAssignee: Cathy Avery <cavery>
Status: CLOSED CURRENTRELEASE QA Contact: ldu <ldu>
Severity: medium Docs Contact:
Priority: high    
Version: 7.1CC: cavery, gveitmic, jsavanyo, ldu, mrezanin, ravindrakumar, ribarry, rjones, vmware-gos-qa, yacao, ybhasin
Target Milestone: rcKeywords: ZStream
Target Release: 7.8   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1813246 1813247 1813912 1813913 (view as bug list) Environment:
Last Closed: 2020-04-15 12:48:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1667549    
Bug Blocks: 1346019, 1782469, 1797441, 1813246, 1813247, 1813912, 1813913    
Attachments:
Description Flags
RHEL-7 Missing code none

Description Kurt Seifried 2016-06-14 20:33:13 UTC
Version-Release number of selected component (if applicable):

open-vm-tools-9.10.2-4.el7.x86_64.rpm

How reproducible:

Always.

post install:
/usr/bin/vmware-guestproxycerttool -g &> /dev/null || /bin/true

-g, --generate_key_cert   Regenerate the server key/cert, the old
                          key/cert will be replaced.



Steps to Reproduce:
1. Install to a container or image.
2. Run new instance of container or image.
3.

Actual results:

All container and image instances share the same key/certificate.

Expected results:

Each instance should receive a unique key/certificate.

Additional info:

This bug is being file because Product Security considers "first run problems" to be bugs with the source package and with the container or image only in the aggregate. This view is in collaboration with upstream Fedora. See: https://fedorahosted.org/fpc/ticket/506

The recommended resolution for services is to follow the "First-time Service Setup" pattern (see: https://fedoraproject.org/wiki/Packaging:Initial_Service_Setup ). Other packages may should use a runtime check and generation or similar procedure.

Comment 2 Ravindra Kumar 2016-06-15 18:47:08 UTC
Rich, I will take care of this for Fedora and you will have to help with RHEL.

Kurt, thanks for the details. I have a question though. None of the links talk about who would remove/cleanup these system specific setup files? Is the cleanup of these files still a responsibility of RPM? (FYI, I have also raised this question on https://fedorahosted.org/fpc/ticket/506)

Comment 3 Kurt Seifried 2016-06-16 03:47:57 UTC
(In reply to Ravindra Kumar from comment #2)
> Rich, I will take care of this for Fedora and you will have to help with
> RHEL.
> 
> Kurt, thanks for the details. I have a question though. None of the links
> talk about who would remove/cleanup these system specific setup files? Is
> the cleanup of these files still a responsibility of RPM? (FYI, I have also
> raised this question on https://fedorahosted.org/fpc/ticket/506)

That is more of a programming/BU question, the only security concern is it needs to be unique (so first run), as long as you get there without creating a new security flaw I'm happy =). As for cleanup it seems like postinstall could still do that, we'd have the .rpmsave stuff in case right?

Comment 4 Kurt Seifried 2016-06-25 03:09:25 UTC
Just a note, the first run issue can also be handled through orchestration (e.g. OpenStack, CloudForms, OpenShift Enterprise and so on). But the certificate creation MUST be removed from the rpm install scripts.

Comment 5 Ravindra Kumar 2017-03-29 20:30:38 UTC
(In reply to Kurt Seifried from comment #3)
> As for cleanup it seems like postinstall could still do
> that, we'd have the .rpmsave stuff in case right?

You seem to be talking about upgrade and I was referring to uninstall.

For cleanup in uninstall, I will have to hard code the assumptions about the file paths. I will take a look at it.

Comment 6 Cathy Avery 2018-07-05 18:02:33 UTC
I'm assigning this bug to myself. Ravindra please continue to work this issue.

Comment 7 Ravindra Kumar 2018-08-13 04:15:22 UTC
I have committed following 2 changes to fix this in Fedora:

1. https://src.fedoraproject.org/rpms/open-vm-tools/c/3f6bfd351da6d80f07fffc139b2d52e30b1bc9fe?branch=master
2. https://src.fedoraproject.org/rpms/open-vm-tools/c/6296e846e8f8abcb374b3fd1019dbff62b1dfeb1?branch=master

Both changes together should address this issue.

Comment 8 Cathy Avery 2018-08-13 11:34:09 UTC
OK moving this BZ to POST. The fix appears to be in 10.3.0-3. It will be picked up in RHEL 7.7 when Mirek rebases.

Comment 9 Ravindra Kumar 2018-08-14 00:19:00 UTC
(In reply to Cathy Avery from comment #8)
> The fix appears to be in 10.3.0-3.

Actually, there was an additional change. Both the fixes are in open-vm-tools-10.3.0-4.

Comment 12 Ravindra Kumar 2018-11-28 18:29:45 UTC
I'd like to let you know that we have changed our direction regarding this tool. We are going to remove vmware-guestproxycerttool in very near future from open-vm-tools. So, another potential fix for this is to remove vmware-guestproxycerttool and it's call from the postinstall step in the spec file.

You have 2 options at this point:

1. Either follow the Fedora fix I provided earlier
-OR-
2. Remove vmware-guestproxycerttool and its invocation from the RPM postinstall step

Comment 15 ldu 2019-06-04 06:29:23 UTC
Hi Ravindra,
For this issue, I am not sure how to verify it, could you help give clearly steps?
Install RHEL7 on ESXi host, then install container in RHEL guest, does this right?
how to check the key/certificate?

Thanks very much!
Lili

Comment 16 Ravindra Kumar 2019-06-04 19:20:12 UTC
Simply check if there are certs generated under /etc/vmware-tools/GuestProxyData directory after installing open-vm-tools. There should be none unless you start vmtoolsd service.

Comment 17 ldu 2019-06-05 03:29:28 UTC
(In reply to Ravindra Kumar from comment #16)
> Simply check if there are certs generated under
> /etc/vmware-tools/GuestProxyData directory after installing open-vm-tools.
> There should be none unless you start vmtoolsd service.

@Ravindra, thanks for provide info!
I test with open-vm-tools.x86_64 0:10.3.0-2.el7 , There is no certs under etc/vmware-tools/GuestProxyData directory after uninstall open-vm-tools, but after install open-vm-tools, even not start vmtoolsd service,certs would be generated under etc/vmware-tools/GuestProxyData directory. maybe this version open-vm-tools not contain your patch in commnet 7.

@Cathy, as this bug fixed in version open-vm-tools-10.3.0-4, but now the OVT version in RHEL7.7 is open-vm-tools.x86_64 0:10.3.0-2.el7 , could you help confirm the patch in comment 7 contain in open-vm-tools.x86_64 0:10.3.0-2.el7 ?

Comment 22 Miroslav Rezanina 2019-06-06 06:31:47 UTC
Created attachment 1577783 [details]
RHEL-7 Missing code

Attaching changes missing in RHEL 7

Comment 25 Cathy Avery 2019-06-06 16:03:55 UTC
Ravindra,

We are missing patch https://src.fedoraproject.org/rpms/open-vm-tools/c/3f6bfd351da6d80f07fffc139b2d52e30b1bc9fe?branch=master in RHEL7 and are mulling over if we should defer to z-stream or make it a blocker. How important is the presence of this patch to customers?

Thanks,

Cathy

Comment 26 Ravindra Kumar 2019-06-06 17:48:08 UTC
This bug was actually raised by RH security team. So, I think they need to make this call.

From our perspective, it is not important to block a release or require any special patch because the component that uses the certificate in question is unused functionality.

Comment 27 Rick Barry 2019-06-06 18:08:37 UTC
(In reply to Ravindra Kumar from comment #26)
> This bug was actually raised by RH security team. So, I think they need to
> make this call.
> 
> From our perspective, it is not important to block a release or require any
> special patch because the component that uses the certificate in question is
> unused functionality.

Ravindra, thanks for the quick response.

Does your comment apply to the entire content of the patch in comment 25? I
think there's other code besides the fix for this particular security bug.

Can you re-check and let us know if there's anything else in that patch that
we should block the release for?

Thanks!

Comment 28 Ravindra Kumar 2019-06-06 18:57:13 UTC
(In reply to Rick Barry from comment #27)
> Does your comment apply to the entire content of the patch in comment 25? I
> think there's other code besides the fix for this particular security bug.
>
> Can you re-check and let us know if there's anything else in that patch that
> we should block the release for?

This patch - https://src.fedoraproject.org/rpms/open-vm-tools/c/3f6bfd351da6d80f07fffc139b2d52e30b1bc9fe?branch=master - intends to fix only this bug.  There is nothing else in that patch.

Comment 29 Rick Barry 2019-06-06 19:36:28 UTC
Based on comment 26 and 28, the missing patch provides a fix only for this bug
and does not impact critical open-vm-tools functionality, so it's not a blocker
for RHEL 7.7. 

We'll defer this change to RHEL 7.8 where we'll either pull in this patch or
rebase to 10.3.10 (TBD).

Comment 33 Cathy Avery 2020-01-12 21:18:10 UTC
@Ravindra

https://src.fedoraproject.org/rpms/open-vm-tools/c/3f6bfd351da6d80f07fffc139b2d52e30b1bc9fe?branch=master is a Fedora only patch. Meaning there is no upstream equivalent. What version of Fedora?

Thanks,

Cathy

Comment 36 Ravindra Kumar 2020-01-13 07:44:15 UTC
(In reply to Cathy Avery from comment #33)
> @Ravindra
> 
> https://src.fedoraproject.org/rpms/open-vm-tools/c/
> 3f6bfd351da6d80f07fffc139b2d52e30b1bc9fe?branch=master is a Fedora only
> patch. Meaning there is no upstream equivalent.

There was no upstream fix because entire change was in the packaging scripts. Please note that this fix is not needed/applicable to open-vm-tools 11.0.0 and later because the service that need the SSL certs has been removed from the newer versions.

> What version of Fedora?

Patch was applied to multiple branches of Fedora, e.g. Fedora 27 too https://src.fedoraproject.org/rpms/open-vm-tools/c/3f6bfd351da6d80f07fffc139b2d52e30b1bc9fe?branch=f27.

Comment 58 Cathy Avery 2020-04-15 12:48:27 UTC
Fixed in 7.9 rebase BZ 1806675