* PATCH: openssl: disable execstack flag to prevent problems with SELinux
@ 2010-11-19 10:23 Paul Eggleton
2010-12-02 18:46 ` Saul Wold
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2010-11-19 10:23 UTC (permalink / raw)
To: poky
openssl: disable execstack flag to prevent problems with SELinux
The execstack flag gets set on libcrypto.so by default which causes SELinux
to prevent it from being loaded on systems using SELinux, which includes
Fedora. This patch disables the execstack flag. (Note: Red Hat do this in
their openssl packaging.)
Signed-off-by: Paul Eggleton <paul.eggleton@intel.com>
---
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index da90456..15144b1 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -15,7 +15,7 @@ S = "${WORKDIR}/openssl-${PV}"
AR_append = " r"
CFLAG = "${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
- -DTERMIO ${FULL_OPTIMIZATION} -Wall"
+ -DTERMIO ${FULL_OPTIMIZATION} -Wall -Wa,--noexecstack"
# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
diff --git a/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb b/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
index 3949540..fe02272 100644
--- a/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
+++ b/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
@@ -1,6 +1,6 @@
require openssl.inc
-PR = "r0"
+PR = "r1"
SRC_URI += "file://debian/ca.patch \
file://debian/config-hurd.patch;apply=no \
file://debian/debian-targets.patch \
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: PATCH: openssl: disable execstack flag to prevent problems with SELinux
2010-11-19 10:23 PATCH: openssl: disable execstack flag to prevent problems with SELinux Paul Eggleton
@ 2010-12-02 18:46 ` Saul Wold
2010-12-03 16:09 ` Paul Eggleton
0 siblings, 1 reply; 3+ messages in thread
From: Saul Wold @ 2010-12-02 18:46 UTC (permalink / raw)
To: Paul Eggleton; +Cc: poky@yoctoproject.org
On 11/19/2010 02:23 AM, Paul Eggleton wrote:
> openssl: disable execstack flag to prevent problems with SELinux
>
> The execstack flag gets set on libcrypto.so by default which causes SELinux
> to prevent it from being loaded on systems using SELinux, which includes
> Fedora. This patch disables the execstack flag. (Note: Red Hat do this in
> their openssl packaging.)
>
Should this be a native only CFLAG change?
Since we are not SELinux on the target (that might be a layer someone
else might provide).
Sau!
> Signed-off-by: Paul Eggleton<paul.eggleton@intel.com>
>
> ---
> diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
> index da90456..15144b1 100644
> --- a/meta/recipes-connectivity/openssl/openssl.inc
> +++ b/meta/recipes-connectivity/openssl/openssl.inc
> @@ -15,7 +15,7 @@ S = "${WORKDIR}/openssl-${PV}"
>
> AR_append = " r"
> CFLAG = "${@base_conditional('SITEINFO_ENDIANESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
> - -DTERMIO ${FULL_OPTIMIZATION} -Wall"
> + -DTERMIO ${FULL_OPTIMIZATION} -Wall -Wa,--noexecstack"
>
> # -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
> CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
> diff --git a/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb b/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
> index 3949540..fe02272 100644
> --- a/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
> +++ b/meta/recipes-connectivity/openssl/openssl_0.9.8o.bb
> @@ -1,6 +1,6 @@
> require openssl.inc
>
> -PR = "r0"
> +PR = "r1"
> SRC_URI += "file://debian/ca.patch \
> file://debian/config-hurd.patch;apply=no \
> file://debian/debian-targets.patch \
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: openssl: disable execstack flag to prevent problems with SELinux
2010-12-02 18:46 ` Saul Wold
@ 2010-12-03 16:09 ` Paul Eggleton
0 siblings, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2010-12-03 16:09 UTC (permalink / raw)
To: Wold, Saul; +Cc: poky@yoctoproject.org
On Thursday 02 December 2010 18:46:10 you wrote:
> On 11/19/2010 02:23 AM, Paul Eggleton wrote:
> > openssl: disable execstack flag to prevent problems with SELinux
> >
> > The execstack flag gets set on libcrypto.so by default which causes SELinux
> > to prevent it from being loaded on systems using SELinux, which includes
> > Fedora. This patch disables the execstack flag. (Note: Red Hat do this in
> > their openssl packaging.)
> >
> Should this be a native only CFLAG change?
>
> Since we are not SELinux on the target (that might be a layer someone
> else might provide).
AFAICT there's no benefit to leaving the execstack flag enabled for this library. However if we want to take the conservative approach and leave it as-is for the target that's fine. Let me know if that's the case and I will produce a new patch.
Cheers,
Paul
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-03 16:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 10:23 PATCH: openssl: disable execstack flag to prevent problems with SELinux Paul Eggleton
2010-12-02 18:46 ` Saul Wold
2010-12-03 16:09 ` Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.