diff options
| author | Khem Raj <raj.khem@gmail.com> | 2019-02-28 19:21:12 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-02 16:49:07 +0000 |
| commit | 3c43e5b659f53ad62c8893f63b6b61104b701e48 (patch) | |
| tree | 0eea90d68f77676068daed5e97d9db7b1f1948c8 | |
| parent | 744ce04ddd6cd0b8496cc2261ac4288ec5ff4108 (diff) | |
| download | poky-3c43e5b659f53ad62c8893f63b6b61104b701e48.tar.gz | |
musl: Fix out of bounds data access in dlopen
(From OE-Core rev: c81a204f41bd018964d7ef096087ace5c78365c3)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/musl/musl/out_of_bounds_read.patch | 20 | ||||
| -rw-r--r-- | meta/recipes-core/musl/musl_git.bb | 1 |
2 files changed, 21 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 @@ | |||
| 1 | Fix out of bounds read | ||
| 2 | |||
| 3 | self->dtv hasn't been extended yet | ||
| 4 | |||
| 5 | Upstream-Status: Pending | ||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | |||
| 8 | diff --git a/ldso/dynlink.c b/ldso/dynlink.c | ||
| 9 | index e2c3259f..b23ea0df 100644 | ||
| 10 | --- a/ldso/dynlink.c | ||
| 11 | +++ b/ldso/dynlink.c | ||
| 12 | @@ -1374,7 +1376,7 @@ static void install_new_tls(void) | ||
| 13 | } | ||
| 14 | /* Install new dtls into the enlarged, uninstalled dtv copies. */ | ||
| 15 | for (p=head; ; p=p->next) { | ||
| 16 | - if (!p->tls_id || self->dtv[p->tls_id]) continue; | ||
| 17 | + if (p->tls_id <= old_cnt) continue; | ||
| 18 | unsigned char *mem = p->new_tls; | ||
| 19 | for (j=0; j<i; j++) { | ||
| 20 | unsigned char *new = mem; | ||
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb index f1052278c8..6a72b7d3bc 100644 --- a/meta/recipes-core/musl/musl_git.bb +++ b/meta/recipes-core/musl/musl_git.bb | |||
| @@ -15,6 +15,7 @@ PV = "${BASEVER}+git${SRCPV}" | |||
| 15 | SRC_URI = "git://git.musl-libc.org/musl \ | 15 | SRC_URI = "git://git.musl-libc.org/musl \ |
| 16 | file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ | 16 | file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \ |
| 17 | file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \ | 17 | file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \ |
| 18 | file://out_of_bounds_read.patch \ | ||
| 18 | " | 19 | " |
| 19 | 20 | ||
| 20 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
