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 1558516 - ksmctl is built without any hardening flags set [rhel-7.6]
Summary: ksmctl is built without any hardening flags set [rhel-7.6]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Rezanina
QA Contact: Chao Yang
URL:
Whiteboard:
Depends On:
Blocks: 1558895
TreeView+ depends on / blocked
 
Reported: 2018-03-20 11:32 UTC by Daniel Berrangé
Modified: 2018-11-01 11:07 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-rhev-2.12.0-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1558520 1558895 (view as bug list)
Environment:
Last Closed: 2018-11-01 11:07:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1549657 0 unspecified CLOSED qemu: Partial injection of Fedora build flags 2021-02-22 00:41:40 UTC

Internal Links: 1549657

Description Daniel Berrangé 2018-03-20 11:32:18 UTC
Description of problem:
The Red Hat distro RPM config defines various hardening flags that all binaries in RHEL should be built with

# rpmbuild  --eval '%{optflags}'
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic

# rpmbuild  --eval '%{__global_ldflags}'
-Wl,-z,relro 

The ksmctl binary is being built without honouring these flags:

eg the qemu-kvm.spec just runs:

  gcc %{SOURCE6} -O2 -g -o ksmctl


This needs to be made to honour the hardenin flags by using

  gcc %{SOURCE6} $RPM_OPT_FLAGS $RPM_LD_FLAGS -o ksmctl

Also note that earlier in the specfile, it cull FORTIFY_SOURCE=2 from the %{optflags}:


# QEMU already knows how to set _FORTIFY_SOURCE
%global optflags %(echo %{optflags} | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')


this needs to be removed, so that the ksm build still sees _FORTIFY_SOURCE

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.10.0-21.el7

Comment 2 Jeff Nelson 2018-03-20 17:50:06 UTC
If needed, please clone for qemu-kvm-ma.

Comment 6 Miroslav Rezanina 2018-06-01 09:00:39 UTC
Fix included in qemu-kvm-rhev-2.12.0-3.el7

Comment 9 errata-xmlrpc 2018-11-01 11:07:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3443


Note You need to log in before you can comment on or make changes to this bug.