1 |
commit: 117cb1fe33767577c267e12a721e7d47781edd85 |
2 |
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 29 18:07:42 2018 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 29 18:07:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=117cb1fe |
7 |
|
8 |
app-forensics/sleuthkit: backport fix for CVE-2018-19497 to 4.6.4 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/661160 |
11 |
Bug: https://github.com/sleuthkit/sleuthkit/pull/1374 |
12 |
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org> |
13 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
14 |
|
15 |
.../sleuthkit-4.6.4-CVE-2018-19497-backport.patch | 83 ++++++++++++++++++++++ |
16 |
...hkit-4.6.4.ebuild => sleuthkit-4.6.4-r1.ebuild} | 1 + |
17 |
2 files changed, 84 insertions(+) |
18 |
|
19 |
diff --git a/app-forensics/sleuthkit/files/sleuthkit-4.6.4-CVE-2018-19497-backport.patch b/app-forensics/sleuthkit/files/sleuthkit-4.6.4-CVE-2018-19497-backport.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..3ed90477481 |
22 |
--- /dev/null |
23 |
+++ b/app-forensics/sleuthkit/files/sleuthkit-4.6.4-CVE-2018-19497-backport.patch |
24 |
@@ -0,0 +1,83 @@ |
25 |
+From dd679ad1d855e7f69a887eb343bb53d49dc664e7 Mon Sep 17 00:00:00 2001 |
26 |
+From: Jordy Zomer <zome8499@××××××××××××××××××××.nl> |
27 |
+Date: Sat, 24 Nov 2018 12:19:38 +0100 |
28 |
+Subject: [PATCH 1/3] Fix CVE-2018-19497. |
29 |
+ |
30 |
+An issue was discovered in The Sleuth Kit (TSK) through 4.6.4. |
31 |
+The "tsk_getu16(hfs->fs_info.endian, &rec_buf[rec_off2])" call in hfs_dir_open_meta_cb in |
32 |
+tsk/fs/hfs_dent.c does not properly check boundaries. This results in |
33 |
+a crash (SEGV on unknown address |
34 |
+READ memory access) |
35 |
+when reading too much in the destination buffer. |
36 |
+--- |
37 |
+ tsk/fs/hfs.c | 3 ++- |
38 |
+ 1 file changed, 2 insertions(+), 1 deletion(-) |
39 |
+ |
40 |
+diff --git a/tsk/fs/hfs.c b/tsk/fs/hfs.c |
41 |
+index 00f1720b1b..0dec507165 100644 |
42 |
+--- a/tsk/fs/hfs.c |
43 |
++++ b/tsk/fs/hfs.c |
44 |
+@@ -956,7 +956,8 @@ hfs_cat_traverse(HFS_INFO * hfs, |
45 |
+ key = (hfs_btree_key_cat *) & node[rec_off]; |
46 |
+ |
47 |
+ keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len); |
48 |
+- if ((keylen) > nodesize) { |
49 |
++ |
50 |
++ if (keylen > nodesize - rec_off) { |
51 |
+ tsk_error_set_errno(TSK_ERR_FS_GENFS); |
52 |
+ tsk_error_set_errstr |
53 |
+ ("hfs_cat_traverse: length of key %d in index node %d too large (%d vs %" |
54 |
+ |
55 |
+From fb2bc0ad693db852fac1dcc77a072aeabe106ac8 Mon Sep 17 00:00:00 2001 |
56 |
+From: Jordy Zomer <zome8499@××××××××××××××××××××.nl> |
57 |
+Date: Sat, 24 Nov 2018 12:37:09 +0100 |
58 |
+Subject: [PATCH 2/3] fix length in printf of nodesize |
59 |
+ |
60 |
+Also fix the length in printf next to comit dd679ad1d855e7f69a887eb343bb53d49dc664e7 |
61 |
+--- |
62 |
+ tsk/fs/hfs.c | 2 +- |
63 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
64 |
+ |
65 |
+diff --git a/tsk/fs/hfs.c b/tsk/fs/hfs.c |
66 |
+index 0dec507165..4f7c0679a8 100644 |
67 |
+--- a/tsk/fs/hfs.c |
68 |
++++ b/tsk/fs/hfs.c |
69 |
+@@ -961,7 +961,7 @@ hfs_cat_traverse(HFS_INFO * hfs, |
70 |
+ tsk_error_set_errno(TSK_ERR_FS_GENFS); |
71 |
+ tsk_error_set_errstr |
72 |
+ ("hfs_cat_traverse: length of key %d in index node %d too large (%d vs %" |
73 |
+- PRIu16 ")", rec, cur_node, keylen, nodesize); |
74 |
++ PRIu16 ")", rec, cur_node, keylen, nodesize - rec_off); |
75 |
+ free(node); |
76 |
+ return 1; |
77 |
+ } |
78 |
+ |
79 |
+From 8242588f4354339d9cb1ad82622e7c16c55391c9 Mon Sep 17 00:00:00 2001 |
80 |
+From: Jordy Zomer <zome8499@××××××××××××××××××××.nl> |
81 |
+Date: Sat, 24 Nov 2018 12:47:23 +0100 |
82 |
+Subject: [PATCH 3/3] UPDATE on CVE-2018-19497. |
83 |
+ |
84 |
+make it >= because if keylen == nodesize - rec_off it's already past it's destination. |
85 |
+Also fix the sprintf |
86 |
+--- |
87 |
+ tsk/fs/hfs.c | 4 ++-- |
88 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
89 |
+ |
90 |
+diff --git a/tsk/fs/hfs.c b/tsk/fs/hfs.c |
91 |
+index 4f7c0679a8..bb3819ada9 100644 |
92 |
+--- a/tsk/fs/hfs.c |
93 |
++++ b/tsk/fs/hfs.c |
94 |
+@@ -957,11 +957,11 @@ hfs_cat_traverse(HFS_INFO * hfs, |
95 |
+ |
96 |
+ keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len); |
97 |
+ |
98 |
+- if (keylen > nodesize - rec_off) { |
99 |
++ if (keylen >= nodesize - rec_off) { |
100 |
+ tsk_error_set_errno(TSK_ERR_FS_GENFS); |
101 |
+ tsk_error_set_errstr |
102 |
+ ("hfs_cat_traverse: length of key %d in index node %d too large (%d vs %" |
103 |
+- PRIu16 ")", rec, cur_node, keylen, nodesize - rec_off); |
104 |
++ PRIu16 ")", rec, cur_node, keylen, (nodesize - rec_off)); |
105 |
+ free(node); |
106 |
+ return 1; |
107 |
+ } |
108 |
|
109 |
diff --git a/app-forensics/sleuthkit/sleuthkit-4.6.4.ebuild b/app-forensics/sleuthkit/sleuthkit-4.6.4-r1.ebuild |
110 |
similarity index 99% |
111 |
rename from app-forensics/sleuthkit/sleuthkit-4.6.4.ebuild |
112 |
rename to app-forensics/sleuthkit/sleuthkit-4.6.4-r1.ebuild |
113 |
index 93c16837715..654808fc51d 100644 |
114 |
--- a/app-forensics/sleuthkit/sleuthkit-4.6.4.ebuild |
115 |
+++ b/app-forensics/sleuthkit/sleuthkit-4.6.4-r1.ebuild |
116 |
@@ -60,6 +60,7 @@ DEPEND="${DEPEND} |
117 |
PATCHES=( |
118 |
"${FILESDIR}"/${PN}-4.1.0-tools-shared-libs.patch |
119 |
"${FILESDIR}"/${PN}-4.6.4-default-jar-location-fix.patch |
120 |
+ "${FILESDIR}"/${PN}-4.6.4-CVE-2018-19497-backport.patch |
121 |
) |
122 |
|
123 |
src_unpack() { |