summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/musl/musl
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-28 19:21:12 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-01 07:15:33 +0000
commitc81a204f41bd018964d7ef096087ace5c78365c3 (patch)
tree555d1f594e572be301654aec546d45cc0a16c795 /meta/recipes-core/musl/musl
parente914c03964c540493523b18660f8a4eaeec78e3d (diff)
downloadopenembedded-core-contrib-c81a204f41bd018964d7ef096087ace5c78365c3.tar.gz
musl: Fix out of bounds data access in dlopen
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/musl/musl')
-rw-r--r--meta/recipes-core/musl/musl/out_of_bounds_read.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/musl/out_of_bounds_read.patch b/meta/recipes-core/musl/musl/out_of_bounds_read.patch
new file mode 100644
index 0000000000..a681cc284e
--- /dev/null
+++ b/meta/recipes-core/musl/musl/out_of_bounds_read.patch
@@ -0,0 +1,20 @@
+Fix out of bounds read
+
+self->dtv hasn't been extended yet
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+diff --git a/ldso/dynlink.c b/ldso/dynlink.c
+index e2c3259f..b23ea0df 100644
+--- a/ldso/dynlink.c
++++ b/ldso/dynlink.c
+@@ -1374,7 +1376,7 @@ static void install_new_tls(void)
+ }
+ /* Install new dtls into the enlarged, uninstalled dtv copies. */
+ for (p=head; ; p=p->next) {
+- if (!p->tls_id || self->dtv[p->tls_id]) continue;
++ if (p->tls_id <= old_cnt) continue;
+ unsigned char *mem = p->new_tls;
+ for (j=0; j<i; j++) {
+ unsigned char *new = mem;