PATCH: openssl: disable execstack flag to prevent problems with SELinux
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.)
---
meta/recipes-connectivity/openssl/openssl.inc +1 -1
@@ -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', '')}"
meta/recipes-connectivity/openssl/openssl_0.9.8o.bb +1 -1
@@ -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.
Quoted 7 lines · Paul Eggleton
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!
Quoted 44 lines
Signed-off-by Paul Eggleton<[email protected]>---
meta/recipes-connectivity/openssl/openssl.inc +1
-1@@ -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', '')}"meta/recipes-connectivity/openssl/openssl_0.9.8o.bb +1
-2@@ -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 47This 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
[email protected]
https://lists.yoctoproject.org/listinfo/poky
Quoted 8 lines · On Thursday 02 December 2010 18:46:10 you wrote:
Quoted 7 lines · Paul Eggleton
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.)
Quoted 4 lines
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.