|
|
b6680e |
From 7c204ac55d3e4e86b7ebaf3e83b18da565e2a384 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 |
|
|
|
b6680e |
diff --git a/configure.ac b/configure.ac
|
|
|
b6680e |
index fe671ce..eaff8c9 100644
|
|
|
b6680e |
--- a/configure.ac
|
|
|
b6680e |
+++ b/configure.ac
|
|
|
b6680e |
@@ -1523,7 +1523,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
|
|
|
b6680e |
diff --git a/libDeployPkg/Makefile.am b/libDeployPkg/Makefile.am
|
|
|
b6680e |
index b4d5c9d..f4e8f8b 100644
|
|
|
b6680e |
--- a/libDeployPkg/Makefile.am
|
|
|
b6680e |
+++ b/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 |
|
|
|
b6680e |
diff --git a/libguestlib/Makefile.am b/libguestlib/Makefile.am
|
|
|
b6680e |
index 5181409..a21a3ff 100644
|
|
|
b6680e |
--- a/libguestlib/Makefile.am
|
|
|
b6680e |
+++ b/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 |
|
|
|
b6680e |
diff --git a/libhgfs/Makefile.am b/libhgfs/Makefile.am
|
|
|
b6680e |
index 7609145..50573ee 100644
|
|
|
b6680e |
--- a/libhgfs/Makefile.am
|
|
|
b6680e |
+++ b/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 |
|
|
|
b6680e |
diff --git a/libvmtools/Makefile.am b/libvmtools/Makefile.am
|
|
|
b6680e |
index 1971942..6a4ca74 100644
|
|
|
b6680e |
--- a/libvmtools/Makefile.am
|
|
|
b6680e |
+++ b/libvmtools/Makefile.am
|
|
|
b6680e |
@@ -91,5 +91,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 |
|
|
|
b6680e |
diff --git a/vgauth/lib/Makefile.am b/vgauth/lib/Makefile.am
|
|
|
b6680e |
index bce97aa..6c0c265 100644
|
|
|
b6680e |
--- a/vgauth/lib/Makefile.am
|
|
|
b6680e |
+++ b/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 |
|