|
|
b87039 |
From 4ed0af7c73cb597e734223f95846651bfe9c237c Mon Sep 17 00:00:00 2001
|
|
|
b6680e |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
b6680e |
Date: Fri, 1 Mar 2019 09:46:11 +0100
|
|
|
b6680e |
Subject: Fix RELRO flag
|
|
|
b6680e |
|
|
|
b6680e |
RH-Author: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
b6680e |
Message-id: <1551433571-31547-1-git-send-email-mrezanin@redhat.com>
|
|
|
b6680e |
Patchwork-id: 84750
|
|
|
b6680e |
O-Subject: [RHEL-7.7 open-vm-tools PATCH] Fix RELRO flag
|
|
|
b6680e |
Bugzilla: 1678576
|
|
|
b6680e |
RH-Acked-by: Cathy Avery <cavery@redhat.com>
|
|
|
b6680e |
RH-Acked-by: Richard Jones <rjones@redhat.com>
|
|
|
b6680e |
|
|
|
b6680e |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
b6680e |
|
|
|
b6680e |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1678576
|
|
|
b6680e |
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=20410856
|
|
|
b6680e |
Upstream: n/a
|
|
|
b6680e |
|
|
|
b6680e |
rpmdiff for 10.3.0 based open-vm-tools reports partial RELRO on several binaries.
|
|
|
b6680e |
This patch ensure proper hardening is used and files have full RELRO flag.
|
|
|
b6680e |
|
|
|
b6680e |
Signed-off-by: Miroslav Rezanina <mreznanin@redhat.com>
|
|
|
b6680e |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
b6680e |
---
|
|
|
b6680e |
open-vm-tools/configure.ac | 2 +-
|
|
|
b6680e |
open-vm-tools/libDeployPkg/Makefile.am | 2 +-
|
|
|
b6680e |
open-vm-tools/libguestlib/Makefile.am | 2 +-
|
|
|
b6680e |
open-vm-tools/libhgfs/Makefile.am | 2 +-
|
|
|
b6680e |
open-vm-tools/libvmtools/Makefile.am | 2 +-
|
|
|
b6680e |
open-vm-tools/vgauth/lib/Makefile.am | 2 +-
|
|
|
b6680e |
6 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
b6680e |
|
|
|
b87039 |
diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac
|
|
|
b87039 |
index 9aa95ab..f1cc721 100644
|
|
|
b87039 |
--- a/open-vm-tools/configure.ac
|
|
|
b87039 |
+++ b/open-vm-tools/configure.ac
|
|
|
b87039 |
@@ -1459,7 +1459,7 @@ VMTOOLS_LIBS="$BUILDDIR/libvmtools/libvmtools.la $GLIB2_LIBS"
|
|
|
b6680e |
VMTOOLS_CPPFLAGS="-DVMTOOLS_USE_GLIB $GLIB2_CPPFLAGS"
|
|
|
b6680e |
|
|
|
b6680e |
PLUGIN_CPPFLAGS="$VMTOOLS_CPPFLAGS $PLUGIN_CPPFLAGS"
|
|
|
b6680e |
-PLUGIN_LDFLAGS="-Wl,-z,defs -Wl,-lc -Wl,--as-needed -shared -module -avoid-version"
|
|
|
b6680e |
+PLUGIN_LDFLAGS="-Wl,-z,defs -Wl,-lc -Wl,--as-needed -shared -module -avoid-version -Wl,-z,relro,-z,now"
|
|
|
b6680e |
|
|
|
b6680e |
# Installation directories for core services plugins.
|
|
|
b6680e |
TEST_PLUGIN_INSTALLDIR=$datadir/open-vm-tools/tests
|
|
|
b87039 |
diff --git a/open-vm-tools/libDeployPkg/Makefile.am b/open-vm-tools/libDeployPkg/Makefile.am
|
|
|
b87039 |
index a3bcb5e..31ff270 100644
|
|
|
b87039 |
--- a/open-vm-tools/libDeployPkg/Makefile.am
|
|
|
b87039 |
+++ b/open-vm-tools/libDeployPkg/Makefile.am
|
|
|
b6680e |
@@ -39,7 +39,7 @@ libDeployPkg_la_SOURCES += linuxDeploymentUtilities.h
|
|
|
b6680e |
libDeployPkg_la_LDFLAGS =
|
|
|
b6680e |
# We require GCC, so we're fine passing compiler-specific flags.
|
|
|
b6680e |
# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD
|
|
|
b6680e |
-libDeployPkg_la_LDFLAGS += -Wl,-lc
|
|
|
b6680e |
+libDeployPkg_la_LDFLAGS += -Wl,-lc -Wl,-z,relro,-z,now
|
|
|
b6680e |
|
|
|
b6680e |
libDeployPkg_includedir = $(includedir)/libDeployPkg
|
|
|
b6680e |
|
|
|
b87039 |
diff --git a/open-vm-tools/libguestlib/Makefile.am b/open-vm-tools/libguestlib/Makefile.am
|
|
|
b6680e |
index 5181409..a21a3ff 100644
|
|
|
b87039 |
--- a/open-vm-tools/libguestlib/Makefile.am
|
|
|
b87039 |
+++ b/open-vm-tools/libguestlib/Makefile.am
|
|
|
b6680e |
@@ -32,7 +32,7 @@ libguestlib_la_SOURCES += vmGuestLib.c
|
|
|
b6680e |
libguestlib_la_LDFLAGS =
|
|
|
b6680e |
# We require GCC, so we're fine passing compiler-specific flags.
|
|
|
b6680e |
# Needed for OS's that don't link shared libraries against libc by default, e.g. FreeBSD
|
|
|
b6680e |
-libguestlib_la_LDFLAGS += -Wl,-lc
|
|
|
b6680e |
+libguestlib_la_LDFLAGS += -Wl,-lc -Wl,-z,relro,-z,now
|
|
|
b6680e |
|
|
|
b6680e |
libguestlib_includedir = $(includedir)/vmGuestLib
|
|
|
b6680e |
|
|
|
b87039 |
diff --git a/open-vm-tools/libhgfs/Makefile.am b/open-vm-tools/libhgfs/Makefile.am
|
|
|
b6680e |
index 7609145..50573ee 100644
|
|
|
b87039 |
--- a/open-vm-tools/libhgfs/Makefile.am
|
|
|
b87039 |
+++ b/open-vm-tools/libhgfs/Makefile.am
|
|
|
b6680e |
@@ -41,5 +41,5 @@ libhgfs_la_LDFLAGS =
|
|
|
b6680e |
libhgfs_la_LDFLAGS += -Wl,-z,defs
|
|
|
b6680e |
# Needed for OS's that don't link shared libraries against libc by
|
|
|
b6680e |
#default, e.g. FreeBSD
|
|
|
b6680e |
-libhgfs_la_LDFLAGS += -Wl,-lc
|
|
|
b6680e |
+libhgfs_la_LDFLAGS += -Wl,-lc -Wl,-z,relro,-z,now
|
|
|
b6680e |
|
|
|
b87039 |
diff --git a/open-vm-tools/libvmtools/Makefile.am b/open-vm-tools/libvmtools/Makefile.am
|
|
|
b87039 |
index 347b8c7..d58c6e6 100644
|
|
|
b87039 |
--- a/open-vm-tools/libvmtools/Makefile.am
|
|
|
b87039 |
+++ b/open-vm-tools/libvmtools/Makefile.am
|
|
|
b87039 |
@@ -86,5 +86,5 @@ libvmtools_la_LDFLAGS =
|
|
|
b6680e |
libvmtools_la_LDFLAGS += -Wl,-z,defs
|
|
|
b6680e |
# Needed for OS's that don't link shared libraries against libc by
|
|
|
b6680e |
#default, e.g. FreeBSD
|
|
|
b6680e |
-libvmtools_la_LDFLAGS += -Wl,-lc
|
|
|
b6680e |
+libvmtools_la_LDFLAGS += -Wl,-lc -Wl,-z,relro,-z,now
|
|
|
b6680e |
|
|
|
b87039 |
diff --git a/open-vm-tools/vgauth/lib/Makefile.am b/open-vm-tools/vgauth/lib/Makefile.am
|
|
|
b6680e |
index bce97aa..6c0c265 100644
|
|
|
b87039 |
--- a/open-vm-tools/vgauth/lib/Makefile.am
|
|
|
b87039 |
+++ b/open-vm-tools/vgauth/lib/Makefile.am
|
|
|
b6680e |
@@ -59,7 +59,7 @@ libvgauth_la_LDFLAGS =
|
|
|
b6680e |
libvgauth_la_LDFLAGS += -Wl,-z,defs
|
|
|
b6680e |
# Needed for OS's that don't link shared libraries against libc by
|
|
|
b6680e |
#default, e.g. FreeBSD
|
|
|
b6680e |
-libvgauth_la_LDFLAGS += -Wl,-lc
|
|
|
b6680e |
+libvgauth_la_LDFLAGS += -Wl,-lc -Wl,-z,relro,-z,now
|
|
|
b6680e |
|
|
|
b6680e |
# Message catalogs.
|
|
|
b6680e |
install-data-hook:
|
|
|
b6680e |
--
|
|
|
b6680e |
1.8.3.1
|
|
|
b6680e |
|