Skip to contentSkip to conversation

polarssl: security bump to version 1.2.12

PATCH New Gustavo Zacarias 2 participants 6 messages Oct 27, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 polarssl: security bump to version 1.2.12

Fixes several memory leaks.
No assigned CVE or Polar-SA yet.

---
 package/polarssl/polarssl.hash | 5 ++---
 package/polarssl/polarssl.mk   | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
package/polarssl/polarssl.hash +2 -3
index ca437ac..9769788 100644
@@ -1,3 +1,2 @@
-# From https://polarssl.org/tech-updates/releases/polarssl-1.2.11-released
-sha1	40cb3a833245273946c2075e6c948bbcda8a1be9	polarssl-1.2.11-gpl.tgz
-sha256	b3e9d059c687980976b468d8260f658e9003aede1dbc4a918526e90abdaa7d75	polarssl-1.2.11-gpl.tgz
+# From https://polarssl.org/tech-updates/releases/polarssl-1.2.12-released
+sha256	63dd60e78d25c438648607bb177b063dcf5fbf3ced9ee794fcb165d101940131	polarssl-1.2.12-gpl.tgz
package/polarssl/polarssl.mk +1 -1
index 21bf160..7c27505 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 POLARSSL_SITE = https://polarssl.org/code/releases
-POLARSSL_VERSION = 1.2.11
+POLARSSL_VERSION = 1.2.12
 POLARSSL_SOURCE = polarssl-$(POLARSSL_VERSION)-gpl.tgz
 POLARSSL_CONF_OPTS = \
 	-DENABLE_PROGRAMS=$(if $(BR2_PACKAGE_POLARSSL_PROGRAMS),ON,OFF)
Signature · 1 line
2.0.4
#1 lore raw

PATCH 2/2 polarssl: disable assembly for more scenarios

Disable assembly optimizations for:
Microblaze in general (previously a patch). ARM with debugging in Thumb1/2 mode. This one fixes:
http://autobuild.buildroot.net/results/31e/31e8c4e29d51039cd5d213c2fe176a9cc39879da/

Do so in a nicer way with a one-liner sed and drop the patch.

And rename patches around, numbering was off.

---
 ...t-suite.patch => polarssl-0001-no-test-suite.patch} |  0
 ...e-the-standard-CMake-flag-to-drive-the-share.patch} |  0
 .../polarssl/polarssl-02-disable-microblaze-asm.patch  | 18 ------------------
 package/polarssl/polarssl.mk                           | 12 ++++++++++++
 4 files changed, 12 insertions(+), 18 deletions(-)
 rename package/polarssl/{polarssl-01-no-test-suite.patch => polarssl-0001-no-test-suite.patch} (100%)
 rename package/polarssl/{polarssl-0003-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch => polarssl-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch} (100%)
 delete mode 100644 package/polarssl/polarssl-02-disable-microblaze-asm.patch
package/polarssl/polarssl-0001-no-test-suite.patch renamed from package/polarssl/polarssl-01-no-test-suite.patch +0 -0
similarity index 100%
rename from package/polarssl/polarssl-01-no-test-suite.patch
rename to package/polarssl/polarssl-0001-no-test-suite.patch
package/polarssl/polarssl-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch renamed from package/polarssl/polarssl-0003-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch +0 -0
similarity index 100%
rename from package/polarssl/polarssl-0003-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
rename to package/polarssl/polarssl-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
package/polarssl/polarssl-02-disable-microblaze-asm.patch deleted +0 -18
deleted file mode 100644
index e90e12d..0000000
@@ -1,18 +0,0 @@
-Microblaze assembly seems to be broken, fixes:
-
-http://autobuild.buildroot.net/results/4d5/4d54958ded61a0d929d992e4ca0bb31c996953cb/
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
-diff -Nura polarssl-1.2.11.orig/include/polarssl/bn_mul.h polarssl-1.2.11/include/polarssl/bn_mul.h
---- polarssl-1.2.11.orig/include/polarssl/bn_mul.h	2014-07-30 15:47:27.381658434 -0300
-+++ polarssl-1.2.11/include/polarssl/bn_mul.h	2014-07-30 15:48:52.616543074 -0300
-@@ -480,7 +480,7 @@
- 
- #endif /* SPARCv8 */
- 
--#if defined(__microblaze__) || defined(microblaze)
-+#if 0 && defined(__microblaze__) || defined(microblaze)
- 
- #define MULADDC_INIT                    \
-     asm(                                \
package/polarssl/polarssl.mk +12 -0
index 7c27505..046c6bf 100644
@@ -14,4 +14,16 @@ POLARSSL_INSTALL_STAGING = YES
 POLARSSL_LICENSE = GPLv2
 POLARSSL_LICENSE_FILES = LICENSE
 
+define POLARSSL_DISABLE_ASM
+	$(SED) '/^#define POLARSSL_HAVE_ASM/d' $(@D)/include/polarssl/config.h
+endef
+
+# ARM in thumb mode breaks debugging with asm optimizations
+# Microblaze asm optimizations are broken in general
+ifeq ($(BR2_ENABLE_DEBUG)$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),yy)
+POLARSSL_POST_CONFIGURE_HOOKS += POLARSSL_DISABLE_ASM
+else ifeq ($(BR2_microblaze),y)
+POLARSSL_POST_CONFIGURE_HOOKS += POLARSSL_DISABLE_ASM
+endif
+
 $(eval $(cmake-package))
