diff options
Diffstat (limited to 'meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch')
-rw-r--r-- | meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch b/meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch new file mode 100644 index 000000000..0a2773fae --- /dev/null +++ b/meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From e590423f62cf5bc922ff4a1f7eab9bf7d65ee472 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kamil Dudka <kdudka@redhat.com> | ||
3 | Date: Tue, 4 Oct 2022 10:39:35 +0200 | ||
4 | Subject: [PATCH] free memory allocated by gnu_long* fields | ||
5 | |||
6 | Authored by Kamil Dudka <kdudka@redhat.com>. | ||
7 | |||
8 | meta-openembedded uses Debian's release tarball [1]. Debian uses | ||
9 | repo.or.cz/libtar.git as their upstream [2]. repo.or.cz/libtar.git has | ||
10 | been inactive since 2013 [3]. | ||
11 | |||
12 | CVE: CVE-2021-33640 CVE-2021-33645 CVE-2021-33646 | ||
13 | |||
14 | Upstream-Status: Inactive-Upstream [lastrelease: 2013 lastcommit: 2013] | ||
15 | |||
16 | [1] https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libtar/libtar_1.2.20.bb?h=master#n8 | ||
17 | [2] http://svn.kibibyte.se/libtar/trunk/debian/control (rev 51; not tagged) | ||
18 | [3] https://repo.or.cz/libtar.git/shortlog/refs/heads/master | ||
19 | |||
20 | Signed-off-by: Katariina Lounento <katariina.lounento@vaisala.com> | ||
21 | --- | ||
22 | lib/handle.c | 7 +++++-- | ||
23 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/lib/handle.c b/lib/handle.c | ||
26 | index 28a7dc2..18bd8dc 100644 | ||
27 | --- a/lib/handle.c | ||
28 | +++ b/lib/handle.c | ||
29 | @@ -122,8 +122,11 @@ tar_close(TAR *t) | ||
30 | libtar_hash_free(t->h, ((t->oflags & O_ACCMODE) == O_RDONLY | ||
31 | ? free | ||
32 | : (libtar_freefunc_t)tar_dev_free)); | ||
33 | - if (t->th_pathname != NULL) | ||
34 | - free(t->th_pathname); | ||
35 | + | ||
36 | + free(t->th_pathname); | ||
37 | + free(t->th_buf.gnu_longname); | ||
38 | + free(t->th_buf.gnu_longlink); | ||
39 | + | ||
40 | free(t); | ||
41 | |||
42 | return i; | ||