aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/musl/patches/031-fix-build-regression-in-i386-asm-for-atan2-atan2f.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-08-18 23:24:43 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2019-08-18 23:59:23 +0200
commitb2cb6bb48abbc0521fbd1a928c37f4846427a959 (patch)
treefc225644e3103c0cffc6324aaab4e6674904950d /toolchain/musl/patches/031-fix-build-regression-in-i386-asm-for-atan2-atan2f.patch
parent5d906a656e3f401e24e73938ff0e342d77dcb16a (diff)
downloadupstream-b2cb6bb48abbc0521fbd1a928c37f4846427a959.tar.gz
upstream-b2cb6bb48abbc0521fbd1a928c37f4846427a959.tar.bz2
upstream-b2cb6bb48abbc0521fbd1a928c37f4846427a959.zip
musl: Fix CVE-2019-14697
musl libc through 1.1.23 has an x87 floating-point stack adjustment imbalance, related to the math/i386/ directory. In some cases, use of this library could introduce out-of-bounds writes that are not present in an application's source code. This problem only affects x86 and no other architectures. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit c262daf308e0f0bd93bb5c5ee6238773935079ee)
Diffstat (limited to 'toolchain/musl/patches/031-fix-build-regression-in-i386-asm-for-atan2-atan2f.patch')
-rw-r--r--toolchain/musl/patches/031-fix-build-regression-in-i386-asm-for-atan2-atan2f.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/toolchain/musl/patches/031-fix-build-regression-in-i386-asm-for-atan2-atan2f.patch b/toolchain/musl/patches/031-fix-build-regression-in-i386-asm-for-atan2-atan2f.patch
new file mode 100644
index 0000000000..8c5161b52c
--- /dev/null
+++ b/toolchain/musl/patches/031-fix-build-regression-in-i386-asm-for-atan2-atan2f.patch
@@ -0,0 +1,28 @@
+From 6818c31c9bc4bbad5357f1de14bedf781e5b349e Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Mon, 5 Aug 2019 19:57:07 -0400
+Subject: fix build regression in i386 asm for atan2, atan2f
+
+commit f3ed8bfe8a82af1870ddc8696ed4cc1d5aa6b441 inadvertently removed
+labels that were still needed.
+---
+ src/math/i386/atan2.s | 2 +-
+ src/math/i386/atan2f.s | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/math/i386/atan2.s
++++ b/src/math/i386/atan2.s
+@@ -11,4 +11,4 @@ atan2:
+ jae 1f
+ # subnormal x, return x with underflow
+ fsts 4(%esp)
+- ret
++1: ret
+--- a/src/math/i386/atan2f.s
++++ b/src/math/i386/atan2f.s
+@@ -13,4 +13,4 @@ atan2f:
+ fld %st(0)
+ fmul %st(1)
+ fstps 4(%esp)
+- ret
++1: ret