Signature · 1 line
2.0.4
#2 lore raw

PATCH 2/2 polarssl: disable assembly for more scenarios

Dear Gustavo Zacarias,

package/polarssl/polarssl.mk POLARSSL_INSTALL_STAGING = YES · line 24

Quoted 4 lines · Gustavo Zacarias
package/polarssl/polarssl.mk +4 -0
+# ARM in thumb mode breaks debugging with asm optimizations
+# Microblaze asm optimizations are broken in general
+ifeq ($(BR2_ENABLE_DEBUG)$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),yy)
+POLARSSL_POST_CONFIGURE_HOOKS += POLARSSL_DISABLE_ASM

It's not really great to have to build things differently debugging on BR2_ENABLE_DEBUG, because the prompt of BR2_ENABLE_DEBUG is "build packages with debugging symbols". So the user may expect that we build the same set of features, just with debugging symbols.

Though I agree that with BR2_ENABLE_DEBUG also activating --enable-debug, a lot more than just debugging symbols actually happens.

Therefore, committed, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/2 polarssl: disable assembly for more scenarios

Quoted 9 lines · Thomas Petazzoni

It's not really great to have to build things differently debugging on BR2_ENABLE_DEBUG, because the prompt of BR2_ENABLE_DEBUG is "build packages with debugging symbols". So the user may expect that we build the same set of features, just with debugging symbols.

Though I agree that with BR2_ENABLE_DEBUG also activating --enable-debug, a lot more than just debugging symbols actually happens.

Therefore, committed, thanks!

Well i'm not very happy to build things differently (asm vs no asm) if debugging is on since it can change the result and make it pointless, but it wouldn't be too good to disable asm in general for thumb either so i threw the dice on the lesser evil.
Regards.

#4 lore raw

PATCH 2/2 polarssl: disable assembly for more scenarios

Dear Gustavo Zacarias,

Quoted 8 lines · Gustavo Zacarias
Quoted 8 lines

It's not really great to have to build things differently debugging on BR2_ENABLE_DEBUG, because the prompt of BR2_ENABLE_DEBUG is "build packages with debugging symbols". So the user may expect that we build the same set of features, just with debugging symbols.

Though I agree that with BR2_ENABLE_DEBUG also activating --enable-debug, a lot more than just debugging symbols actually happens.

Quoted 6 lines
Quoted 1 line

Therefore, committed, thanks!

Well i'm not very happy to build things differently (asm vs no asm) if debugging is on since it can change the result and make it pointless, but it wouldn't be too good to disable asm in general for thumb either so i threw the dice on the lesser evil.

Yeah, I'm fine with the trade-off as well.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/2 polarssl: security bump to version 1.2.12

In reply to Gustavo Zacarias

Dear Gustavo Zacarias,

Quoted 8 lines · Gustavo Zacarias

Fixes several memory leaks.
No assigned CVE or Polar-SA yet.

---
 package/polarssl/polarssl.hash | 5 ++---
 package/polarssl/polarssl.mk   | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

Applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com