summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libtar/files/CVE-2021-33640-CVE-2021-33645-CVE-2021-33646.patch
diff options
context:
space:
mode:
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.patch42
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 @@
1From e590423f62cf5bc922ff4a1f7eab9bf7d65ee472 Mon Sep 17 00:00:00 2001
2From: Kamil Dudka <kdudka@redhat.com>
3Date: Tue, 4 Oct 2022 10:39:35 +0200
4Subject: [PATCH] free memory allocated by gnu_long* fields
5
6Authored by Kamil Dudka <kdudka@redhat.com>.
7
8meta-openembedded uses Debian's release tarball [1]. Debian uses
9repo.or.cz/libtar.git as their upstream [2]. repo.or.cz/libtar.git has
10been inactive since 2013 [3].
11
12CVE: CVE-2021-33640 CVE-2021-33645 CVE-2021-33646
13
14Upstream-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
20Signed-off-by: Katariina Lounento <katariina.lounento@vaisala.com>
21---
22 lib/handle.c | 7 +++++--
23 1 file changed, 5 insertions(+), 2 deletions(-)
24
25diff --git a/lib/handle.c b/lib/handle.c
26index 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;